- 3
- Posts
- 9
- Years
- germany
- Seen Jan 12, 2017
Hi there
Since I'm out of ideas how to solve the problem I have, I have to ask people who are more familiar with scripting.
So what I'm trying to is:
I want to have a door in the Pokécenters with a NPC in front of it who wants you to answer "Yes" a few times before it walk aside and lets you pass and you warp into the room "behind" it. So far it works.
But when I walk back into the room I want the NPC still to stay on the side so I don't walk into it. Then the player is supposed to make 2 steps down and the NPC to walk back into its standard position so I can talk to it again and start everything again.
And I seem to be unable to do that part of the script. I read a lot of tutorials about playback/levelscript stuff, but I still don't get it to work. Either the screen goes black or the message "The slope makes it hard to steer." gets triggered again and again when I walk from the town into the Pokécenter, which belongs to NPC no. 9 (10) on Route 17. It's the one you get after a refight. Mostly the message is the problem.
That's the script when I talk to the NPC, the one that's working so far:
#dynamic 0x8740000
#org @main
lock
faceplayer
msgbox @text1
callstd 0x5
compare LASTRESULT 0x0
if b_true goto @no
msgbox @text2
callstd 0x5
compare LASTRESULT 0x0
if b_true goto @no
msgbox @text3
callstd 0x5
compare LASTRESULT 0x0
if b_true goto @no
msgbox @text4
callstd 0x6
compare PLAYERFACING 0x2
if 0x1 call @walkmiddle
waitmovement 0x0
msgbox @text5
callstd 0x6
applymovement 0xFF @walknamer
warp 0x8 0x4 0xFF 0x4 0x7
I think here belongs some kinda flag or var
release
end
#org @no
'-----------------------------------
msgbox @text6
callstd 0x6
release
end
#org @walkmiddle
'-----------------------------------
applymovement 0x05 @walkguard
applymovement 0xFF @waitplayer 1C
waitmovement 0x0
return
#org @text1
= Text 1
#org @text2
= Text 2
#org @text3
= Text 3
#org @text4
= Ok, u no RNG or just lucky.
#org @text5
= There you go.
#org @text6
= Go away.
#org @walkguard
#raw 0x1F
#raw 0x24
#raw 0xFE
#org @waitplayer
#raw 0x1C
#raw 0x1C
#raw 0xFE
#org @walknamer
#raw 0x11
#raw 0x11
#raw 0xFE
That's the script where I struggle.
I tried it in different ways with goto/jump/call and stuff, in XSE and PKSV, but with the same results. I tried it in in normal houses, but still the same results, so it doesn't happen because it's a Pokécenter:
#dynamic 0x8740000
#org @main
'-----------------------------------
lockall
movesprite2 0x5 0x1 0x2
spritebehave 0x0 0xA
applymovement 0xFF @Walkplayer
waitmovement 0x0
applymovement 0x5 @WalkNPC
waitmovement 0x0
msgbox @HaveFun
callstd 0x6
Var or flag stuff
release
end
#org @HaveFun
= Have Fun.
#org @Walkplayer
#raw 0x10
#raw 0x10
#raw 0xFE
#org @WalkNPC
#raw 0x0F
#raw 0x21
#raw 0xFE
So, any ideas what I'm doing wrong or how that has to look like?
~Sui
Since I'm out of ideas how to solve the problem I have, I have to ask people who are more familiar with scripting.
So what I'm trying to is:
I want to have a door in the Pokécenters with a NPC in front of it who wants you to answer "Yes" a few times before it walk aside and lets you pass and you warp into the room "behind" it. So far it works.
But when I walk back into the room I want the NPC still to stay on the side so I don't walk into it. Then the player is supposed to make 2 steps down and the NPC to walk back into its standard position so I can talk to it again and start everything again.
And I seem to be unable to do that part of the script. I read a lot of tutorials about playback/levelscript stuff, but I still don't get it to work. Either the screen goes black or the message "The slope makes it hard to steer." gets triggered again and again when I walk from the town into the Pokécenter, which belongs to NPC no. 9 (10) on Route 17. It's the one you get after a refight. Mostly the message is the problem.
That's the script when I talk to the NPC, the one that's working so far:
Spoiler:
#dynamic 0x8740000
#org @main
lock
faceplayer
msgbox @text1
callstd 0x5
compare LASTRESULT 0x0
if b_true goto @no
msgbox @text2
callstd 0x5
compare LASTRESULT 0x0
if b_true goto @no
msgbox @text3
callstd 0x5
compare LASTRESULT 0x0
if b_true goto @no
msgbox @text4
callstd 0x6
compare PLAYERFACING 0x2
if 0x1 call @walkmiddle
waitmovement 0x0
msgbox @text5
callstd 0x6
applymovement 0xFF @walknamer
warp 0x8 0x4 0xFF 0x4 0x7
I think here belongs some kinda flag or var
release
end
#org @no
'-----------------------------------
msgbox @text6
callstd 0x6
release
end
#org @walkmiddle
'-----------------------------------
applymovement 0x05 @walkguard
applymovement 0xFF @waitplayer 1C
waitmovement 0x0
return
#org @text1
= Text 1
#org @text2
= Text 2
#org @text3
= Text 3
#org @text4
= Ok, u no RNG or just lucky.
#org @text5
= There you go.
#org @text6
= Go away.
#org @walkguard
#raw 0x1F
#raw 0x24
#raw 0xFE
#org @waitplayer
#raw 0x1C
#raw 0x1C
#raw 0xFE
#org @walknamer
#raw 0x11
#raw 0x11
#raw 0xFE
That's the script where I struggle.
I tried it in different ways with goto/jump/call and stuff, in XSE and PKSV, but with the same results. I tried it in in normal houses, but still the same results, so it doesn't happen because it's a Pokécenter:
Spoiler:
#dynamic 0x8740000
#org @main
'-----------------------------------
lockall
movesprite2 0x5 0x1 0x2
spritebehave 0x0 0xA
applymovement 0xFF @Walkplayer
waitmovement 0x0
applymovement 0x5 @WalkNPC
waitmovement 0x0
msgbox @HaveFun
callstd 0x6
Var or flag stuff
release
end
#org @HaveFun
= Have Fun.
#org @Walkplayer
#raw 0x10
#raw 0x10
#raw 0xFE
#org @WalkNPC
#raw 0x0F
#raw 0x21
#raw 0xFE
So, any ideas what I'm doing wrong or how that has to look like?
~Sui
Last edited: