Frictional Games Forum (read-only)

Full Version: Scripting!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
HELP!!! im half way through making my Full conversion and there is a couple of things bugging me! throughout the game you eventually turn the power on in the map. the map where the power switch is i can turn on the lights and thats works. but what about other maps because i go back into the previous maps where the lights arnt lit but i need a script where once the switch is pressed it turns them on no matter what map? PLEASE HELP Smile
You can use global variables because they work throughout maps. Try doing something like SetGlobalVarInt("LightsOn", 1). Then when maps load, check whether LightsOn is equal to 1, and if it is, turn the lights on.
(03-05-2013, 07:39 PM)NaxEla Wrote: [ -> ]You can use global variables because they work throughout maps. Try doing something like SetGlobalVarInt("LightsOn", 1). Then when maps load, check whether LightsOn is equal to 1, and if it is, turn the lights on.

Global variables are so confusing!. i dont know what im doing with them, not much info online eitherSad
It's basically a counter throughout multiple maps. You can like do something in 1 map to add 1 to the globalvarint and let it check the amount you added to do something else in another map.