Jump to content
Sign in to follow this  
Morts

Delete object after specified time

Recommended Posts

Probably something quite simple, but i'm not too sure.

I know that there is deleteVehicle which gets rid of an object, but is there a way to do it after a specified time, i.e. getting rid of a sound after 15 minutes.

So that it doesn't go on through the entire mission and get incredibly boring?

Cheers, Morts

Share this post


Link to post
Share on other sites

Sound or object?

However, the sleep, while, isNil commands are your friends for this.

Examples:

For a sound:

[] spawn {
sleep 900;
StopSound = true;
};

while {isNil "StopSound"} do {
playSound "YourSound";
sleep 30; // Repeat sound
};

For an object (put this into its init line):

nul = this spawn { sleep 900; deleteVehicle _this; };

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  

×