• 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!
  • 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] Assistance in making a custom function code that deals damage to the opponents part.

  • 1
    Posts
    3
    Years
    • Seen Sep 9, 2021
    As the title suggests, I was wondering If I could get some help from those whom are far more experienced than me at adding new scripts into the system. That said, I wanted to make a new function code for an attack that not only does damage to the active Pokémon on the other side but the entire party as well after I was reminded of a series of high powered, endgame moves found in Pokemon Zeta/Insurgence.

    I have asked this question prior to asking now and Maruno had mentioned doing a pseudo fusion of sorts with the function codes for Aromatherapy and flame burst but upon finding said function code and spending about an hour trying to understand the code, I haven't made any progress since I can't figure out what line of code does what most of the time nor do I know what line of code I can edit and what options I have. I'm trying to not be lazy or be a pain in the behind but I just can't quite figure it out since aromatherapy is unique amongst all the function codes. I can't even determine what command separates the players party from the opponent's party. Any help would be appreciated on the matter.

    EDIT 1

    After some digging around, I managed to find what I was looking for I think with someone's assistance however when I entered this

    class PokeBattle_Move_500 < PokeBattle_Move
    def pbEffect(attacker,opponent)
    ret=super(attacker,opponent)
    alive = []
    [email protected](opponent.index)

    for i in 0..party.length-1
    alive.push(party) if party.hp > 0
    end

    displaymessage=false
    for i in 0..party.length-1
    if i != opponent.pokemonIndex
    @battle.pbDisplay(_INTL("The rest of the party was hit!")) if !displaymessage
    displaymessage=true
    if party.hp < 25
    party.hp=0
    else
    party.hp = party.hp - 25
    end
    end

    Into the script editor, I kept getting this syntax error

    Script line" line e:Syntax error

    168:Move_Effects_500+:25:syntax error: unexpected end-of-input, expecting `end'

    Since it already has the ends like the countless other effects, I'm not sure exactly what the issue is other than a line of code is obviously missing a "end" but I don't know which one. Trying to educate myself on effects is proving difficult.
     
    Last edited:
    Back
    Top