[SCRIPT] Not sure what to title this actually! - 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] Not sure what to title this actually! (/thread-24767.html) |
Not sure what to title this actually! - MsHannerBananer - 03-06-2014 I'm not sure how to do this, I don't know how simple it is, but I don't know how to go about it at all, so... here I am. The player arrives at a hub map and discovers they need to do quite a few things in order to progress. For instance, the area is flooded, and in order to progress to explore other area's, they need to go to another map to fiddle with some stuff, then when they come back into the hub, the water is gone. Is there a way to do this in script? Or am I going to have to make the place where they fiddle with stuff to make the water drain part of the hub map? Thanks guys, I know I post a lot of questions but script and me don't get a long, hahah. RE: Not sure what to title this actually! - Mudbill - 03-06-2014 Use global variables. It's quite easy actually. When you have successfully accomplished the drainage in the other level, use SetGlobalVarInt("Drain", 1); in your script. When you enter the hub again, within OnEnter() do something like this: Code: if(GetGlobalVarInt("Drain") == 1) { RE: Not sure what to title this actually! - MsHannerBananer - 03-06-2014 (03-06-2014, 02:06 AM)Mudbill Wrote: Use global variables. It's quite easy actually. Lifesaver as always, Mudbill. |