Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Hodgeasaurus

Flare above player every 50 seconds

Recommended Posts

Hey guys, I'm trying to get a flare to pop at the location of the enemy every 50 seconds, but the flare seems to follow the flare as it falls, causing the game to lag horribly!

This is the code I have:

#loop
flare = "F_40mm_red" createVehicle [getPos robber select 0, getPos robber select 1, 150];
sleep 50;
goto "loop"

Is there a way of getting the flare to stay falling to where the enemy WAS not IS?

Cheers!

EDIT:

Nevermind. seems I shouldn't use sleep, rather ~

Edited by Hodgeasaurus

Share this post


Link to post
Share on other sites

Like this...

while {true} do {    //endless loop
   flare = "F_40mm_red" createVehicle [getPos robber select 0, getPos robber select 1, 150];
   sleep 50;
};

What you have above is a mixture of .sqs and .sqf code.

The sleep is sqf and everything else is sqs. You can't mix them!

Do not use sqs it is old and slow. Make the switch to .sqf!

EDIT: Oooops.... didn't see your "nevermind"!

Share this post


Link to post
Share on other sites
Sign in to follow this  

×