Forum

> > Stranded II > Scripts > Your flashlight is your friend...
Forums overviewStranded II overview Scripts overviewLog in to reply

English Your flashlight is your friend...

2 replies
To the start Previous 1 Next To the start

old Your flashlight is your friend...

pupp3tStudios
User Off Offline

Quote
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?

old Re: Your flashlight is your friend...

JasJack67
Super User Off Offline

Quote
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 --> ;
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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview