• 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 Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

uliekztrollface?

U MAD BRO?
17
Posts
10
Years
    • Seen Aug 23, 2013
    Hi-Which flag do I set to make a trainer walk out the screen after battle (and not reappear in the area)? Also, do I simply put the setflag command in between
    "callstd msg_normal" and "end":

    #dyn 0x740000
    #org @begin
    trainerbattle 0x0 0x001 0x0 @intro @defeat
    msgbox @afterwards
    callstd msg_normal
    (do I simply put the flag in here? Or am I completely wrong xD)
    end

    Thanks
     

    Satoshi Ookami

    Memento Mori
    14,254
    Posts
    15
    Years
  • Any flag that is free.
    The flag must be different for each new trainer you want to "delete".

    You need to put flag into @defeat offset.

    In your case, intro should be message box and defeat org.
    So you need to add.

    #org @defeat
    setflag 0xZZZZ
    applymovmement which moves OW.
     

    uliekztrollface?

    U MAD BRO?
    17
    Posts
    10
    Years
    • Seen Aug 23, 2013
    ...Oh...Sorry I don't really understand...So do I make up a number? And I don't know any movement commands that could get the sprite off the screen (and thus disappear?)
    Sorry I really know very little about scripting. PKSV has a flag list. Could I apply say Gary's flag listed on there, because shouldn't that flag make the trainer walk out the screen (like he does) or does that contradict the idea of "use a free flag"?
    Sorry I'm a bit lost :(
     

    Satoshi Ookami

    Memento Mori
    14,254
    Posts
    15
    Years
  • ...Oh...Sorry I don't really understand...So do I make up a number? And I don't know any movement commands that could get the sprite off the screen (and thus disappear?)
    Sorry I really know very little about scripting. PKSV has a flag list. Could I apply say Gary's flag listed on there, because shouldn't that flag make the trainer walk out the screen (like he does) or does that contradict the idea of "use a free flag"?
    Sorry I'm a bit lost :(
    I thought you were using XSE?

    Sorry, I presumed you are knowledgeable =)
    Anyways, refer to diegoisawesome's tutorial =)
    It has the list of free and safe flags and tutorial for applymovement. You will see how movements work and which movements to use.
     
    18
    Posts
    10
    Years
    • Seen Nov 6, 2023
    Is it possible to increase the value of variable? I mean that if you have a variable x which has a value of 0x2, can I increase it's value by one so it is 0x3?

    And I don't want to start making scripts where I check the value of the variable and then change it to one bigger manually.

    like drfugi said, you pretty much just use the addvar command. a really basic example (off the top of my head) is something like:

    #dynamic 0x800000
    #org @start

    compare 0x4011 0x1 '(or whatever variable)
    if 0x1 goto @added
    addvar 0x4011 0x1 'adds 0x1 to the current value, 0
    end

    #org @added
    msgbox @1 0x2
    end

    #org @1
    = 0x4011's value is 0x1

    this script will check if the variable 0x4011 is equal to 0x1, and if it isn't, it uses addvar to increase it to 0x1. next time, the script will output that the value is 0x1. :)
     
    69
    Posts
    11
    Years
    • Seen Nov 17, 2013
    Is it possible to make someone fight with you in a double battle? I'm not sure if this was in Fire Red or a DS pokemon game.
     

    Alice

    (>^.(>0.0)>
    3,077
    Posts
    15
    Years
  • Hey, I'm just getting back into hacking for the first time in like... 3 or 4 years, and I'm trying to change the beginning of the game (ruby) so that you just start out in your bed and not on the truck. I've changed it so you start in the middle of the starter town, and then used warpmuted to stop the earthquake at the start of the game... which also should have ideally warped you straight into your bed, but the script doesn't execute when the game starts. It only happens if you exit and come back to the map. How can I make it happen at the very very very beginning?
     
    50
    Posts
    11
    Years
    • Seen Jan 4, 2021
    Look in advance map. They are in the events tab under the movement types.

    So, if I put:

    spritebehave 0xFF 0x0C

    Will the players sprite disappear? I am putting this on a level script and want it to happen immediately when he/she enters the area.
     
    3
    Posts
    10
    Years
    • Seen Aug 11, 2013
    I made a script and everything is working fine, except that my selected person doesn't move/follow the applymovement bit. She just stands as she is and talks from there, the applymovement for the players character however works fine?

    What is my problem?

    Spoiler:


    Extra: For the script in advancemap i have both unknown figures set to 03 and the var number is 6100. My person is no.2 and her person event num. is 3. Her Person Id. is 1206 (same as flag)
     
    Last edited:

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • So, if I put:

    spritebehave 0xFF 0x0C

    Will the players sprite disappear? I am putting this on a level script and want it to happen immediately when he/she enters the area.

    Why not give it a try? It it took longer to write out this question instead of testing it yourself.XD

    I made a script and everything is working fine, except that my selected person doesn't move/follow the applymovement bit. She just stands as she is and talks from there, the applymovement for the players character however works fine?

    What is my problem?

    Spoiler:


    Extra: For the script in advancemap i have both unknown figures set to 03 and the var number is 6100. My person is no.2 and her person event num. is 3. Her Person Id. is 1206 (same as flag)

    WOAAHHHHH NO. Read this: http://www.pokecommunity.com/showthread.php?t=302347
     
    Last edited:
    3
    Posts
    10
    Years
    • Seen Aug 11, 2013
    Is it the flag? It was above 900 so?
    What should i do with the flag if so?

    Please correct my mistake for me :(
    I'm a very newbie scriptwriter and rom hacker
    I'm just making a small game for some friends.
     

    Wobbu

    bunger bunger bunger bunger
    2,794
    Posts
    12
    Years
  • Hey, I'm just getting back into hacking for the first time in like... 3 or 4 years, and I'm trying to change the beginning of the game (ruby) so that you just start out in your bed and not on the truck. I've changed it so you start in the middle of the starter town, and then used warpmuted to stop the earthquake at the start of the game... which also should have ideally warped you straight into your bed, but the script doesn't execute when the game starts. It only happens if you exit and come back to the map. How can I make it happen at the very very very beginning?

    For stopping the truck animation that occurs during the beginning of the game, use ZodiacDaGreat's Advance IntroEd. After doing that, you can change the starting map to the player's room rather than the town.
     
    Status
    Not open for further replies.
    Back
    Top