14.10.2010, 01:26
Ok, I've been working on this for a while. But how do you make an explosion happen several times in a row, randomly. Please I need help, this is just to puzzling for me.
public RandomExplosion(Float: x, Float: y, Float: z, type, Float: radius, Dist) // Dist = Maximum distance from centre point for explosion
{
CreateExplosion(x + (random(Dist*2+1)-Dist), y + (random(Dist*2+1)-Dist), z, type, radius)
return 1;
}
for(new x=0; x < 10; x++)
{
SetTimerEx("RandomExplosion", 1000*x, 0, "fffifi", 596,1584.2898,-1671.6333,5.6145, 3, 5.0, 5);
}
public CreateExplosion(2667.524, 1246.180, 55.478, 2, 100); { SetTimerEx("CreateExplosion", 1000*x, 20, "fffifi", 596, 2667.524, 1246.180, 55.479, 3, 5.0, 5); }
public RandomExplosion(Float: x, Float: y, Float: z, type, Float: radius, Dist) // Dist = Maximum distance from centre point for explosion
{
CreateExplosion(x + (random(Dist*2+1)-Dist), y + (random(Dist*2+1)-Dist), z, type, radius)
return 1;
}
for(new x=0; x < 10; x++)
{
SetTimerEx("RandomExplosion", 1000*x, 0, "fffifi", 596,1584.2898,-1671.6333,5.6145, 3, 5.0, 5);
}