// UNSPAWN TIMER SET
// int rnd;
// rnd = (Random(10)+10); // Calculate a random number
object oTarget = (OBJECT_SELF);
float fDelay = (Random(10f));
DelayCommand(fDelay, DestroyObject (oTarget));
Scripting Champions,
I have a question that, once again, shows my lack of understanding for this language. I am trying to write a script that kills a creature after a random time. It is an appendage to the standard gb_comp_spawn
I believe I have two ways to solve this... I cannot make either work. I started with a random, which is an int. Is there a way to make and int into a float for the delay command? Elseif, is there a way to make a random float?
I tried to make, for testing sake, a short timer. The above attempt is for 0 - 20 seconds, I believe, if Random (x) is able to produce 0.
Attached is my current nonfunctioning keyboard hammerings. You can see how I went through the above... then gave up. As I said, this is just after the last line but before the closing bracket of gb_comp_spawn
Retpircs Wols
not the fastest way, but I get there eventually. usually.





Retour en haut







