Can Anyone HELP!?!?!?
Moderator: Moderators
Can Anyone HELP!?!?!?
----------------- Omaha Beach --------------------
----------------- June 6, 1944 ------------------
------------------- D-Day -------------------
----------------- June 6, 1944 ------------------
------------------- D-Day -------------------
Hie everybody !
First sorry for my poor english i post from France.
I not agree with carlpenn because in his script only time is randomised. If you want to have some explosion but in randomised place use this script (Becarefull it's only for singleplayer)
In the map i have a script_origin element called "refer" (this is the base for the calcul for the randomisation.
exec global/ai.scr
exec global/loadout.scr maps/test_explo.scr
main:
level waittill prespawn
exec global/ambient.scr test_explo
exec global/exploder.scr
level waittill spawn
$player item weapons/colt45.tik
$player ammo pistol 1000
thread random_explode
level.script="map/test_explo.scr"
end
//////////////////////////////
random_explode:
local.target=$refer
local.a=local.target.origin
local.b=randomint (100)
if (local.b < 50)
{
local.a[0]=local.a[0] - randomint (200)
local.a[1]=local.a[1] - randomint (200)
}
else
{
local.a[0]=local.a[0] + randomint (200)
local.a[1]=local.a[1] + randomint (200)
}
local.exp1=spawn "fx/scriptbazookaexplosion.tik"
local.exp2=spawn "animate/fx_mortar_dirt.tik"
local.exp3=spawn "animate/fx_mortar_higgins.tik"
local.exp1.origin=local.a
local.exp1 anim start
local.exp2.origin=local.a
local.exp2 anim start
local.exp3.origin=local.a
local.exp3 anim start
wait(1 + ((randomint(5))*.2))
local.exp1 remove
local.exp2 remove
local.exp3 remove
goto random_explode
end
In fact, in this script you have a square (400 X 400) wherethe explosions will spawn.
it's defined by the randomint (200) the max distance from the "refer".
Tropheus
NB You can "spawn" olny one explosion, bur with the 3 it look like more violent.
First sorry for my poor english i post from France.
I not agree with carlpenn because in his script only time is randomised. If you want to have some explosion but in randomised place use this script (Becarefull it's only for singleplayer)
In the map i have a script_origin element called "refer" (this is the base for the calcul for the randomisation.
exec global/ai.scr
exec global/loadout.scr maps/test_explo.scr
main:
level waittill prespawn
exec global/ambient.scr test_explo
exec global/exploder.scr
level waittill spawn
$player item weapons/colt45.tik
$player ammo pistol 1000
thread random_explode
level.script="map/test_explo.scr"
end
//////////////////////////////
random_explode:
local.target=$refer
local.a=local.target.origin
local.b=randomint (100)
if (local.b < 50)
{
local.a[0]=local.a[0] - randomint (200)
local.a[1]=local.a[1] - randomint (200)
}
else
{
local.a[0]=local.a[0] + randomint (200)
local.a[1]=local.a[1] + randomint (200)
}
local.exp1=spawn "fx/scriptbazookaexplosion.tik"
local.exp2=spawn "animate/fx_mortar_dirt.tik"
local.exp3=spawn "animate/fx_mortar_higgins.tik"
local.exp1.origin=local.a
local.exp1 anim start
local.exp2.origin=local.a
local.exp2 anim start
local.exp3.origin=local.a
local.exp3 anim start
wait(1 + ((randomint(5))*.2))
local.exp1 remove
local.exp2 remove
local.exp3 remove
goto random_explode
end
In fact, in this script you have a square (400 X 400) wherethe explosions will spawn.
it's defined by the randomint (200) the max distance from the "refer".
Tropheus
NB You can "spawn" olny one explosion, bur with the 3 it look like more violent.
