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
switch and cases
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#4
RE: switch and cases

I haven't scoured the entire script yet for problems, but I believe this may be one of them:

Try putting this...
    if(GetLocalVarInt("Var1") == 6)
    {
    SetLocalVarInt("Var1", 0);
    }

...under the timer's script instead of the EntityCollide. What's happening right now is that the timer is likely keeps activating over, and over again, which in turn keeps making your "Var1" larger, and larger well past 6. So when you do collide with your script area it will not be reset to 0, because "Var1" has likely long past since passed 6, and therefore no longer equals the conditions of "GetLocalVarInt("Var1") == 6"

EDIT: Oh yeah, basically the same thing Apjjm pointed out. It will result in none of the randoms ever happening unless you run to the script area in under 6 seconds.

EDIT 2: In a nutshell...your current resetting var1 to 0 script will not work unless you hit the script area at exactly six seconds.

[Image: Tv0YgQb.gif]
Image by BandyGrass
(This post was last modified: 09-07-2013, 03:24 PM by Kreekakon.)
09-07-2013, 03:14 PM
Find


Messages In This Thread
switch and cases - by Lizard - 09-07-2013, 10:09 AM
RE: switch and cases - by Apjjm - 09-07-2013, 02:42 PM
RE: switch and cases - by Lizard - 09-07-2013, 03:01 PM
RE: switch and cases - by Kreekakon - 09-07-2013, 03:14 PM
RE: switch and cases - by Lizard - 09-07-2013, 03:31 PM
RE: switch and cases - by Kreekakon - 09-07-2013, 03:36 PM
RE: switch and cases - by Lizard - 09-07-2013, 03:44 PM



Users browsing this thread: 1 Guest(s)