The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Need Help With Script, Again... (https://www.pokecommunity.com/showthread.php?t=384110)

DubTheNarwhals November 26th, 2016 7:14 PM

Need Help With Script, Again...
 
This script is a script not a person event and every time I step on it the game freeze.
heres the script:
#dynamic 0x800000
#org @start
checkflag 0x202
if 0x1 goto @end
lock
msgbox @t1 0x6
applymovement 0xFF @m1
waitmovement 0x0
release
end
#org @m1
#raw 0x8
#raw 0xFE
#org @t1
= Looks like these pokemon are\nfighting, better back off.
#org @end
end
It's suppose to make the player move back when they step on the script if the flag is clear. If the flag not clear it's suppose to do nothing. How can I fix this?

Matthatter03 November 26th, 2016 8:49 PM

I don't see anything directly wrong with the script, and I am new to rom hacking, but I have been told and noticed that flags generally have less problems when they are above 1200, so it is a possibility it isn't working well because the flag you are checking is 202, but I don't know how much a difference it makes.

mbcn10ww November 26th, 2016 9:13 PM

Quote:

Originally Posted by DubTheNarwhals (Post 9499263)
This script is a script not a person event and every time I step on it the game freeze.
heres the script:
#dynamic 0x800000
#org @start
checkflag 0x202
if 0x1 goto @end
lock
msgbox @t1 0x6
applymovement 0xFF @m1
waitmovement 0x0
release
end
#org @m1
#raw 0x8
#raw 0xFE
#org @t1
= Looks like these pokemon are\nfighting, better back off.
#org @end
end
It's suppose to make the player move back when they step on the script if the flag is clear. If the flag not clear it's suppose to do nothing. How can I fix this?

I don't know if I'm right, but I think your @end cannot be empty, then place the "lock" before the "checkflag" instead after, then place "release" at your @end, and test it.

EDIT:
I've found something useful:

applymovement
Arguments:
byte-or-variable index
pointer movements
Applies the movement data at movements to the specified (index) Person event. Also closes any standard message boxes that are still open.
Indices 0xFF and 0x7F refer to the player and the camera, respectively. Running this command from a Script event will crash the game unless that Script event's "Unknown" field (in AdvanceMap) is "$0003" and its "Var number" field refers to a valid script variable.

DubTheNarwhals November 26th, 2016 9:54 PM

Thanks For Your Help, I'm Still Kinda New To Rom Hacking And The Tutorial I Was Watching Didn't Mention This Info.

mbcn10ww November 27th, 2016 9:29 AM

Quote:

Originally Posted by DubTheNarwhals (Post 9499361)
Thanks For Your Help, I'm Still Kinda New To Rom Hacking And The Tutorial I Was Watching Didn't Mention This Info.

If you want more information about scripting, take a look at this page, I think it is the best of scripting.


All times are GMT -8. The time now is 9:18 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.