PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Other Generations Hacking > Guides & Documentation > Questions & Answers

Questions & Answers Do you have a problem you need a straight answer for? Ask a question here and get an answer.

Reply
 
Thread Tools Display Modes
Old 3rd November 2014, 08:34 PM   #1
Haile Selassie IV
n00b
 
Join Date: Nov 2014
Posts: 1
Haile Selassie IV
Default PKSV Script not reacting correctly

Well, to put it simple, I have quite some experience in scripting, but this goes beyond me.
It's a long script, but the idea was that you were to chase a Slowpoke and every direction has a different outcome.

The north and west route should not be very interesting, but aren't reacting at all. The south and east route only proceed to the second part, providing just a part of the movement it's supposed to have do.

Any ideas why it seems to be skipping the entire first block and movements?
Code:
#dyn 0x740000
#org @start
lock
faceplayer
checkflag 0x1016
if 0x1 jump @try2
checkflag 0x1015
if 0x1 jump @home2
checkflag 0x1010
if 0x1 jump @upreturn
checkflag 0x1011
if 0x1 jump @downsea
checkflag 0x1012
if 0x1 jump @home1
checkflag 0x1013
if 0x1 jump @rightreturn
compare PLAYERFACING UP
if == jump @up
compare PLAYERFACING DOWN
if == jump @down
compare PLAYERFACING LEFT
if == jump @left
compare playerfacing right
if == jump @right
release
end

#org @up
applymovement 0x7 @upmov1
setflag 0x1010
release
end

#org @down
applymovement 0x7 @downmov1
setflag 0x1011
release
end

#org @left
applymovement 0x7 @leftmov1
setflag 0x1012
release
end

#org @right
applymovement 0x7 @rightmov1
setflag 0x1013
release
end

#org @upreturn
compare playerfacing up
if == jump @extraupreturn
applymovement 0x7 @upmov2
clearflag 0x1010
release
end

#org @downsea
compare playerfacing up
if == jump :end
applymovement 0x7 @downmov2
applymovement player @downmov21 
msgbox @lure
callstd msg_normal
applymovement 0x7 @downmov3
msgbox @try
callstd msg_yesno
compare LASTRESULT YES
if 0x1 jump @yes
clearflag 0x1011
setflag 0x1016
:end
release
end

#org @try2
msgbox @try
callstd msg_yesno
compare lastresult yes
if 0x1 jump @yes
release
end

#org @yes
msgbox @fail
callstd msg_normal
applymovement 0x7 @downmov4
msgbox @fail2
callstd msg_normal
fadescreen 1
disappear 0x7
disappear 0x11
setflag 0x1014
fadescreen 0
release
end

#org @home1
applymovement 0x7 @leftmov2
clearflag 0x1012
setflag 0x1015
release
end

#org @home2
applymovement 0x7 @leftmov3
msgbox @sleep
callstd msg_normal
clearflag 0x1015
fadescreen 1
disappear 0x7
setflag 0x100b
fadescreen 0
release
end

#org @rightreturn
compare playerfacing right
if == jump @extrarightreturn
applymovement 0x7 @rightmov2
clearflag 0x1013
release
end

#org @extrarightreturn
applymovement 0x7 @rightmov21
clearflag 0x1013
release
end

#org @extraupreturn
applymovement 0x7 @upmov21
clearflag 0x1010
release
end

#org @upmov2
m walk_down_vslow walk_down_vslow walk_down_vslow walk_down_vslow walk_down_vslow walk_down_vslow end

#org @upmov21
m say_? walk_left_vslow walk_right_vslow walk_right_vslow walk_down_vslow walk_down_vslow walk_left_vslow walk_down_vslow walk_down_vslow walk_down_vslow walk_down_vslow end

#org @upmov1
m run_up run_up run_up run_up run_up run_up end

#org @downmov1
m run_down run_down run_down jump_up2 walk_down_vslow walk_down_vslow walk_left_vslow walk_left_vslow walk_down_vslow walk_down_vslow end

#org @downmov2
m walk_down_vslow walk_left_vslow walk_left_vslow walk_left_vslow walk_down_vslow walk_left_vslow walk_left_vslow jump_down1 end

#org @downmov21
m walk_down walk_down walk_left walk_left walk_left walk_down walk_left walk_left walk_down end

#org @downmov3
m walk_down_vslow walk_down_vslow walk_down_vslow look_left end

#org @downmov4
m walk_left walk_left end

#org @downnov5
m run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down end

#org @fail
= SLOWPOKE got scared and moved away[.]

#org @fail2
= \c\h01\h08Hehe excellent[.]\pYou're mine!

#org @lure
= \c\h01\h08????: Come here boy, don't be afraid hehe[.]

#org @try
= Maybe SLOWPOKE will notice you\nif you do something.\pThrow a rock?

#org @leftmov1
m walk_left_vslow walk_left_vslow walk_left_vslow walk_left_vslow walk_left_vslow walk_left_vslow end

#org @leftmov2
m walk_left_vslow walk_left_vslow walk_down_vslow walk_down_vslow walk_left_vslow end

#org @leftmov3
m run_left walk_left walk_left_slow walk_left_vslow end

#org @rightmov1
m walk_right_vslow walk_right_vslow walk_down_vslow walk_right_vslow walk_right_vslow end

#org @rightmov2
m say_? say_? say_! walk_left_vslow walk_left_vslow walk_left_vslow walk_right_vslow walk_up_vslow walk_left_vslow say_? walk_left_vslow say_! end

#org @rightmov21
m walk_down_vslow walk_left_vslow walk_left_vslow walk_left_vslow walk_left_vslow end

#org @sleep
= SLOWPOKE fell asleep[.]\pBetter grab it!
Haile Selassie IV is offline   Reply With Quote
Sponsored Links
Old 3rd November 2014, 09:43 PM   #2
Full Metal ★
Unstable?
Ex-StaffPHO VIP
 
Full Metal ★'s Avatar
 
Join Date: Oct 2012
Posts: 326
Full Metal ★ Full Metal ★
Default

You say "south and east route". I haven't looked at your script because it's really long and my attention span is pretty short. But by chance are you trying to move between maps? Because I'm pretty sure that doesn't work on a vanilla ROM. I have classes in 30 minutes, but when I get home tonight I'll have a look at your script more closely if somebody else hasn't already resolved it. It may be worth suggesting that you draw out the connections between your script sections as you read your script from top to bottom ( line-by-line). It sounds silly, but this is actually really effective at finding bugs. There's a possibility that you typo'd one of the movement names, too since rather than warn you or error you about those, PKSV just compiles them to some default like 0xC or something like that.
__________________

★ full metal.

#busy

Last edited by Full Metal ★; 3rd November 2014 at 09:46 PM.
Full Metal ★ is offline   Reply With Quote
Reply

Tags
correctly, pksv, reacting, script

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:44 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts