• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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] Move Effects (0DD, 007)

  • 9
    Posts
    5
    Years
    • Seen Dec 19, 2019
    So uhm, I've been working and researching but I seriously can't figure this one out. I want a move that will drain health and paralyze, I just can't get the syntax right and I sorta scrapped what I had because I messed up majorly, how should I go about doing this?
     
    Hmm... What did you try writing? I imagine you must have been pretty close.
     
    Hmm... What did you try writing? I imagine you must have been pretty close.

    I was way off. I tried putting the move under both function codes and adding the effect of the other and it just doesn't work that way so I tried writing an entirely new function code but still didn't know how to make it paralyze.
     
    Well the code to paralyze is very roughly three lines long (but you'll need to look up exactly how it goes, because I don't have the code to hand):
    Code:
    if opponent.pbCanParalyze?(attacker)
      opponent.pbParalyze(attacker)
    end
    So you'd just stick that in your pbEffect code before the return (possibly inside the if that checks if some damage was done, if you prefer).
     
    Well the code to paralyze is very roughly three lines long (but you'll need to look up exactly how it goes, because I don't have the code to hand):
    Code:
    if opponent.pbCanParalyze?(attacker)
      opponent.pbParalyze(attacker)
    end
    So you'd just stick that in your pbEffect code before the return (possibly inside the if that checks if some damage was done, if you prefer).

    then do you think this will work?
    prnt.sc/qb9qbl
     
    N e v e r m i n d
    prnt.sc/qb9th5

    In principle I would have expected that to work, so go look at how pbCanParalyze? (and probably pbParalyze too) is used in the script section you're in and I'm sure you can work out what I got wrong about the things inside the parentheses.
     
    In principle I would have expected that to work, so go look at how pbCanParalyze? (and probably pbParalyze too) is used in the script section you're in and I'm sure you can work out what I got wrong about the things inside the parentheses.

    BAM prnt.sc/qba1qw
     
    Back
    Top