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 Trying to create a roadblock script and all it does is softlock you (https://www.pokecommunity.com/showthread.php?t=428433)

imFat12321 December 21st, 2019 11:24 PM

Trying to create a roadblock script and all it does is softlock you
 
I'm really not sure where I'm going wrong here. What I want to happen is the character is stopped, put into the dialogue, then is forced to take a step back. I've tried making it always work without the flag, rearranged it a couple times, and nothing is working.

Code:

#dynamic 0xA01922

#org @start
lockall
checkflag 0x821
if 0x1 goto @youguud
textcolor 0x0
msgbox @nofurther 0x4
closeonkeypress
applymovement 0xFF @moveaway
waitmovement 0x0
releaseall
end

#org @youguud
releaseall
end

#org @nofurther
= Hold it! The Pokémon in this\nCave are too strong for new\ltrainers. Come back once you've\lgotten two gym badges.

#org @moveaway
#raw 0x13
#raw 0xFE


I feel like I've tried what feels like every different possible combination of where to put certain lines, using different types of message boxes or anything. I am completely stumped here. I literally recreated the entire old man coffee script at one point and that was also still soft locking. Why would this happen? I'm trying to place this script on a new map, if that makes a difference.

DrFuji December 22nd, 2019 1:24 AM

It sounds like an issue with the variable number/ values. Check out the end part of this tutorial to learn how script tiles work and how to prevent softlocking.

imFat12321 December 22nd, 2019 10:49 AM

Yeah that must be it, I didn't know you needed to set those values even if you didn't intend on changing any variables and could just do it all through flags. I guess script tiles are a bit different though. Thank you.


All times are GMT -8. The time now is 9:13 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.