Hello, I would like to change the battle background music of a trainer. It's a script in PKSV. Is there a command that lets you change the background music?
Here is my Script:
Spoiler:
#dyn 0x800000
#org @start
lockall
faceplayer
setvar 0x4001 0x0
jump @main
#org @main
textcolor BLUE
playsound 0x0 0x11D
reappear 0xA
msgbox @talk
callstd MSG_NOCLOSE
closemsg
applymovement 0xA @walk
pauseevent 0x0
message @question
callstd MSG_YESNO
compare LASTRESULT YES
if == call @pushedyes
compare LASTRESULT NO
if == call @pushedno
trainerbattle 0x9 0x2 0x0 @win @lose
msgbox @speak
callstd MSG_NOCLOSE
closemsg
pause 0xA
playsound 0x0 0x112
compare 0x4001 0x0
if == call @move1
compare 0x4001 0x1
if == call @move2
compare 0x4001 0x2
if == call @move1
compare 0x4001 0x3
if == call @move2
fadedefault
disappear 0xA
setvar 0x601A 0x1
releaseall
end
Are you sure you're pasting the correct offset to your sprite? Remember that #dynamic only tells XSE where to start looking for space, and isn't the offset where it's necessarily going to write the data too. Make sure you have Show Log checked in the Batch Compiler, and when you compile the script, see which offset it gives you.
If that's not the problem, try deleting and re-inserting the overworld in A-Map, or changing the person event #.
after compiling and choosing the offset next to @start, this is what it comes up with:
'-----------------------
#org 0x71A584
lock
faceplayer
msgbox 0x871A58F '"Hi.\nMy name is Richard."
release
end
'---------
' Strings
'---------
#org 0x71A58F
= Hi.\nMy name is Richard.
in game the player appears and turns to look but no message box appears.
That. My friend. Is curious... All I can think of is this:
#dynamic 0xwhateva finds the closest free space to that offset. Most people use #dynamic 0x800000 because the space before that should be left untouched because it isn't free. The actual space that shouldn't be touched is just about below 0x720000 So you could use that as well. But you're below that number, which means that maybe you messed something up? Try using #dynamic 0x800000 or #dynamic 0x720000 and recompile. If that doesn't work, then I guess there's something wrong with your ROM...
after compiling and choosing the offset next to @start, this is what it comes up with:
'-----------------------
#org 0x71A584
lock
faceplayer
msgbox 0x871A58F '"Hi.\nMy name is Richard."
release
end
'---------
' Strings
'---------
#org 0x71A58F
= Hi.\nMy name is Richard.
in game the player appears and turns to look but no message box appears.
I had the same problem, everything would work, except for messages. Applymovement, givepokemon, no problem, but a simple message, it would bleep, and no box. What my problem was, is the wrong version of XSE, I think I had 1.0.1, and next I downloaded v1.1.1 and it worked, same script, same ROM.
I downloaded 1.0.1 in the first place 'cause the links in HackMews factory did not work, so I googled it. But the correct (for me) version can be found in the diegoisawesome's thread somewhere, I posted it too a while ago. Search that thread for the words XSE or something....
-I'm new to scripting and this is my first superscript
-first do i have this laid out right and are there any problems with it.
when you step on the event a sprite is supposed to flicker a little then appear, someone talks then an exclamation mark appears over another sprite, a lot more talking, then they all walk into a building and it fades the screen and it warps somewhere else.
#org @1
= ???: Pardon me. You wouldn’t\nhappen to know where I could find\lLANCE the DRAGON master, would\lyou?\p\v\h01: …Dad? Can you come\noutside\lreally quick?\p???: Erm, that won’t be\nnecessary. All I need is too…
#org @2
= LANCE: DOCTOR…!
#org @move2
#raw 0x65
#org @3
= \v\h01: DOCTOR? Doctor who?\pLANCE: I’ll explain later.\pDR.: Actually, I think I ought to\nexplain myself. Now, what is your\lname?\p\v\h01: \v\h01, Mr.-- Erm, DR.\nDR.: Excellent. And your father\lis LANCE?\p\v\h01: Well, yeah.\nDR.: Is that so? Well, you see,\lyour father and I met quite a\lwhile ago, back before he even\ljoined the Elite Four, and,\llogically, before you were born.\lI found him while he was training\lto take on the PKMN League, and\ltook him under my wing as we\ljoined to defeat Team Glacier,\lwho aimed to freeze the planet of\lBarcelona. All of that practice\lagainst Ice, his sole weakness,\lhelped him to dominate the\lLeague, which is why he’s who he\lis now. That was a pretty crazy\ladventure, was it not?\pLANCE: It certainly was, but\nthat’s not why you’re here, is it?
#org @4
= DR.: …No, it’s not. There is a\nsinister team that I am tracking\ldown that goes by the name of\lRagnarok. They’ve been working on\la highly secretive plan for\lyears, and I’ve been tracking\lthem.\pLANCE: How secretive?\pDR.: Did you know they existed\nuntil now?\pLANCE: No Idea.\pDR.: Then you probably don’t know\nthat they caused the premature\leruption of Cinnibar Island’s\lvolcano, and used high-pitch\lfrequency airwaves to drive the\lGyarados, who protect the region,\lto flood the Power Plant, cutting\loff the power to the entire\lregion, allowing them to bring it\lunder its control.\pLANCE: …WHAT!?
#org @5
= \v\h01: We can’t let that happen!\pDR.: No, we cannot. But while it\nseems that they are just aiming\lfor world domination, there\lexists an ulterior motive. Are\lyou aware of MEWTWO?\l\v\h01: I’ve heard legends of it,\lbut I’m not too familiar\lotherwise…\pDR.: It’s not a legend. It\nexists. And everything they’ve\ldone is leading up to it. But for\lnow, that’s more or less\lirrelevant. What’s important now\lis that we stop them from\lcompleting the preliminary stage\lof their plot.\pLANCE: Right. What’s your plan,\nDOCTOR?\pDR.: As it happens, I was hoping\nyou’d have a child. This time, I\lneed \v\h01‘s help.\pLANCE: Hold on a minute, -[HERO]-\njust got a PKMN. I’m not certain\lI want to let you pull -[HERO]- into\lthis if it’s truly as bad as it\lsound, which it likely does.\pDR.: Nonsense! Really, the\nconditions could not be more\lperfect for \v\h01. You know, you\lweren’t that much older than him\lwhen I met you.
@org @6
= LANCE: I was 19. \v\h01‘s just not\n16. It was a foolish idea for me\lto go along with you that\lhappened to turn out perfectly,\lbut I can’t trust things to be so\lperfect twice in a row, and I\ldon’t think you can guarantee\lthat nothing will happen to\l\v\h01.\pDR.: Now, really, LANCE. You’re\nhurting my feelings! Do you\lreally think I would ever let\lanything happen to \v\h01? Things\lturned out well for you because I\lwas with you every step of the\lway. How can you expect me to do\lany less for \v\h01?\pLANCE: …I don’t know, DOCTOR.\n\v\h01: I do.\pLANCE: \v\h01?\p\v\h01: If this guy’s the reason\nyou became a Master and a\lChampion, then I want to go with\lhim, too. Besides, it can’t be\lthat hard, can it?\pLANCE: (sigh)… Neither of you are\ngoing to let up about this, are\lyou?\p\v\h01: Nope.\nDR.: Not as long as the world is\lin danger.
@org @7
= LANCE: …Alright. But, \v\h01, I\nneed you go talk to your mother\labout this. DOCTOR, would you\lmind coming in as well?\pDR.: Not at all, old friend. Not\nat all.
-I'm new to scripting and this is my first superscript
-first do i have this laid out right and are there any problems with it.
when you step on the event a sprite is supposed to flicker a little then appear, someone talks then an exclamation mark appears over another sprite, a lot more talking, then they all walk into a building and it fades the screen and it warps somewhere else.
#org @1
= ???: Pardon me. You wouldn’t\nhappen to know where I could find\lLANCE the DRAGON master, would\lyou?\p\v\h01: …Dad? Can you come\noutside\lreally quick?\p???: Erm, that won’t be\nnecessary. All I need is too…
#org @2
= LANCE: DOCTOR…!
#org @move2
#raw 0x65
#org @3
= \v\h01: DOCTOR? Doctor who?\pLANCE: I’ll explain later.\pDR.: Actually, I think I ought to\nexplain myself. Now, what is your\lname?\p\v\h01: \v\h01, Mr.-- Erm, DR.\nDR.: Excellent. And your father\lis LANCE?\p\v\h01: Well, yeah.\nDR.: Is that so? Well, you see,\lyour father and I met quite a\lwhile ago, back before he even\ljoined the Elite Four, and,\llogically, before you were born.\lI found him while he was training\lto take on the PKMN League, and\ltook him under my wing as we\ljoined to defeat Team Glacier,\lwho aimed to freeze the planet of\lBarcelona. All of that practice\lagainst Ice, his sole weakness,\lhelped him to dominate the\lLeague, which is why he’s who he\lis now. That was a pretty crazy\ladventure, was it not?\pLANCE: It certainly was, but\nthat’s not why you’re here, is it?
#org @4
= DR.: …No, it’s not. There is a\nsinister team that I am tracking\ldown that goes by the name of\lRagnarok. They’ve been working on\la highly secretive plan for\lyears, and I’ve been tracking\lthem.\pLANCE: How secretive?\pDR.: Did you know they existed\nuntil now?\pLANCE: No Idea.\pDR.: Then you probably don’t know\nthat they caused the premature\leruption of Cinnibar Island’s\lvolcano, and used high-pitch\lfrequency airwaves to drive the\lGyarados, who protect the region,\lto flood the Power Plant, cutting\loff the power to the entire\lregion, allowing them to bring it\lunder its control.\pLANCE: …WHAT!?
#org @5
= \v\h01: We can’t let that happen!\pDR.: No, we cannot. But while it\nseems that they are just aiming\lfor world domination, there\lexists an ulterior motive. Are\lyou aware of MEWTWO?\l\v\h01: I’ve heard legends of it,\lbut I’m not too familiar\lotherwise…\pDR.: It’s not a legend. It\nexists. And everything they’ve\ldone is leading up to it. But for\lnow, that’s more or less\lirrelevant. What’s important now\lis that we stop them from\lcompleting the preliminary stage\lof their plot.\pLANCE: Right. What’s your plan,\nDOCTOR?\pDR.: As it happens, I was hoping\nyou’d have a child. This time, I\lneed \v\h01‘s help.\pLANCE: Hold on a minute, -[HERO]-\njust got a PKMN. I’m not certain\lI want to let you pull -[HERO]- into\lthis if it’s truly as bad as it\lsound, which it likely does.\pDR.: Nonsense! Really, the\nconditions could not be more\lperfect for \v\h01. You know, you\lweren’t that much older than him\lwhen I met you.
@org @6
= LANCE: I was 19. \v\h01‘s just not\n16. It was a foolish idea for me\lto go along with you that\lhappened to turn out perfectly,\lbut I can’t trust things to be so\lperfect twice in a row, and I\ldon’t think you can guarantee\lthat nothing will happen to\l\v\h01.\pDR.: Now, really, LANCE. You’re\nhurting my feelings! Do you\lreally think I would ever let\lanything happen to \v\h01? Things\lturned out well for you because I\lwas with you every step of the\lway. How can you expect me to do\lany less for \v\h01?\pLANCE: …I don’t know, DOCTOR.\n\v\h01: I do.\pLANCE: \v\h01?\p\v\h01: If this guy’s the reason\nyou became a Master and a\lChampion, then I want to go with\lhim, too. Besides, it can’t be\lthat hard, can it?\pLANCE: (sigh)… Neither of you are\ngoing to let up about this, are\lyou?\p\v\h01: Nope.\nDR.: Not as long as the world is\lin danger.
@org @7
= LANCE: …Alright. But, \v\h01, I\nneed you go talk to your mother\labout this. DOCTOR, would you\lmind coming in as well?\pDR.: Not at all, old friend. Not\nat all.
Could you maybe share what goes wrong? But here are a few mistakes, the fixes are in bold
Spoiler:
Code:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x800
if 0x1 goto @done
applymovement 0x03 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0x04 @move2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x06 @move3
waitmovement 0x0
msgbox @3 0x6
msgbox @4 0x6
mshbox @5 0x6
mshbox @6 0x6
mshbox @7 0x6
fadescreen 0x1
warp 0x3 0x1 0x0 0x0 0x0
release
end
#org @done
release
end
#org @move
#raw 0x60
#raw 0x61
#raw 0x60
#raw 0x61
#raw 0x60
#raw 0x61
#raw 0x60
#raw 0x61
#raw 0x60
#raw 0x61
#raw 0x60
#raw 0xFE
#org @1
= ???: Pardon me. You wouldn’t\nhappen to know where I could find\lLANCE the DRAGON master, would\lyou?\p\v\h01: …Dad? Can you come\noutside\lreally quick?\p???: Erm, that won’t be\nnecessary. All I need is too…
#org @2
= LANCE: DOCTOR…!
#org @move2
#raw 0x65
#raw 0xFE
#org @3
= \v\h01: DOCTOR? Doctor who?\pLANCE: I’ll explain later.\pDR.: Actually, I think I ought to\nexplain myself. Now, what is your\lname?\p\v\h01: \v\h01, Mr.-- Erm, DR.\nDR.: Excellent. And your father\lis LANCE?\p\v\h01: Well, yeah.\nDR.: Is that so? Well, you see,\lyour father and I met quite a\lwhile ago, back before he even\ljoined the Elite Four, and,\llogically, before you were born.\lI found him while he was training\lto take on the PKMN League, and\ltook him under my wing as we\ljoined to defeat Team Glacier,\lwho aimed to freeze the planet of\lBarcelona. All of that practice\lagainst Ice, his sole weakness,\lhelped him to dominate the\lLeague, which is why he’s who he\lis now. That was a pretty crazy\ladventure, was it not?\pLANCE: It certainly was, but\nthat’s not why you’re here, is it?
#org @4
= DR.: …No, it’s not. There is a\nsinister team that I am tracking\ldown that goes by the name of\lRagnarok. They’ve been working on\la highly secretive plan for\lyears, and I’ve been tracking\lthem.\pLANCE: How secretive?\pDR.: Did you know they existed\nuntil now?\pLANCE: No Idea.\pDR.: Then you probably don’t know\nthat they caused the premature\leruption of Cinnibar Island’s\lvolcano, and used high-pitch\lfrequency airwaves to drive the\lGyarados, who protect the region,\lto flood the Power Plant, cutting\loff the power to the entire\lregion, allowing them to bring it\lunder its control.\pLANCE: …WHAT!?
#org @5
= \v\h01: We can’t let that happen!\pDR.: No, we cannot. But while it\nseems that they are just aiming\lfor world domination, there\lexists an ulterior motive. Are\lyou aware of MEWTWO?\l\v\h01: I’ve heard legends of it,\lbut I’m not too familiar\lotherwise…\pDR.: It’s not a legend. It\nexists. And everything they’ve\ldone is leading up to it. But for\lnow, that’s more or less\lirrelevant. What’s important now\lis that we stop them from\lcompleting the preliminary stage\lof their plot.\pLANCE: Right. What’s your plan,\nDOCTOR?\pDR.: As it happens, I was hoping\nyou’d have a child. This time, I\lneed \v\h01‘s help.\pLANCE: Hold on a minute, -[HERO]-\njust got a PKMN. I’m not certain\lI want to let you pull -[HERO]- into\lthis if it’s truly as bad as it\lsound, which it likely does.\pDR.: Nonsense! Really, the\nconditions could not be more\lperfect for \v\h01. You know, you\lweren’t that much older than him\lwhen I met you.
@org @6
= LANCE: I was 19. \v\h01‘s just not\n16. It was a foolish idea for me\lto go along with you that\lhappened to turn out perfectly,\lbut I can’t trust things to be so\lperfect twice in a row, and I\ldon’t think you can guarantee\lthat nothing will happen to\l\v\h01.\pDR.: Now, really, LANCE. You’re\nhurting my feelings! Do you\lreally think I would ever let\lanything happen to \v\h01? Things\lturned out well for you because I\lwas with you every step of the\lway. How can you expect me to do\lany less for \v\h01?\pLANCE: …I don’t know, DOCTOR.\n\v\h01: I do.\pLANCE: \v\h01?\p\v\h01: If this guy’s the reason\nyou became a Master and a\lChampion, then I want to go with\lhim, too. Besides, it can’t be\lthat hard, can it?\pLANCE: (sigh)… Neither of you are\ngoing to let up about this, are\lyou?\p\v\h01: Nope.\nDR.: Not as long as the world is\lin danger.
@org @7
= LANCE: …Alright. But, \v\h01, I\nneed you go talk to your mother\labout this. DOCTOR, would you\lmind coming in as well?\pDR.: Not at all, old friend. Not\nat all.
#org @move3
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0xFE
The waitmovement's aren't necessary, but I'm not sure how you planned the script... So I put them there anyway But take them out if you meant it to not pause. You forgot to end your @move2 and @move3 by using #raw 0xFE. Lock and faceplayer aren't needed, seeing as this is an event tile. Unless this happens when talking to a person, then use them, and put them at the front of the script, check for flags after.
Also, always make sure when using applymovement in scripts to have the following settings at the event tile:
Picture is from diegoisawesome's script tutorial.
If this hasn't fixed your issue, repost with extra details on what goes wrong
ROM:Fire Red
ROM TYPE: BPR
ROM LANGUAGE: E
ROM VERSION: 1.0
My Problem
Im trying to make a applymovement/battle script! Just like the ones when Gary battles you. The problem is that my script is not making the person i call upon to move to me and engage in battle! Instead when I walk on the script tile the game freezes. Below is my script.
'-----------------------
#org 0x7266B2
msgbox 0x87266CB '"Well I have to go, bye."
'-----------
' Movements
'-----------
#org 0x72666F
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 3 'Face Right
#raw E 'Step Left (Slow)
#raw E 'Step Left (Slow)
#raw E 'Step Left (Slow)
#raw E 'Step Left (Slow)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements
Instead when I walk on the script tile the game freezes.
Something seems off about the offsets in your writebytetooffset calls. Why are you writing data directly to those locations?
(Just loaded a FireRed ROM in VBA... According to its memory viewer, nothing exists past 9FF87BF. In fact, if my math is right, 0xC2FFFE11 would only exist in a 3GB ROM!)
Something seems off about the offsets in your writebytetooffset calls. Why are you writing data directly to those locations?
(Just loaded a FireRed ROM in VBA... According to its memory viewer, nothing exists past 9FF87BF. In fact, if my math is right, 0xC2FFFE11 would only exist in a 3GB ROM!)
Well actually thats not where i originally wrote the data to, once i compiled my script it seems to automatically put that...
#org $script
lock
faceplayer
message $intro
$intro 1 = Hello \v\h01, My name is Yesith. I am\nThe best trainer of the whole universe,\pAlso known as.....\na POKEMON MASTER!\pI have been sent from the planet "iY"\nto battle you and see if you are ready\pto be my successor....\nso let us see if you are ready....
boxset 6
checkflag 0x80E
if 0x01 goto $battle
message $not
$not 1 = Sorry...\nBut you are still not ready.\pReturn to me once you have earned all\nof the badges that are of gyms.
boxset 6
release
end
#org $battle
applymovement 0 $pop
$pop 1 ; #binary 0x56 0xFE
pause 0x40
Message $ready
$ready 1 = I see....\nYou are ready to face me in battle as\pyou have earned all of the badges that\nare of gyms.....\pBut it is your decision.....\nAre you ready to battle me?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $sure
message $worthless
$worthless 1 = You are worthless!!\nYou do not deserve to be a pokemon\pmaster!\nI shall leave now...\pAnd never again shall you recieve\nthe oppurtunity.....\pto take my place.....\nPEACE OUT!!
boxset 6
fadescreen 1
removesprite 0
setflag 0x1211
pause 0x10
fadescreen 0
release
end
#org $sure
message $hundred
$hundred 1 = Are you sure you want to battle me?\nCoz all my Pokemon are level 100\pand I have six of them......\nSo tell me...........\pAre you ready??
boxset 5
compare 0x800D 0x0001
if 0x01 goto $ultimate
message $worthless2
$worthless2 1 = You are worthless!!\nYou do not deserve to be a pokemon\pmaster!\nI shall leave now...\pAnd never again shall you recieve\nthe oppurtunity.....\pto take my place.....\nPEACE OUT!!
boxset 6
fadescreen 1
removesprite 0
setflag 0x1211
pause 0x10
fadescreen 0
release
end
#org $ultimate
trainerbattle 0x01 0x00 $see $win $further
$see 1 = I see....so you think you are ready?\nBut I shall be the judge of that!\pLet the battle of the century...Begin!!
$win 1 = You are remarkable!
message $after
$after 1 = I'm leaving now....\nGoing back to my own planet
boxset 6
release
end
#org $further
message $pass
$pass 1 = I see now...\nyou are the chosen one!!!!!\pHereby, you....\nare the new........\pPOKEMON MASTER!!!!!
boxset 6
pause 0x40
message $over
$over 1 = ...................................\pThank god that's over......\nI had it with this formal talk crap!!\pWhy the hell did they even make me\ntalk like this?!!???\pErm.......Anyway, for this epic\nvictory.......you deserve a reward.\pImma give you this Jirachi a'ight??\nYou cool with that??\pCoz that's all I got right now....\nHere ya go!
boxset 6
givepokemon 409 100 0x6D
fanfare 0x13E
waitfanfare
message $gotj
$gotj 1 = You Recieved a Jirachi!\pIf there is no space in your party,\nit will be sent to your storage system
boxset 6
message $leaving
$leaving 1 = I have to go back to planet "iY" now,\nGood luck!!
boxset 6
fadescreen 1
removesprite 0
setflag 0x1211
pause 0x10
fadescreen 0
release
end
There is nothing wrong with the script, but the thing is, i want to do more:
1. Make it so that it's in a different map (after you beat the league, a cave appears and there's a warp tile in the cave which will take you to outer space where you meet him.)
2. Make it so that we are teleported back to right in front of the cave after the battle but the cave will be gone (but if we lost the battle the cave will still be here.)
3. Make a little bleep sound when the exclamation appears.
4. get the option to nickname the jirachi we recieved (i tried but it let's us name the 1st pokemon in our party).
5. Display "the pokemon will be sent to storage" only if there is no space in the party.
6. Make it so that during the battle, the trainer uses his pokemon in an order instead of random.
If it helps......here's the you \tube link to the video of this script:
/watch?v=n2VUxkR6dWo
I'd really appreciate any help....thanks in advance!
__________________
You only live twice. Once when you are born and once when you look death in the face. -- iY
I have a simple problem here. At least, I hope it's simple, otherwise I'm stuck with this glitch.
I've made a script where the player steps on a tile, then walks up, and a msgbox opens, and that's the script. Don't get me wrong, it works perfectly, but there's a small issue.
You see, the tile the player steps on is a warp. So a little arrow shows up when he steps on it. And then the arrow continues to be there until the script is over.
So, is there a way to remove that arrow while the script is still running?
ROM:Fire Red
ROM TYPE: BPR
ROM LANGUAGE: E
ROM VERSION: 1.0
My Problem
Im trying to make a applymovement/battle script! Just like the ones when Gary battles you. The problem is that my script is not making the person i call upon to move to me and engage in battle! Instead when I walk on the script tile the game freezes. Below is my script.
'-----------------------
#org 0x7266B2
msgbox 0x87266CB '"Well I have to go, bye."
'-----------
' Movements
'-----------
#org 0x72666F
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 3 'Face Right
#raw E 'Step Left (Slow)
#raw E 'Step Left (Slow)
#raw E 'Step Left (Slow)
#raw E 'Step Left (Slow)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements
Exactly, it would be useful if you could post your uncompiled script. But, seeing as the script freezes right when you step on it, it might be a much simpler issue. Always when using an applymovement script tile, you should make sure to have the following settings on the tile:
This is a picture from diegoisawesome's script tutorial.
If you have that, then please post your original script!
ROM:Fire Red
ROM TYPE: BPR
ROM LANGUAGE: E
ROM VERSION: 1.0
My Problem
Im trying to make a applymovement/battle script! Just like the ones when Gary battles you. The problem is that my script is not making the person i call upon to move to me and engage in battle! Instead when I walk on the script tile the game freezes. Below is my script.
'-----------------------
#org 0x7266B2
msgbox 0x87266CB '"Well I have to go, bye."
'-----------
' Movements
'-----------
#org 0x72666F
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 3 'Face Right
#raw E 'Step Left (Slow)
#raw E 'Step Left (Slow)
#raw E 'Step Left (Slow)
#raw E 'Step Left (Slow)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements
The reason you're getting writebytetooffset commands at the end of your script is because there is already data at that offset either for another script or something else in the game, and XSE ends up merging the two together.
Basically, it's time to use a new offset, because the script you're writing is too long and there's not enough free space to write it to the current offset. Just use #dynamic and write the first script to a new offset and you should be fine.
Just remember that if you edit a script to make it longer, you might not have the free space needed for the new script. I usually use #remove to erase the old script, then compile the script again with #dynamic and that seems to work well.
Its not just a script you need JPAN's hacked engine wich can be found in Research&Development forum it has a really good readme with explainations.
Actually... you can do it without JPAN's hacked engine, by using 'special 0xCD'. However, using JPAN's engine makes it much easier, because you can set the amount of steps, check the amount of steps and have more than one step counter... But it isn't required
Ok, i set the variables for my script block, and below is my script but instead of getting what i want to happen(an applymovement battle script) the game now resets, any1 able to help me.
#dynamic 0x800000 // USe this at the beginning of every script. When you compile in XSE, copy the offset given next to the @start part, and paste that.
#org @Main
lockall
showsprite 0x9
applymovement 0xFF @move1
applymovement 0x9 @move2 waitmovement 0x0 // You always need waitmovement 0x0
hidesprite 0x9
setvar 0x4050 0x1
trainerbattle 0x0 0x001 0x0 @string1 @string2
msgbox @string3 0x2
releaseall
end // This script will basically display string1 before the battle and string2 at the defeat screen. If the script is interacted with again, string3 will be displayed.
#dynamic 0x800000 // USe this at the beginning of every script. When you compile in XSE, copy the offset given next to the @start part, and paste that.
#org @Main
lockall
showsprite 0x9
applymovement 0xFF @move1
applymovement 0x9 @move2 waitmovement 0x0 // You always need waitmovement 0x0
hidesprite 0x9
setvar 0x4050 0x1
trainerbattle 0x0 0x001 0x0 @string1 @string2
msgbox @string3 0x2
releaseall
end // This script will basically display string1 before the battle and string2 at the defeat screen. If the script is interacted with again, string3 will be displayed.
Ok i fixed the script, but It seems to have the same effect. The game keeps reseting, the only weird thing is that i don't even make it to the script block before it resets.
I think it could have something to do with the setvar? anyone have any suggestions?
Ok i fixed the script, but It seems to have the same effect. The game keeps reseting, the only weird thing is that i don't even make it to the script block before it resets.
I think it could have something to do with the setvar? anyone have any suggestions?
Wait. You don't make it to the script event tile? Check if one of your person event tiles has their behaviour set to hidden. There's multiple, and some of them cause the game to reset, when you get near.
Wait. You don't make it to the script event tile? Check if one of your person event tiles has their behaviour set to hidden. There's multiple, and some of them cause the game to reset, when you get near.
Oh jeeze well lol yea i thought maybe the person event was supposed to be set to hidden, like Professor Oak in pallet town, hmm let me fix the person event and i will get back to you on that.
Oh jeeze well lol yea i thought maybe the person event was supposed to be set to hidden, like Professor Oak in pallet town, hmm let me fix the person event and i will get back to you on that.
There's three different Hidden's, not all of them reset the game, I thought. Try them