• 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 Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
8
Posts
14
Years
    • Seen Jun 24, 2010
    @ Wolfhead...
    I like the way you post. Keep it up! ;)
    Anyways, usually, as I've observed, NPC will start moving after a give(pokemon or item) commands, so I guess you can add another faceplayer command there.
    The applymovement will freeze your game 'cause you forgot the end move command, which is 0xFE...
    Code:
    #org @move1
    #raw 0x62 [COLOR=blue]0xFE[/COLOR]
    Remember that after the script makes an NPC move, add 0xFE to the end of the move script so it won't freeze. ;)

    Right ...
    :cer_pissed: What a stupid thing to forget.
    Anyway, the following script is corrected (in blue) and works like a charm.
    Thank you.
    Spoiler:

    But seriously, I'd never had thought that all these locks and faceplayers were necessary.
     
    860
    Posts
    17
    Years
  • Uhm I got a question bout a script tile, I have searched and can't find it:

    What do I have to put in unknown, var number and var value to make it work when you walk over it?
     
    8
    Posts
    14
    Years
    • Seen Jun 24, 2010
    you know you also could use
    lock
    faceplyer
    as the beginning of each pointer..
    Actually, I tried that too ...
    With no effect whatsoever. The person would still restart moving. The lock and faceplayer need to be placed after the yes/no-question.
    What I meant is that the reason why the additional locks, faceplayers and 0x2s are even necessary is beyond my understanding, as the first lock and faceplayer's abort was never scripted prior to the script's end.
     

    TheDon

    Shedinja Enthusiast
    42
    Posts
    16
    Years
    • Seen Sep 25, 2018
    k, I'm having a rotten time getting movement in my game.

    Game: Pokemon Ruby
    Type: Apply movement
    Editor: XSE
    Script:
    Spoiler:


    It doesn't execute when I step on the scripting space. >.<

    I set var number in Advance Map to 4050, and Unknown to 0300, and it doesn't trigger the script.
     

    colcolstyles

    Yours truly
    1,588
    Posts
    15
    Years
  • k, I'm having a rotten time getting movement in my game.

    Game: Pokemon Ruby
    Type: Apply movement
    Editor: XSE
    Script:
    Spoiler:


    It doesn't execute when I step on the scripting space. >.<

    I set var number in Advance Map to 4050, and Unknown to 0300, and it doesn't trigger the script.
    Okay. How 'bout your "Var value" field? What's that currently set to?
     

    colcolstyles

    Yours truly
    1,588
    Posts
    15
    Years
  • It's set to 0000. I have 'Mark active sprite' checked, as well.
    Alright. Do you, by any chance, know what the variable '0x4050' was set to at the moment that you stepped on the tile? If it's not equal to 0x0, then the script won't run.

    Also, do you really have 49 OWs on that map? Or did you specifically set that OW's person event no. to 0x31 (I can't see any reason why you would do that though)?

    One more thing:
    You can't just use "goto @No" because that pointer can't lead to a block of text (well, it can but it won't be pretty). "@No" should point to a script segment like:
    Code:
    #org @No
    msgbox @Notext 0x6
    release
    end
    
    #org @Notext
    = NO????......\pOh, I'm gettin' you!
    A few other notes:

    • You don't need 'return' after every message
    • You can put all those "#raw's" on one line if you like (though your method makes it easier to count movements)
    • It's good practice to give your dynamic labels more descriptive titles like "faceright" or "asklikepie", regardless of how ridiculous they sound
    • @done is redundant because nowhere in your script do you point to it :\
     
    Last edited:

    Satoshi Ookami

    Memento Mori
    14,254
    Posts
    15
    Years
  • k, I'm having a rotten time getting movement in my game.

    Game: Pokemon Ruby
    Type: Apply movement
    Editor: XSE
    Script:
    Spoiler:
    As posters above me said...
    Ya might have already var 4050 used... try some other one like 4055/4060 etc...
    And the movement's number has to be in hex (in your example 31 is for person whose number in A-Map is 49)... that also might be the cause of problem
     

    Tropical Sunlight

    The Faltine
    3,476
    Posts
    16
    Years
  • Ehm... a problem:
    This is a FireRed script activated by asking it (Person).
    Spoiler:

    The problem is, I have taught my Turtwig the HM Tunnel (replaced by Fissure) and the script senses it like Turtwig doesn't have the attack.
     
    Last edited:

    TheDon

    Shedinja Enthusiast
    42
    Posts
    16
    Years
    • Seen Sep 25, 2018
    Thanks for the help, the script itself works okay now, but I still can't get movement.

    Spoiler:


    Here's where I'm putting it in AM:

    The person I'm trying to make move:

    Spoiler:


    And the script in AdvanceMap:

    Spoiler:


    I tried changing the trainer number (31, the one at the very top) to hexadecimal in the script (1F), which didn't work. The script triggers now, and the dialogue works okay, but there's still no movement.
     
    Last edited:

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    I tried changing the trainer number (31, the one at the very top) to hexadecimal in the script (1F), which didn't work. The script triggers now, and the dialogue works okay, but there's still no movement.

    There's no movement because you're using the wrong number. You have to take the Person Event number, which is 32 in your case. BTW, you don't really need to convert it to hexadecimal. You can just write it as is:

    Decimal -> applymovement 32 @move
    Hex -> applymovement 0x20 @move

    It's the same. Just pay attention to not mix hex and dec.
     

    TheDon

    Shedinja Enthusiast
    42
    Posts
    16
    Years
    • Seen Sep 25, 2018
    Still not working. >.<

    I set the offset to 31, 32, 1F and 20, all of which aren't moving it. I tried it on another in-game sprite, and it doesn't work for that one, either. I'm using a gba auto file for the ROM, type AXV. Would that have anything to do with it?
     

    colcolstyles

    Yours truly
    1,588
    Posts
    15
    Years
  • Still not working. >.<

    I set the offset to 31, 32, 1F and 20, all of which aren't moving it. I tried it on another in-game sprite, and it doesn't work for that one, either. I'm using a gba auto file for the ROM, type AXV. Would that have anything to do with it?
    Code:
     applymovement 0x20 @move
    ...should work perfectly. My only guess is that when you tried to change the Person Event Number, you compiled the script a second time instead of decompiling it, changing the parameter, and then recompiling. If you did the former, the script would be compiled not to 0x6B0C86 but to the next location after that offset that has enough free space. Therefore, your script tile (the green 'S') would still point to the older, faulty script.
    But that's just a guess. In order to check that, press the "Open Script" button for the script tile and then examine the decompiled script in XSE.
     

    Larvitar170

    Noobie hacker
    66
    Posts
    14
    Years
  • Game: Fire Red
    Type: Both a Person event
    Editor: XSE
    Script: A warp event
    Spoiler:

     
    Status
    Not open for further replies.
    Back
    Top