![]() |
[SCRIPT] area collide problem - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [SCRIPT] area collide problem (/thread-22522.html) |
area collide problem - jamer125 - 08-20-2013 Heres a tough one, atleast for me. In my game i want an prisoner dude to appear when you enter the area, but i only want him to appear once and only if you have a key, the problem is when you walk over the area without the key turn around and walk back its deleted bc i already walked through it but if i make it so it wont be deleted then you could walk in the area over and over again with the key making the guy appear and i dont want that does this make sense? never mind figured it out RE: area collide problem - Kreekakon - 08-20-2013 Well, how about you set a variable which will determine if the key has been picked up by the player, or not yet? Then use that variable to determine if the function for your area collide will activate, or not. Alternatively, instead of a variable, you can can use this to determine the item's state instead: Quote:bool HasItem(string& asName); That's just an idea I'm throwing out. If you need more help, post your script, and we'll see if we can help you alter it properly! RE: area collide problem - jamer125 - 08-20-2013 I was using that but I still collided with the box even when i didn't have the key and when you enter the box it would be delted so by the time i got the key the jumpscare wouldnt happen but i figured it out i just unactivated the area and activated it when i picked up the key RE: area collide problem - Kreekakon - 08-20-2013 Oh yeah well that works too. Glad you solved it! |