I have trouble with this script. I am trying to make so you will have to press 4 buttons and then thread a function. But ingame it threads the function if I only press 2 of the buttons. Why is this happening? In my script it says 4 buttons but ingame it threads after 2 hits.
I'm new to scripting so maybe not the best answer but worth a shot until someone better at scripting can help if it doesn't work. Try something more like this?
I have trouble with this script. I am trying to make so you will have to press 4 buttons and then thread a function. But ingame it threads the function if I only press 2 of the buttons. Why is this happening? In my script it says 4 buttons but ingame it threads after 2 hits.
I'm new to scripting so maybe not the best answer but worth a shot until someone better at scripting can help if it doesn't work. Try something more like this?
Couldn't hurt to try though yeah? I use a similar script in my map. I noticed it was adding a number already cuz I accidentally had two trigs with the same targetname. So I'd say check the target names make sure none are accidentally the same or with typo.
Sorry, just thought it might be 4 cause it ups the level variable twice, maybe. Did you check the level.switchs_hit with an iprintln after the waittill trigger? If counting by twos, then something is doubling. You could just make it 8 if you can't figure it out. If it counts by 1s and is working on 2, then sorry for wasting your time, cause I'm out of ideas.
Couldn't hurt to try though yeah? I use a similar script in my map. I noticed it was adding a number already cuz I accidentally had two trigs with the same targetname. So I'd say check the target names make sure none are accidentally the same or with typo.
You solution would work as well, this script is just how I thought.
Sorry, just thought it might be 4 cause it ups the level variable twice, maybe. Did you check the level.switchs_hit with an iprintln after the waittill trigger? If counting by twos, then something is doubling. You could just make it 8 if you can't figure it out. If it counts by 1s and is working on 2, then sorry for wasting your time, cause I'm out of ideas.
You didn't waste my time at all. xD no need to say sorry.
Also, I solved it, it was something I did wrong in the script simply. Thanks for he help anyways, but sorry for wasting YOUR time. xD
Edit: but I give the best answer to prox, because your way is to use arrays which is smarter than the script I had.