• 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.

[Scripting Question] Can't Differentiate Between 2 Deoxys in a Double Battle

Draconic_Dragon12

SalamenceLvX or simply Salamence
11
Posts
5
Years
    • Seen Apr 27, 2024
    Scripting a wild double battle with two Deoxys' and the system I'm using for changing their attributes isn't able to differentiate between the forms.
    Can't Differentiate Between 2 Deoxys in a Double BattleCan't Differentiate Between 2 Deoxys in a Double Battle
    To summarize everything, how can I make my EventHandlers script detect the forms from my WildBattle script?
     
    12
    Posts
    247
    Days
    • Seen today
    maybe you should change like:
    if pkmn.species = :DEOXYS && pkmn.form = 2
    setBattleRule("disablePokeBalls")
    ...
    ...
     
    1,682
    Posts
    8
    Years
    • Seen May 16, 2024
    As an aside you should really be setting battle rules before the battle, in the event itself. while you can technically set it here, it's not supposed to be set here, this proc isn't intended for side effects like this.
     

    Draconic_Dragon12

    SalamenceLvX or simply Salamence
    11
    Posts
    5
    Years
    • Seen Apr 27, 2024
    As an aside you should really be setting battle rules before the battle, in the event itself. while you can technically set it here, it's not supposed to be set here, this proc isn't intended for side effects like this.
    Noted, thanks.
     
    1,682
    Posts
    8
    Years
    • Seen May 16, 2024
    For what part? pkmn.species and pkmn.form (and others similar) use =. == crashes.
    you use == to check a value.
    so conditionals will use them.
    if it crashes, you should post the error and stacktrace here.
    but you can also use pkmn.isSpecies?(:DEOXYS) for species specifically.
     

    Draconic_Dragon12

    SalamenceLvX or simply Salamence
    11
    Posts
    5
    Years
    • Seen Apr 27, 2024
    you use == to check a value.
    so conditionals will use them.
    if it crashes, you should post the error and stacktrace here.
    but you can also use pkmn.isSpecies?(:DEOXYS) for species specifically.
    Oh my gosh that works. Thank you so much.
     
    Back
    Top