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
Preventing scripts from repeating
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Preventing scripts from repeating

AddEntityCollideCallback("Player", "ScriptArea_1", "Func01", true, 1);

The bolded text above with it saying "true" means that it can only happen once. When it is "false", then it can happen as many times as you want.

If you want it to happen 2 times, for example, then you use a local variable integer to increase the value when it runs the first time and second time, and if it equals 3, then it breaks out of the function before running it for a 3rd time.

08-17-2011, 04:30 PM
Find


Messages In This Thread
Preventing scripts from repeating - by rybray - 08-17-2011, 04:16 PM
RE: Preventing scripts from repeating - by Kyle - 08-17-2011, 04:30 PM
RE: Preventing scripts from repeating - by rybray - 08-17-2011, 05:46 PM
RE: Preventing scripts from repeating - by Kyle - 08-17-2011, 05:57 PM
RE: Preventing scripts from repeating - by rybray - 08-17-2011, 09:12 PM
RE: Preventing scripts from repeating - by Acies - 08-18-2011, 12:01 AM



Users browsing this thread: 2 Guest(s)