• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script: Check if a Pokemon of a specific slot has the given type for Pokemon Essentials V18

  • 19
    Posts
    4
    Years
    • Seen Oct 27, 2023
    def pbMonoType?(type,pokemonIndex)
    for i in 0...$Trainer.party.length
    next if i==pokemonIndex
    p = $Trainer.party
    type = getID(PBTypes,type)
    return false if p.hasType?(type)
    end
    return true
    end

    Paste the script above below the script pbHasType?(type)and this is basically how it works:
    As example, make a Conditional Branche, then write pbMonoType?(:FIGHTING,0) (in this case, in the first slot HAS to be a Pokemon that is or shares the Fighting type or it the conditional branche won´t change to true.)
    Then if you want to force the player to have a full team out of fighting types you can paste the same conditional branche below but with the number going up by one each time until 5 (which is the 6th slot in the party) like the screenshot shows.

    Check if a Pokemon of a specific slot has the given type for Pokemon Essentials V18


    Like this, you can make an event where the player is FORCED to have only Fighting types in the party before the script is set to true.
    I´ve used it in my own game so as long as you use the V18 or a version that also uses the pbHasType?(type) script, it should work out just fine.

    I hope I was able to help you if you were searching for that.
    Have a nice one!^^
     
    Back
    Top