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

[Other] NPC position/behaving script problem [Solved]

3
Posts
9
Years
  • Hi there

    Since I'm out of ideas how to solve the problem I have, I have to ask people who are more familiar with scripting.

    So what I'm trying to is:
    I want to have a door in the Pokécenters with a NPC in front of it who wants you to answer "Yes" a few times before it walk aside and lets you pass and you warp into the room "behind" it. So far it works.
    But when I walk back into the room I want the NPC still to stay on the side so I don't walk into it. Then the player is supposed to make 2 steps down and the NPC to walk back into its standard position so I can talk to it again and start everything again.
    And I seem to be unable to do that part of the script. I read a lot of tutorials about playback/levelscript stuff, but I still don't get it to work. Either the screen goes black or the message "The slope makes it hard to steer." gets triggered again and again when I walk from the town into the Pokécenter, which belongs to NPC no. 9 (10) on Route 17. It's the one you get after a refight. Mostly the message is the problem.

    That's the script when I talk to the NPC, the one that's working so far:

    Spoiler:


    That's the script where I struggle.
    I tried it in different ways with goto/jump/call and stuff, in XSE and PKSV, but with the same results. I tried it in in normal houses, but still the same results, so it doesn't happen because it's a Pokécenter:

    Spoiler:


    So, any ideas what I'm doing wrong or how that has to look like?

    ~Sui
     
    Last edited:

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • Hi there

    Since I'm out of ideas how to solve the problem I have, I have to ask people who are more familiar with scripting.

    So what I'm trying to is:
    I want to have a door in the Pokécenters with a NPC in front of it who wants you to answer "Yes" a few times before it walk aside and lets you pass and you warp into the room "behind" it. So far it works.
    But when I walk back into the room I want the NPC still to stay on the side so I don't walk into it. Then the player is supposed to make 2 steps down and the NPC to walk back into its standard position so I can talk to it again and start everything again.
    And I seem to be unable to do that part of the script. I read a lot of tutorials about playback/levelscript stuff, but I still don't get it to work. Either the screen goes black or the message "The slope makes it hard to steer." gets triggered again and again when I walk from the town into the Pokécenter, which belongs to NPC no. 9 (10) on Route 17. It's the one you get after a refight. Mostly the message is the problem.

    That's the script when I talk to the NPC, the one that's working so far:

    Spoiler:


    That's the script where I struggle.
    I tried it in different ways with goto/jump/call and stuff, in XSE and PKSV, but with the same results. I tried it in in normal houses, but still the same results, so it doesn't happen because it's a Pokécenter:

    Spoiler:


    So, any ideas what I'm doing wrong or how that has to look like?

    ~Sui

    Did you wipe all the level scripts in the map you're warping to?
    Secondly put "waitspecial" right after your "warp 0x8 0x4 0xFF 0x4 0x7". I took a quick peek and the Pokecenter's don't seem to have any scripts that prevent you from doing anything :)

    edit: if you want a one time warp, then yeah you need a checkflag and to set a flag in that script. If it's gonna happen everytime it's fine since warping out of the map and going back to that map will reset the OVA positions.
     
    3
    Posts
    9
    Years
  • Edit:

    Oh my, the solution was as stupid as the problem -.-
    No tutorial sais I have have to compile the script regardless if there is #raw word 0x0 at the end or not. Nobody wrote I have to do it even if everything looks alright in the decompiled map offset -_-"
    I actually only got the idea because I opened the game in a normal VBA and not in VBA-RR.
    VBA gives you that symbol spam, but VBA-RR gives you that "The slope..." message


    Old posting:

    Added the waitspecial.

    And no, the room I warp into has no scripts.
    The thing is that both scripts are for the same NPC in the Pokécenter. So one script for walking aside and let me walk through the door, and another one that makes him stand still stand aside when i come back through the door and then makes it block it again. And then everything is supposed to start from beginning.

    I actually fixed a few things about the pokécenter script that I forgot before

    Spoiler:


    So, for what I read Iwant to have "setvar 0x4011 0x1" in the NPC script, "setvar 0x2 or addvar 0x1" in the PokéCenter script and 0001 as value in AdvMap.

    But however I set them, the player freezes or I get that "The slope.." message. It seems like the message appears everytime the script isn't supposed to work, which is really really weird. It doesn't matter if I use a clean rom or other values.
    Since I found noone else with that problem, this seems to be quite unique problem I ran into. o_o"

    I get the feeling that something about my savegame is wrong (which is possible due to lua scripts) or that Win7 is doing funny things because Mudkipz.
    Think I have to put my investigations into that - after I got some sleep.
     
    Last edited:
    Back
    Top