Deleting then re-creating objects on timers
#1

Basically I am working on a script for a firealarm that will be located in any major building, faction HQ, house, etcetra in my roleplay server. Now, I have all the sounds working perfectly fine; however how would I go about making two objects (red and white lights via the PointLight objects) flash on times of 500ms? This is simple but it is messing with my head after a long night.

Any and all assistance will be greatly appreciated (but rep not guaranteed unless you deserve it)

~Nmader
Reply
#2

pawn Код:
//The Timer Which will destroy bla bla,
SetTimer("flash",500,1);
pawn Код:
//this will be the variable which will check for the flash
new Flashing;
pawn Код:
forward flash();
public flash()
{
if(Flashing == 1)//We are checking for the object status
{
//Un-comment the lines bellow with the objects
//CreateObject(//first object bla bla
//CreateObject(//bla bla
}
else if(Flashing == 0)//We are checking for the object status
{
//Un-comment the lines bellow with the objects
//DestroyObject(//Destroying the first object
//CreateObject(//Destroying the Second object
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)