English Your flashlight is your friend...

2 replies
Goto Page
To the start Previous 1 Next To the start
Up
pupp3tStudios
User
Offline Off
Okay, so I have an idea for a spooky map.
Basically, certain types of enemies will be mobile as long as you don't have the light state on your being.
The sample script I am trying to use is this:

on:start {
          if (gotstate("unit",1,24)==1){
               freeze 100,1;
          }else{
               freeze 100,0
          }
     }
Where "24" is the number for the light state.

Unfortunately, this script isn't working. I even removed the "==1" in the script. Still does not work.
Anyone can help me out, please?
12.12.15 04:12:23 am
Up
JasJack67
Super User
Offline Off
If you have it in a proper working place, then you may just need to use the name of this state. Like this:
if (gotstate ("unit", 1, "light") == 1){

YOU ARE MISSING A SEMI-COLON TOO --> ;
Code:
1
2
3
4
5
6
7
on:start {
          if (gotstate("unit",1,24)==1){
               freeze 100,1;
          }else{
               freeze 100,0;    <------here you need this ;
          }
     }


If you run this in debug mode it should have thrown an error "expecting semi-colon" or something.
edited 1×, last 12.12.15 04:22:59 am
The Survivalist_07-04-19 is now available. DOWNLOAD HERE >The Survivalist 07-04-19 | Performance-In options keep Water Detail off
12.12.15 05:25:42 am
Up
Hurri04
Super User
Offline Off
you probably also want to check this periodically in a s2 cmd timer instead of only once at the start.
To the start Previous 1 Next To the start