Jump to content
Sign in to follow this  
svarun

Need help with a simple script

Recommended Posts

Hello. I am new to SQF scripting and need some help.

 

So this is my situation;

 

 

[] spawn {
while{not isnull truckTUR} do {"respawn_east" setmarkerpos getpos truckTUR; sleep 30;};
};

 

Simple, respawn marker is set to truck's position every 30 seconds.

 

 

Now I'm trying to move the respawn marker to another object, while the truck is destroyed. And when it respawns, it goes back to the truck.

 

 

[] spawn {

while (alive truckTUR) do {"respawn_east" setmarkerpos getpos truckTUR; sleep 30;}; "respawn_east" setmarkerpos getpos baseTUR;

};

 

And this is a wrong to do it. :(

 

 

Any help would be much appreciated.

 

Share this post


Link to post
Share on other sites
[] spawn {
while { alive truckTUR } do {"respawn_east" setmarkerpos getpos truckTUR; sleep 30;}; "respawn_east" setmarkerpos getpos baseTUR;
};

your syntax was while ( ... ) . Replace with while { ... }

Share this post


Link to post
Share on other sites

Yup, that was it. I feel so dumb now.

 

Thank you for your help! :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×