• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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.

[Other] Script freezing

  • 97
    Posts
    12
    Years
    • Seen Jun 7, 2016
    Very first script in Xse...so simple too :<
    I believe special 0x171 triggers the running shoes...? I took it from the running shoes gift script in Pewter City. If it doesn't, could someone tell me what does?

    It's supposed to be an event that triggers when stepped on. But the game freezes as soon as I step on the tile.
    What am I doing wrong?

    Oh, and this is Firered by the way.
    ---------
    #dynamic 0x803FD4

    #org @start
    lock
    checkflag 0x1200
    if 0x1 jump @no
    special 0x171
    showpokepic 0xfe 0x0 0x4
    msgbox @spawn 0x4
    givepokemon 0x32 0x5 0x8e 0x0 0x0 0x0
    release
    end

    #org @spawn
    = ...Where am I?

    #org @no
    showpokepic 0xfe 0x0 0x4
    msgbox @no 0x4
    = ...I really shouldn't be dawdling here.
    release
    end
     
    Very first script in Xse...so simple too :<
    I believe special 0x171 triggers the running shoes...? I took it from the running shoes gift script in Pewter City. If it doesn't, could someone tell me what does?

    It's supposed to be an event that triggers when stepped on. But the game freezes as soon as I step on the tile.
    What am I doing wrong?

    Oh, and this is Firered by the way.
    ---------
    #dynamic 0x803FD4

    #org @start
    lock
    checkflag 0x1200
    if 0x1 jump @no
    special 0x171
    showpokepic 0xfe 0x0 0x4
    msgbox @spawn 0x4
    givepokemon 0x32 0x5 0x8e 0x0 0x0 0x0
    release
    end

    #org @spawn
    = ...Where am I?

    #org @no
    showpokepic 0xfe 0x0 0x4
    msgbox @no 0x4
    = ...I really shouldn't be dawdling here.
    release
    end
    Hey there. Don't let this trouble discourage you. Scripting gets easier with practice, trust me!

    First off, the freezing. Script tiles require you to set a variable to them for them to be triggered. If you keep it at 0000, the game will freeze upon stepping on that tile. Change the "Var number" in Advance Map to an unused variable. Look here for more info on those topics. If you always want something to happen when stepping on this tile, you're fine with leaving "Var value" at 0000.

    There's some other things you could do to polish the script up, if you don't mind. 1200 is not a safe value to use for a flag. You're best off using unused flag values in the 200s if possible. From the looks of it, though, you're trying to use a flag to signify if the player has completed this event, right? You need to make sure you have a setflag command for the flag you use after the main event is done, but before the release and end commands in the main part of your script. If you don't do that, the event will always repeat as the flag's status will not have changed upon doing it. It would look like this:

    Code:
    ...
    givepokemon 0x32 0x5 0x8e 0x0 0x0 0x0
    setflag 0x2?? (where the ?? can vary depending on what flag value you change this to)
    release
    end
    Also, take a look at @no. You use it for two different purposes: to serve as the "main event already done" routine, and to be a message from within the same routine. You need to designate a new, different name to the dynamic offset that will hold the text "...I really shouldn't be dawdling here." It's the same thing you did with @spawn, so look to that to get that right.

    Finally, don't forget to use hidepokepic just before the ends of your script events to remove the image from the screen. Then all it will need is some natural expansion on the dialogue and you'll have yourself a neat little event!
     
    Complete list of flags/vars or anything:
    https://www.pokecommunity.com/threads/302347
    To enable Running Shoes you need to use setflag 0x82F, your script is wrong.
    And the freeze, you need to give a specific var to your script, if not always latch (with me so).
     
    Thanks, now I understand variables and flags a little more.

    Edit: It finally worked, but the running shoes still aren't triggered...? I used setflag 0x82f. Hmm, maybe the running shoes got messed up when I inserted some hex stuff to allow running indoors? Oh well, I was planning to start the rom over anyway. I have a feeling I've wasted a lot of space with my noobery XD
     
    Last edited:
    Back
    Top