![]() |
Script to keep player out of an area until a flag is set
(Accidentally posted to Patching and Emulation because I didn't read the thread title and thought Quick Questions and Answers still existed)
I want to have an NPC to keep the player out of an area until they get their starter. From what I understand about scripting, all I'd have to do is insert a checkflag command into an S event tile next to the NPC, right? Something like the following: #dynamic 0x8XXXXX #org @start checkflag 0xFF If 0x1 goto @enter msgbox @talk1 0x2 release end #org @enter = Come on in! #org @talk1 = You aren't licensed yet! Of course, that means when the player gets their starter I'd...insert a setflag command for the relevant free flag that the aforementioned script event has to check? Another thing, where does the player movement commands go in the above script? I think it'd be the #org @talk1, correct? The following image shows the direction the player would be forced away (red arrow) and the direction the NPC would face. http://i.imgur.com/buufENb.png |
Quote:
player movement commands get their own pointer so #org @movement referenced by applymovement so applymovement 0xFF @movement 'make player do movements defined by @movement |
Excellent, I'll try this out later!
|
| All times are GMT -8. The time now is 9:18 AM. |
![]()
© 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.