• 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] Scripts do not activate when stepped on

7
Posts
4
Years
    • Seen Mar 15, 2020
    I'm very new to ROM Hacks. Just started a couple days ago. Using LeafGreen.

    All of my Person Event Scripts work really great.

    But none of my Script Event tiles work. In the starting town I made, I have a Script Tile (Green S tile) that should activate when stepped on, if I understand scripts correctly.
    However, nothing happens when I step on this tile.

    My script had a bit more in it, but I took a lot out to make it as simple as possible, and still nothing happens.
    When I compiled the script in XSE, I got an offset of 8001CB. So for the Script Event, the Script Offset field says $8001CB.
    For the Variable Number, I used 4100. The Var Value is set at 0000.

    There is probably some fundamental step I'm missing, but I really can't figure this one out. Any help is appreciated.
    Script included below.

    '----------------------------------------------------
    #dynamic 0x800000
    #org @start
    lock
    msgbox @t1 0x6
    setvar 0x4100 0x1
    release
    end

    #org @t1
    = Hey you! You're finally awake!!
     

    aymancero

    The chosen
    2
    Posts
    5
    Years
  • Hey Taipichi, I could help but for the next time I recommend you to paste an image about where is happening your problem.
    I think that your problem is on the tile configuration where you are putting your script.
    You may go the configuration of the tile and corrected
    If you didn't understood me you can say it and I will explain everything with details.
    Have a nice day!
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • First off, Leaf Green isn't well supported or known about, especially when compared to FireRed so I'd suggest changing your base as I can guarantee that you're going to experience compatibility errors the deeper you get into hacking.

    Your script is properly structure to step onto a tile, activate it and not have it activate again - the error is with the variable you've chosen. In FR at least (I'm 99.99% sure its the same in LG), variables 0x4100 and above are dedicated to 'hidden variables' used by some script commands. These variables can change without any user input so its most likely the case that your script isn't activating because 0x4100 is no longer set to 0x0. Checkout this thread to learn more, including which variables are safe to use (generally 0x4011 - 0x40FF).
     
    7
    Posts
    4
    Years
    • Seen Mar 15, 2020
    Is there a way that I can move the maps and events I created from a LeafGreen ROM to a FireRed ROM?
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • You can export your maps in Advance Map by going to 'File > Map > Save Map As'. To import them, go to 'File > Map > Open Map' and then 'File > Map > Insert Map'. You can overwrite the map that you were originally using by choosing its bank and map number and then selecting replace. All of the events on the map (NPCs, script tiles etc.) should be carried over, but their attached scripts won't be. You'll have to compile their scripts again with XSE to make them work properly.
     
    7
    Posts
    4
    Years
    • Seen Mar 15, 2020
    Sounds good. Thanks. I'm glad I found out about this before I had too much done. It shouldn't take too long to move this over to FireRed :)
     
    Back
    Top