#dynamic 0x800000
#org @start
checkflag 0x1014
if 0x1 goto @party
releaseall
end
#org @party
lockall
playsong 0x111 0x1
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0xFF
setvar 0x4013 0x1
releaseall
end
#org @move
#raw 0x10
#raw 0xFE
#org @1
= [green_fr]\v\h01: Oh great.. I overslept a\nbit.\lIt seems they started the party\lwithout me.
Can anyone help me out with this level script? I just can't get it to work.
It freezes while I enter the map if flag 0x1014 has NOT been set.
If it has been set, the script runs.
I want this script to activate as soon as I enter the room out of a warp, this is a level script.
I put it [02] in AM.
I also would like to put more flagged scripts into this. Like after the party (and after coming back later) it should trigger something new. Do I have to put this in the same script? Or should I use another new script and add a new [02] in AM?
Code:#dynamic 0x800000 #org @start checkflag 0x1014 if 0x1 goto @party releaseall end #org @party lockall playsong 0x111 0x1 msgbox @1 0x6 applymovement 0xFF @move waitmovement 0xFF setvar 0x4013 0x1 releaseall end #org @move #raw 0x10 #raw 0xFE #org @1 = [green_fr]\v\h01: Oh great.. I overslept a\nbit.\lIt seems they started the party\lwithout me.
#org @start
checkflag 0x1014
if 0x1 goto @party
end
Why can't you use dynamic offsets? You're using them like this, right? (for emerald)
Honestly I have no clue about your problem, I think it could be possible you accidentally overwrote something using manual offsets. If you're not being careful this can happen.Code:#dynamic 0xE3CF64 #org @start (rest of script)
#raw 00FF
#ORG: data
-> @sign <-> 0x9C1B9E (0x8 bytes)
-> @text <-> 0x9C1B9E (0x5A bytes)
And, uh, are you using the recent version of XSE? XSE 1.1.1?
For some reason, making a script occasionally causes other scripts in the area to glitch out.
For example:
Script 1: (Girl NPC) Oh, hi there.
Script 2: (Sign) Something City
What happens:
Script 1: Oh, hi there.
Script 2: Som,hi there.
Sorry I can't give a real script for it, it's done this at least 4 times now and I'm getting tired of repeatedly changing offsets until it finds ones that work, even though I just changed an NPC's script without touching the offset. It did this first with a Girl NPC and a Sign, then later on two sign scripts, now it's doing it on two different maps of the same house.
At present I use PKSV rather than XSE. Does it run on Windows 2000?
Your scripts are overlapping. You shouldn't really edit existing scripts unless you know what you're doing - use dynamic offsets to get the new text pointers into free space.
Hmm... have you tried removing the "releaseall" command from your beginning thing so all it does is check for the flag and then if it isn't set, ends?
Like this:
Code:#org @start checkflag 0x1014 if 0x1 goto @party end
Couple of unrelated notes:
1. That flag (1014) is awfully high, setting flags as high as that can cause bad eggs to appear in your pokemon box or mess up certain parts of your hack. Iirc, for fire red the list of safe flags you can and should use is from 200-2FF.
2. Your level script doesn't activate until whatever variable you put in for it on advance map is set to the value that you gave it. So if you used var: 4013 and value: 0 (which I'm assuming you did), as long as your variable 4013 has any value that's not 0, your level script won't activate. In essence, the "value" part just means the number the variable is set at that will 'turn on' your script.
As an example, setting the value to 1 in a-map would mean that the level script won't activate until the variable is set to 1. You can bypass your entire "checkflag" thing by leaving the variable at 0 and whenever you feel is ready, you can just slip in "setvar 0x4013 0x1" to a script that the player would activate before they enter your level-scripted area, which will 'turn on' your level script so when you enter the area it will activate.
This will also help you with your question about having more scripts like this on the same map, since all you have to do is have different values for 4013 for each script and be careful about setting the value. For instance, if you have two level scripts both using 4013 and one has the value of 0x1 and 0x2, going through the first script and setting the value to 0x2 at the end will turn off the first one but also turn on the second one by accident. So just be careful about which variables you set and how they'll affect other level scripts/scripts you have in other areas.
Hopefully I made sense in my explanation. :D
#dynamic 0x800000
#org @start
lockall
playsong 0x111 0x0
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0xFF
clearflag 0x9FF
setflag 0x1014
setvar 0x4013 0x0
releaseall
end
#org @move
#raw 0x10
#raw 0xFE
#org @song
playsong 0x133 0x0
releaseall
end
#org @1
= [green_fr]\v\h01: Oh great.. I overslept a\nbit.\lIt seems they started the party\lwithout me.
Hi, I use XSE for script and it works flawlessly except for one thing :
When I use dynamic offsets it always write the 00's bytes. Bad thing, so every time I use dynamic I have to select a bunch of byte and turn them to 00, which is pretty annoying.
Is there a way to make it seeking for FF bytes rather than 00 ?
Hi, I use XSE for script and it works flawlessly except for one thing :
When I use dynamic offsets it always write the 00's bytes. Bad thing, so every time I use dynamic I have to select a bunch of byte and turn them to 00, which is pretty annoying.
Is there a way to make it seeking for FF bytes rather than 00 ?
#freespace 0xff
Yes there is: checksound.Is there a command like waitfanfare, but instead for sounds?
Is there any command to wait on a warp? lock won't do it as the script is released before it finishes warping.
Thanks~
Waitstate will wait until the warp is completed (You should always use this after warps just to prevent potential freezes)
However, it'll be immediately after the warp is executed, so pause would be good if you're waiting via time.