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

[Archive] Script help thread

Status
Not open for further replies.

Vrai

can you feel my heart?
  • 2,896
    Posts
    15
    Years
    • Age 29
    • Seen Oct 24, 2022
    Nowhere in the script did you use "lock" or "faceplayer"

    Is that really needed? I used boxset 0x2, which gives the same effect as lock and faceplayer. Do I need to have them in a person script altogether?

    Edit: I guess I just type too slow.
     

    machomuu

    Stuck in Hot Girl Summer
  • 10,507
    Posts
    16
    Years
    Is that really needed? I used boxset 0x2, which gives the same effect as lock and faceplayer. Do I need to have them in a person script altogether?

    Edit: I guess I just type too slow.
    I think I found it
    Spoiler:

    You don't need the release at @start, because it's all commanding what the script should n do next, it hasn't said anything until after @start so it releases the script before it can get to the actual script or even acknowledge you.
     

    Sierraffinity

    Desperately trying to retire from ROM hacking
  • 1,069
    Posts
    16
    Years
    Alright, everybody. I made a pretty big script that is supposed to define a random thing to talk about, and then talk about it. When I put the script on A-Map, and then talk to the person in the emulator, nothing happens. What did I do wrong?

    Here's the script...
    Spoiler:

    Be warned, it's quite long.
    Fixed, if you still have some trouble with it after your fix.
     

    Vrai

    can you feel my heart?
  • 2,896
    Posts
    15
    Years
    • Age 29
    • Seen Oct 24, 2022
    Then only Vrai will declare the winner :badsmile:!
    Good luck on Opal by the way.

    Well, I guess I'd be the winner. :)

    Before either of you posted, I edited my post to say that I magically fixed it. Hehe.

    Anyways, I got another job for you peoples.

    I have a trainerbattle script that I want to continue after the battle. But, as soon as the battle is over, the script ends. How could I make that work?

    Here's the script:
    Spoiler:
     

    Sierraffinity

    Desperately trying to retire from ROM hacking
  • 1,069
    Posts
    16
    Years
    Well, I guess I'd be the winner. :)

    Before either of you posted, I edited my post to say that I magically fixed it. Hehe.

    Anyways, I got another job for you peoples.

    I have a trainerbattle script that I want to continue after the battle. But, as soon as the battle is over, the script ends. How could I make that work?

    Here's the script:
    Spoiler:
    That's how it works for my game. It should work for you.
     

    Vrai

    can you feel my heart?
  • 2,896
    Posts
    15
    Years
    • Age 29
    • Seen Oct 24, 2022
    Erm, unless I'm doing this wrong...

    I have this script:

    Spoiler:


    Well, it's part of a script.

    The script works all fine and dandy, but then, it comes up again every time I step on the tile. Is there something I'm forgetting?
     

    machomuu

    Stuck in Hot Girl Summer
  • 10,507
    Posts
    16
    Years
    Erm, unless I'm doing this wrong...

    I have this script:

    Spoiler:


    Well, it's part of a script.

    The script works all fine and dandy, but then, it comes up again every time I step on the tile. Is there something I'm forgetting?

    Spoiler:


    and make sure you put in the person event number and not the person number
     

    Vrai

    can you feel my heart?
  • 2,896
    Posts
    15
    Years
    • Age 29
    • Seen Oct 24, 2022
    I already have the #dynamic b\c its part of another script

    And it shouldn't have anything to do with the person number.
     

    Vrai

    can you feel my heart?
  • 2,896
    Posts
    15
    Years
    • Age 29
    • Seen Oct 24, 2022
    No, you put applymovement 0x3, meaning that must be a persons event number

    Graarg.

    The script works fine. Don't pay any attention to that. The problem is, is that even after the whole script is done, this part continues after I step on the tile. I think it might have something to do with the flags, but I'm not sure.
     

    Teddiursa™

    Never Give up
  • 185
    Posts
    16
    Years
    Graarg.

    The script works fine. Don't pay any attention to that. The problem is, is that even after the whole script is done, this part continues after I step on the tile. I think it might have something to do with the flags, but I'm not sure.


    Vrai.. I Tested that Rival Script .. And when i win the battle,
    The Script Froze on me. This is weird because for you it
    just happens over and over..


    Here it is:

    #org @start
    checkflag 0x200
    if 0x1 goto @end
    applymovement 0xFF @move3
    waitmovement 0x0
    applymovement 0x03 @move
    waitmovement 0x0
    msgbox @before
    boxset 0x2
    trainerbattle 0x1 0x001 0x0 @before2 @after
    setflag 0x200
    release
    end

    #org @end
    release
    end

    #org @later
    msgbox @beaten
    boxset 0x2
    applymovement 0x03 @move2
    waitmovement 0x0
    #raw 0x53 0x03 0x00
    applymovement 0xFF @move3
    waitmovement 0x0
    msgbox @player
    boxset 0x2
    fanfare 0x13E
    msgbox @youreceived
    boxset 0x2
    waitfanfare
    #raw 0x68
    setflag 0x829
    release
    end

    Im not sure, but i think its here somwhere..
     

    Sierraffinity

    Desperately trying to retire from ROM hacking
  • 1,069
    Posts
    16
    Years
    Erm, unless I'm doing this wrong...

    I have this script:

    Spoiler:


    Well, it's part of a script.

    The script works all fine and dandy, but then, it comes up again every time I step on the tile. Is there something I'm forgetting?
    Now that should work. Remember: trainerbattle almost always ends the script right there and doesn't continue. That's why the script loops and the flag doesn't set.
     

    0m3GA ARS3NAL

    Im comin' home...
  • 1,816
    Posts
    16
    Years
    Now that should work. Remember: trainerbattle almost always ends the script right there and doesn't continue. That's why the script loops and the flag doesn't set.

    Just to clarify to the people who don't understand trainerbattle...

    trainerbattle 0x0 [trainer#] 0x0 [challenge text] [win text] This form of trainer battle will end the script

    trainerbattle 0x1 [trainer#] 0x0 [challenge text] [win text] [continued script pointer]
    This will allow continuation of the script

    Example:
    #dynamic 0x800000

    #org @start
    lock
    faceplayer
    trainerbattle 0x1 134 0x0 @iwillwin @darn @continue
    end

    #org @continue
    message @greatbattle
    boxset 6
    release
    end

    #org @iwillwin
    = I'm going to win!

    #org @darn
    = oh darn, I lost!

    #org @greatbattle
    = that was a great\nbattle [PLAYER].
     

    score_under

    Inactive; Former ROM hack tool author, ❤️
  • 526
    Posts
    18
    Years
    Code:
    #raw 0x53 0x03 0x00
    This won't do anything except from make it look prettier, but...
    XSE has a command "hidesprite", which does this for you.
    "hidesprite 3" instead of "#raw 0x53 0x03 0x00".

    0m3GA AR$3NAL's solution should work fine, but it bugs me when people use needless #RAW commands, making the script editor look worse than it really is ;)
     

    HackMew

    Mewtwo Strikes Back
  • 1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    Thanks, it works perfectly.

    You're welcome.


    Remember: trainerbattle almost always ends the script right there and doesn't continue. That's why the script loops and the flag doesn't set.

    Absolutely not. If you don't trust me, just decompile some trainerbattle scripts and watch how they work in-game.


    The script works all fine and dandy, but then, it comes up again every time I step on the tile. Is there something I'm forgetting?

    Yes. The fact that using a trainerbattle 0x1 requires you to use 3 pointers, and not 2 two as you did.
    Next version of XSE won't even allow you to compile it like that.

    The syntax for trainer battle 0x1 is the following:

    Code:
    trainerbattle 0x1 [TrainerNo.] [Reserved (0x0 will be fine 99.99% of the times)] [BeforeText] [AfterText] [AfterScript]

    An easy fix to your script would be to change the trainerbattle type from 0x1 to 0x0:

    Code:
    trainerbattle 0x0 [TrainerNo.] [Reserved (same as above)] [BeforeText] [AfterText]
     
    Last edited:

    Vrai

    can you feel my heart?
  • 2,896
    Posts
    15
    Years
    • Age 29
    • Seen Oct 24, 2022
    You're welcome.




    Absolutely not. If you don't trust me, just decompile some trainerbattle scripts and watch how they work in-game.




    Yes. The fact that using a trainerbattle 0x1 requires you to use 3 pointers, and not 2 two as you did.
    Next version of XSE won't even allow you to compile it like that.

    The syntax for trainer battle 0x1 is the following:

    Code:
    trainerbattle 0x1 [TrainerNo.] [Reserved (0x0 will be fine 99.99% of the times)] [BeforeText] [AfterText] [AfterScript]
    An easy fix to your script would be to change the trainerbattle type from 0x1 to 0x0:

    Code:
    trainerbattle 0x0 [TrainerNo.] [Reserved (same as above)] [BeforeText] [AfterText]

    *headsmack*

    Thanks, HackMew.

    EDIT: Not sure if this is a scripting problem or a rom problem..

    Sorry for making you guys busy, but I have a script that involves a character. Here's the script -

    Spoiler:


    But you see, that isn't the problem. The problem is, after the script, when I talk to him, he is supposed to have a normal talking script, shown below.

    Spoiler:


    But he actually comes up with this script, which was actually assigned to another person on the map.

    Spoiler:


    I made sure that they were assigned to different offsets, and the script that Brendan is using actually works for the person it was intended for. What did I do wrong?
     
    Last edited:
    Status
    Not open for further replies.
    Back
    Top