• 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.

[Other] Person Event Overwriting Script Event

  • 44
    Posts
    9
    Years
    • Seen Feb 24, 2022
    So everytime I compile my script event with new code it gets deleted and replaced with code that makes it so when I step on the script tile it triggers the person events dialogue.

    So i have a person that is supposed to say something when you talk to her and she does but then something completely unrelated is supposed to happen when you step on the script tile but instead it just runs through the NPCs dialogue again.

    Is there a reason why this happens?

    I can post my script if needed
     
    Is the script event pointing to the right thing? Alternatively you could have overwritten the script with the person event by accident or something.
     
    Is the script event pointing to the right thing? Alternatively you could have overwritten the script with the person event by accident or something.

    What do you mean by pointing to the right thing. Sadly all the script I wrote for the script tile got deleted when it got overwritten but I am fairly certain the offsets i used for that and my person event did not overlap.

    Also I rewrote the script tile like 3 times and every time the person event would overwrite it.

    At this point I might just delete the person event and start entirely from scratch :\
     
    In A-Map, it makes a pointer to wherever you made the script. If it's pointing to the person event rather than the script event then of course it's not going to run the scripted event. I'd double check that.
     
    In A-Map, it makes a pointer to wherever you made the script. If it's pointing to the person event rather than the script event then of course it's not going to run the scripted event. I'd double check that.

    where is this pointer? sorry theres a reason I'm posting in the beginners lounge xD
     
    If it helps this is my person event

    Spoiler:


    and this is what my script keeps getting changed to

    Spoiler:


    The offsets overlap now but when I put in my actual script code they don't.
     
    Ok so I can tell you right now what is wrong with that script. First of all, flag #1 is unsafe. Don't use it for your hack, use 200-2FF. Second, you're not using free space. Free space in a typical ROM hack of FR begins at 0x800000, and you're beginning WAY before that. Nop is 00, which is NOT free space. Free space is the byte FF. In order to fix this, try using #dynamic 0x800000 at the top and then #org @start and @(word) for pointers. By doing that you're hopefully going to be using FF rather than 00. Alternatively, use Free Space Finder to find actually safe data to use.


    Also, why are you moving the sprite and then hiding it? If you're hiding the sprite, it should be done when you enter the map or by using person IDs.
     
    Ok so I can tell you right now what is wrong with that script. First of all, flag #1 is unsafe. Don't use it for your hack, use 200-2FF. Second, you're not using free space. Free space in a typical ROM hack of FR begins at 0x800000, and you're beginning WAY before that. Nop is 00, which is NOT free space. Free space is the byte FF. In order to fix this, try using #dynamic 0x800000 at the top and then #org @start and @(word) for pointers. By doing that you're hopefully going to be using FF rather than 00. Alternatively, use Free Space Finder to find actually safe data to use.


    Also, why are you moving the sprite and then hiding it? If you're hiding the sprite, it should be done when you enter the map or by using person IDs.

    Thanks I'll try this. When I used FSF it gave me those offsets, is there a reason why it did? are my search parameters in FSF maybe incorrect. I had learned since posting my previous response about the right flags to use and have since changed them. Also I am moving the sprite because I want that person event to just be there to block the path during the script but then once the script is complete for them to basically not exist anymore.

    On an unrelated note, if you may know how to help this too, my warp tile into my first building is not working. I changed the size of the map if that may create an issue but since its the inside of a building I didnt think it would. The warp is set correctly and when I press "goto" in AdvanceMap it switches to the correct map. However when i try to use the warp in game the screen goes black and nothing happens and I just have to close the game or reload it. Any reason why this might be happening


    PS: thanks a bunch for all the help
     
    You could also use a hex editor for 100% assurance that areas are free. No I don't know why it did that.


    By putting the hidesprite in the script, it's not going to simply reset every time you leave the map. So when you leave and come back after talking to him you'll see that the person is there again. You should use the person ID, your way won't work properly.


    I'd need to see the warp script. Alternatively you could make a script event instead of a warp and they'll work the same way.
     
    Back
    Top