Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting!
bradders2010 Offline
Junior Member

Posts: 2
Threads: 1
Joined: Mar 2013
Reputation: 0
#1
Wink  Scripting!

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
03-05-2013, 06:31 PM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#2
RE: Scripting!

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.

In Ruins [WIP]
03-05-2013, 07:39 PM
Find
bradders2010 Offline
Junior Member

Posts: 2
Threads: 1
Joined: Mar 2013
Reputation: 0
#3
RE: Scripting!

(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
03-06-2013, 08:23 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#4
RE: Scripting!

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.
03-06-2013, 08:36 PM
Find




Users browsing this thread: 1 Guest(s)