- 241
- Posts
- 12
- Years
- USA
- Seen Mar 25, 2016
try
instead of MOVE_PLAYER.Code:... applymovement 0xFF @up waitmovement 0x0 ...
Welp that did it! Thanks! It's really weird considering when you pull it back open in XSE it shows MOVE_PLAYER again.
try
instead of MOVE_PLAYER.Code:... applymovement 0xFF @up waitmovement 0x0 ...
Game: Pokémon FireRed v1.0
Script type: Trigger
Description: This is supposed to stop you from leaving without a Pokémon. I made it to check if you have the Pokémon menu activated (meaning you have a Pokémon with you), and if you don't, a message will pop up and tell you to go back.
However, I can't seem to get it to work in the game itself. The character just walks over a tile and doesn't react to it whatsoever. Can anyone see the problem?
Spoiler:#dynamic 0x8004B6
#org @idiot
lock
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @3
msgbox @2 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end
#org @3
msgbox @3a 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end
#org @done
release
end
#org @move
#raw 0x13
#raw 0xFE
#org @1
= [black_fr]There are wild POKéMON about\nand you don't have your own\lPOKéMON.\pYou wouldn't want to go out there\nand die, now would you?
#org @2
= [black_fr]Good. Then let's turn back.
#org @3a
= [black_fr]No you don't\pNow, turn around and walk back.
I can see multiple problems already. There are many places where you have either forgotten or just ignored to put release and end. You've also forgotten to out wait movement 0x0 which is to let the applymovement actually happen. My edits are in red.
Another problem you should check out is the actual script tile itself. Look up KarateKid's tutorial on vars, flags and script tiles to understand more about them.
Greetings, I am trying to script a level check in my game for a Battle Lodge.
It freezes at this part: I am checking to see if you have any Pokemon under level 20.
-----
![]()
-----
Here is my script. The error PKSV says that "buffernumber" isn't a command!
But it still compiles.
----------
Spoiler:#dyn 0x800000
#org @offset
'------------------------------------
'Battle Lodge 1 Entry
'------------------------------------
checkflag 0x163
if true jump :continuation
msgbox @begintext
callstd msg_yesno
compare lastresult no
if == jump @ansno
msgbox @text-B
callstd msg_noclose
checkitemspaceinbag 0x171 0x1
compare lastresult 0x0
if false jump @nospace
copyvarifnotzero 0x8000 0x171
copyvarifnotzero 0x8001 0x1
callstd msg_obtain
setflag 0x163
:continuation
msgbox @begintext
callstd msg_yesno
compare lastresult no
if == jump @ansno
msgbox @scanpokemon
callstd msg_noclose
sound 0x4
callasm 0x88F9001
buffernumber 0x0 lastresult
msgbox @testtext
callstd msg_noclose
release
end
#org @end
msgbox @endtext
callstd msg_faceplayer
release
end
#org @ansno
msgbox @notext
callstd msg_faceplayer
release
end
#org @begintext
= Hello sir, would you like to sign\nup for Battle Lodge 1?
#org @text-B
= Very nice kid. This seems to be your\nfirst time here.\lLet me get you set up.
#org @scanpokemon
= Very nice kid. Now we are going\nto scan your Pok\emon to see if they\lare qualified for Battle Lodge 1.
#org @notext
= Okay, have a nice day.
#org @testtext
= Listen up kid. Your highest level\nPok\emon is \v\h02.
----- I got it to work by substituting "buffernumber" with storevar" in PKSV
Which leads mw to my next question, how would I be able to compare the result to a number?
For instance, knowing that the highest level on my team is 29, the highest can only be 19
_in order to be allowed into the Battle Lodge.
In the script, I wrote "What do I put here?" to make it easier to understand my question.
----------
Spoiler:#dyn 0x800000
#org @offset
'------------------------------------
'Battle Lodge 1 Entry
'------------------------------------
checkflag 0x163
if true jump :continuation
msgbox @begintext
callstd msg_yesno
compare lastresult no
if == jump @ansno
msgbox @text-B
callstd msg_noclose
checkitemspaceinbag 0x171 0x1
compare lastresult 0x0
if false jump @nospace
copyvarifnotzero 0x8000 0x171
copyvarifnotzero 0x8001 0x1
callstd msg_obtain
setflag 0x163
:continuation
msgbox @begintext
callstd msg_yesno
compare lastresult no
if == jump @ansno
msgbox @scanpokemon
callstd msg_noclose
sound 0x4
'---------------------------------------------------------------------
callasm 0x88F9001
storevar 0x0 lastresult
What should I put here?
'---------------------------------------------------------------------
msgbox @allowedtext
callstd msg_noclose
release
end
#org @notallowed
msgbox @notallowedtext
callstd msg_noclose
release
end
#org @ansno
msgbox @ansnotext
callstd msg_noclose
release
end
#org @nospace
msgbox @nospacetext
callstd msg_noclose
release
end
#org @begintext
= Hello sir, would you like to sign\nup for Battle Lodge 1?
#org @text-B
= Very nice kid. This seems to be your\nfirst time here.\lLet me get you set up.
#org @scanpokemon
= Very nice kid. Now we are going\nto scan your Pok\emon to see if they\lare qualified for Battle Lodge 1.
#org @notext
= Okay, have a nice day.
#org @notallowedtext
= Listen up kid. Your highest level\nPok\emon is \v\h02.\pYou have to have Pok\emon that\nare under the level of 20.
#org @nospacetext
= You have no space!
#org @allowedtext
= Please come with me.
Hello everyone. I have a question regarding berry trees. I know how to write a script that gives the player a berry when he/she interacts with a tree, but is there a way to make it so that, after a given period of time, the berry returns to the tree and the player can obtain it again?
I realize that this could be done by implementing a day-and-night system, which would require ASM... but would I need to use a day-and-night system or ASM at all? Is there another way?
Got a little problem with the following script. Instead of the OW walking upto the player and displaying the text, it almost instantaniously begins as the player steps on the tile with no movement from the OW.
![]()
Spoiler:
#dynamic 0x800000
#org @start
lockall
applymovement 0x12 @move
waitmovement 0x0
msgbox @msg1 0x6
trainerbattle 0x3 0x2 0x0 @defeat
msgbox @msg2 0x6
applymovement 0x12 @move2
waitmovement 0x0
setflag 0x1490
setvar 0x5051 0x1
hidesprite 0x12
releaseall
end
#org @move
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x01
#raw 0x66
#raw 0xFE
#org @move2
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE
#org @msg1
= ?
#org @msg2
= ?
#org @defeat
= ?
I see nothing wrong other then the fact that those raw's are for firered, that picture looks like ruby/emerald, so i'm assuming you put in the wrong raw's.
Try this:
Spoiler:#dynamic 0x800000
#org @start
lockall
applymovement 0x12 @move
waitmovement 0x0
msgbox @msg1 0x6
trainerbattle 0x3 0x2 0x0 @defeat
msgbox @msg2 0x6
applymovement 0x12 @move2
waitmovement 0x0
setflag 0x1490
setvar 0x5051 0x1
hidesprite 0x12
releaseall
end
#org @move
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x0B
#raw 0x01
(No happy raw)
#raw 0xFE
#org @move2
#raw 0x08
#raw 0x08
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0xFE
#org @msg1
= ?
#org @msg2
= ?
#org @defeat
= ?
If you were hacking ruby the raws you were using were delays,
for more info on applymovement check out diegoisawesome's mega huge script tut here.
I see nothing wrong other then the fact that those raw's are for firered, that picture looks like ruby/emerald, so i'm assuming you put in the wrong raw's.
Try this:
Spoiler:#dynamic 0x800000
#org @start
lockall
applymovement 0x12 @move
waitmovement 0x0
msgbox @msg1 0x6
trainerbattle 0x3 0x2 0x0 @defeat
msgbox @msg2 0x6
applymovement 0x12 @move2
waitmovement 0x0
setflag 0x1490
setvar 0x5051 0x1
hidesprite 0x12
releaseall
end
#org @move
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x0B
#raw 0x01
(No happy raw)
#raw 0xFE
#org @move2
#raw 0x08
#raw 0x08
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0xFE
#org @msg1
= ?
#org @msg2
= ?
#org @defeat
= ?
If you were hacking ruby the raws you were using were delays,
for more info on applymovement check out diegoisawesome's mega huge script tut here.
Hello everyone, I'm new to hacking, I'm here because I have a little problem with a value of the "applymovement" command.
Here are the values to do the character running, taken from diegoisawesome tutorial (which is really awesome) :
Spoiler:#raw 0x3D = Slide Running on Right Foot (Down)
#raw 0x3E = Slide Running on Right Foot (Up)
#raw 0x3F = Slide Running on Right Foot (Left)
#raw 0x40 = Slide Running on Right Foot (Right)
#raw 0x41 = Slide Running on Left Foot (Down)
#raw 0x42 = Slide Running on Left Foot (Up)
#raw 0x43 = Slide Running on Left Foot (Left)
#raw 0x44 = Slide Running on Left Foot (Right)
My problem is, with the value 0x44 my character goes down instead of right.
Does anyone could help me with this ?
Here is a little script for those who want to check by themselves :
Spoiler:#dynamic 0xXXXXXX
#org @start
lockall
applymovement 0xFF @move
waitmovement 0x0
releaseall
end
#org @move
#raw 0x44
#raw 0x44
#raw 0x44
#raw 0x44
#raw 0x44
#raw 0xFE
Thanks in advance and sorry for my poor english.
Edit :
I'm using a clean fire red rom and my XSE version is 1.11.
After compiling, the raw command appears in the script as :
#raw 0x44 'Slide Running on Left Foot (Right)
but it doesn't match with the character behaviour in game.
Never mind, I figured out that using only thoses raws :pretty sure you can't use those raws. those arent the accurate descriptions of them and do not work.
...
I'm trying to do a script based off getplayerpos where if you're on the spot above the OW and click on him, it'll check your position and say this is up and if you are below him he will say this is down. However, script not working. Anyone see whats wrong?
Spoiler:#org @event
getplayerpos 0x4000 0x4001
compare 0x4000 0x3B
if 0x1 goto @next
release
end
#org @next
compare 0x4001 0x13
if 0x1 goto @check
compare 0x4001 0x15
if 0x1 goto @check2
release
end
#org @check
msgbox @talk 0x6
release
end
#org @check2
msgbox @talk2 0x6
release
end
#org @talk2
= This is down
#org @talk
= This is up
Never mind, I figured out that using only thoses raws :
Spoiler:#raw 0x3D = Slide Running on Right Foot (Down)
#raw 0x3E = Slide Running on Right Foot (Up)
#raw 0x3F = Slide Running on Right Foot (Left)
#raw 0x40 = Slide Running on Right Foot (Right)
give a perfectly smooth running animation.
For your script, I suggest to verify that you have put the right coordinates to compare, or maybe using others variables to store the values, since safe range is considered from 4011, but i really don't know if it matters...
Or maybe a simple mistake like the offset indication or a var to add if you check with a script event.