• 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] My script won't trigger the event upon stepping on the tile

4
Posts
4
Years
    • Seen Feb 5, 2024
    My goal with this script is to have a simple interaction with the player and the npc in the room when stepping on the tile once. I have tried this without using a script tile, (instead placing the script on the npc) the flag and the script worked as intended. However, I want the script to trigger when the player steps on the tile. When I place my script's offset on the script tile then proceed the test it, my player freezes in place. The in-game music still plays but, the script doesn't activate leaving me stuck on the script tile.

    Extra Info :
    I've set the affected npc's person event to 1
    I've set the set the script's offset to match the @start offset given to me every time i use the batch compiler on XSE
    The npc's person ID is 6000 just like the flag
    My Advance Map is currently v1.95
    The rom is Pokemon Ruby

    Script for the script tile : (Before it is complied)
    Code:
    #dynamic 0x0800000
    
    #org @start
    checkflag 0x6000
    if 0x1 goto @motherOne
    applymovement 0x1 @messengerZero
    waitmovement 0x0
    msgbox @messageOne 0x6
    applymovement 0x1 @messengerOne
    waitmovement 0x0
    msgbox @messageTwo 0x6
    msgbox @playerOne 0x6
    msgbox @messageThree 0x6
    msgbox @playerTwo 0x6
    msgbox @messageFour 0x6
    msgbox @playerThree 0x6
    msgbox @messageFive 0x6
    applymovement 0x1 @messengerTwo
    waitmovement 0x0
    msgbox @messageSix 0x6
    applymovement 0x1 @messengerThree
    waitmovement 0x0
    setflag 0x6000
    release
    end
    
    #org @motherOne
    release
    end
    
    #org @messageOne
    = Mom: Oh...\nWell good morning dear,\lI have some important news.
    
    #org @messageTwo
    = Mom: Your father just called me,\nhe wants you to come to his lab\land help him with an\l"experiment".\lNormally I'd hang up the moment I\lheard his voice but,..\lHe's offering you a gift.
    
    #org @playerOne
    = [player]: What...\nNo, I...\lI don't know if I want to...\Lsee him right now...
    
    #org @messageThree
    = Mom: I thought maybe this was his way\nof making it up to you\lfor what happened...\lbut, if you don't want to see him\lI'll let him know...\lIf you won't go for yourself,\lcan you at least for me?\lI rather not have him pestering me\lmore than he already has becasue\lI couldn't get you to see him.
    
    #org @playerTwo
    = [player]: ...
    
    #org @messageFour
    = Mom: If you help me out,\lI'll get anything you want\lor let you do anything you want.\lJust once.\lDo we have a deal?
    
    #org @playerThree
    = [player]: Fine.
    
    #org @messageFive
    = Mom: Great! He should be in the\nnext town north of her.\lI'll be waiting for your return.
    
    #org @messageSix
    = Mom: I almost forgot,\nthere is a bit of tall grass\lbetween here and the next town.\lYou should bring your Eevee with you\ljust in case if anything happens.\lYou probably left it's pokeball\lUpstairs.
    
    #org @messengerZero
    #raw 0x01
    #raw 0x56
    #raw 0xFE
    
    #org @messengerOne
    #raw 0x03
    #raw 0x0B
    #raw 0x0B
    #raw 0x0B
    #raw 0x0B
    #raw 0x0B
    #raw 0x01
    #raw 0x09
    #raw 0x09
    #raw 0x09
    #raw 0xFE
    
    #org @messengerTwo
    #raw 0x00
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0x02
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x56
    #raw 0x01
    #raw 0xFE
    
    #org @messengerThree
    #raw 0x02
    #raw 0x06
    #raw 0x06
    #raw 0xFE

    I am a novice in rom hacking so, If I'm missing anything or if any more information is needed to help please ask, Thank you for reading this.
     
    Last edited:
    124
    Posts
    8
    Years
    • Seen Apr 5, 2024
    Im pretty sure u using flag 6000 is ur problem...there is a list of usable flags somewhere on pokecomm u can use instead of 6000...from 200 to 2ff there are plenty of usable flags that are free to use. Check them out, if u cant find it, google fire red free flags and vars
     
    4
    Posts
    4
    Years
    • Seen Feb 5, 2024
    Alright, so looked up a list of safe pokemon ruby flags. I chose to use 0x3DF as the new flag, recompiled the new script set the new person ID on the npc and set the script tile's new offset. When I entered the room to walk over the tile, the Npc had now disappeared and the script tile no longer locked me in place when i step on the tile. I tested this without flags just in case and the result was the same as the original script's (locked in place). I also tried replicating the same situation on fire red with a simpler event (without flags) and I was locked in place again.
     
    Last edited:
    124
    Posts
    8
    Years
    • Seen Apr 5, 2024
    Well anytime u use tile scripts u need a var equal to the value that the var is currently set to...it is not necessary to use any flags, but a var is a must, and u must know the value it holds at the time to the tile activation...as for ruby, there's not much known about ruby, u should stick to fire red or emerald, i think things work differently on other versions
     
    4
    Posts
    4
    Years
    • Seen Feb 5, 2024
    I have now altered my script to work with variables. I changed setflag 0x6000 to setvar 0x6000 0x1, the var number on the script tile to 6000, set the Person ID on the npc to 0, deleted the check flag and goto lines along with @motherOne's lines and set the new offset on the script. The npc is back but, the script tile now has no effect when I step on it (not even stuck in place). I will continue to do more testing with this in hopes that things might improve but, If it is the rom itself that is the problem then I'll be sure to try a different rom.
     
    Last edited:
    4
    Posts
    4
    Years
    • Seen Feb 5, 2024
    I think I'm at a loss here. I've now used pokemon fire red to make a script tile with a very basic event.

    #dynamic 0x800000

    #org @start
    msgbox @message 0x6
    end

    #org @message
    = Hi.

    The result was the exact same as the result in the original script (frozen in place with the game/music still playing). I don't think this error/bug is in the code or in the advance map (1.9.2/1.9.5) anymore. Is there any other condition that needs to be set outside of the rom that maybe affecting new script tiles?
     

    Child Amnesiac

    Ever changing
    341
    Posts
    5
    Years
  • I think I'm at a loss here. I've now used pokemon fire red to make a script tile with a very basic event.

    #dynamic 0x800000

    #org @start
    msgbox @message 0x6
    end

    #org @message
    = Hi.

    The result was the exact same as the result in the original script (frozen in place with the game/music still playing). I don't think this error/bug is in the code or in the advance map (1.9.2/1.9.5) anymore. Is there any other condition that needs to be set outside of the rom that maybe affecting new script tiles?

    Try using vars 0x4011- 0x40FF (but don't use 0x4020 - 4025, those are pedometers) also some vars have specific functions, see: This thread for those vars.
    Others are unsafe to use, also make sure your script tile has a var assigned to it, keeping it at 0000 will freeze your game.
     
    Last edited:
    124
    Posts
    8
    Years
    • Seen Apr 5, 2024
    Yea dont use vars that high up either, follow what child amnesiac posted...
     
    Back
    Top