Firing 88mm guns
Moderator: Moderators
-
Thirty-O-Six
- Lance Corporal
- Posts: 11
- Joined: Tue Jan 28, 2003 1:57 am
Firing 88mm guns
I'm working on my map, and the objective is to destroy 3 88mm guns. So far I'm happy with setting them up as objectives thanx to the tutorials etc.
Does anyone know if theres a way to script something where the guns can be made to fire...as in say every 15 seconds a trigger or similar creates a firing sound and a muzzle flash from the gun?
Im just trying to create the impression that the guns are firing until the allies get near the objective then the firing stops ( otherwise it would look a bit daft with the guns firing and no-one near it).
Ive just read the ambient sounds tutorial and probably got carried away lol
Chris
Does anyone know if theres a way to script something where the guns can be made to fire...as in say every 15 seconds a trigger or similar creates a firing sound and a muzzle flash from the gun?
Im just trying to create the impression that the guns are firing until the allies get near the objective then the firing stops ( otherwise it would look a bit daft with the guns firing and no-one near it).
Ive just read the ambient sounds tutorial and probably got carried away lol
Chris
-
[253RID]General-Haines
- Sergeant Major
- Posts: 114
- Joined: Fri Jan 17, 2003 7:46 pm
- Location: New Jersey USA
- Contact:
haha whittman same thing i posted before but no 1 new! like in ardennes i wanted to have the flak move and fire but no luck so far if.... i figure it out ill let ya know
253rd Regimental Infantry Division

Our Spearhead Total conversion mod is now recruiting. http://www.thegreendevils.tk

Our Spearhead Total conversion mod is now recruiting. http://www.thegreendevils.tk
-
Desert Eagle
- Captain
- Posts: 237
- Joined: Mon Jan 13, 2003 1:05 am
- Location: Mapping Bunker
- Contact:
firing 88s and AA guns
so if I have in map:
targetname of flak is flakone
threadset flakone
in scirpt would this make the gun fire randomly with sound and muzzle flash?
level waittill spawn
thread flakone
end
flakone:
wait (randomfloat 13 + 23) <---the 13 is minimum # of seconds it waits, and 23 is the max # of seconds it will wait!
$flakone anim fire
goto flakone
end
Could this work for aa guns to?
targetname of flak is flakone
threadset flakone
in scirpt would this make the gun fire randomly with sound and muzzle flash?
level waittill spawn
thread flakone
end
flakone:
wait (randomfloat 13 + 23) <---the 13 is minimum # of seconds it waits, and 23 is the max # of seconds it will wait!
$flakone anim fire
goto flakone
end
Could this work for aa guns to?
Desert-Eagle
....The Eagle Has Landed...
....The Eagle Has Landed...
-
Desert Eagle
- Captain
- Posts: 237
- Joined: Mon Jan 13, 2003 1:05 am
- Location: Mapping Bunker
- Contact:
It works!!
Well I created a quick test map and script and it works!!.
I now have random flak cannons firing, mg42s, mortars, and aa guns. I assume anything with an animation can be made to fire randomly.
Looks neat when flak cannons firing skyward and then using a trigger to use the flak burst in the air in Spearhead.
Thanks for input, now on my way to getting my parachute spawn points working correctly in multiplayer.
I now have random flak cannons firing, mg42s, mortars, and aa guns. I assume anything with an animation can be made to fire randomly.
Looks neat when flak cannons firing skyward and then using a trigger to use the flak burst in the air in Spearhead.
Thanks for input, now on my way to getting my parachute spawn points working correctly in multiplayer.
Desert-Eagle
....The Eagle Has Landed...
....The Eagle Has Landed...
-
Desert Eagle
- Captain
- Posts: 237
- Joined: Mon Jan 13, 2003 1:05 am
- Location: Mapping Bunker
- Contact:
The test scr
mgs only fire one bullet, and aa gun does not warm up enough to fire...
But the flak guns really look good along with flak burst.
Here is the test scr I used:
level.script = maps/dm/flaktest.scr
exec global/ambient.scr m4l1
exec global/door_locked.scr::lock
level waittill spawn
thread flakone
thread flaktwo
thread flakthree
end
flakone:
wait (randomfloat 13 + 23)
$flakone anim fire
wait 2
$flakflash anim start
goto flakone
end
flaktwo:
wait (randomfloat 13 + 23)
$flaktwo anim fire
wait 4
$flakflash2 anim start
goto flaktwo
end
flakthree:
wait (randomfloat 13 + 23)
$flakthree anim fire
wait 2
$flakflashthree anim start
goto flakthree
end
end
//-----------------------------------------------------------------------------
But the flak guns really look good along with flak burst.
Here is the test scr I used:
level.script = maps/dm/flaktest.scr
exec global/ambient.scr m4l1
exec global/door_locked.scr::lock
level waittill spawn
thread flakone
thread flaktwo
thread flakthree
end
flakone:
wait (randomfloat 13 + 23)
$flakone anim fire
wait 2
$flakflash anim start
goto flakone
end
flaktwo:
wait (randomfloat 13 + 23)
$flaktwo anim fire
wait 4
$flakflash2 anim start
goto flaktwo
end
flakthree:
wait (randomfloat 13 + 23)
$flakthree anim fire
wait 2
$flakflashthree anim start
goto flakthree
end
end
//-----------------------------------------------------------------------------
Desert-Eagle
....The Eagle Has Landed...
....The Eagle Has Landed...
-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
you have a stray "end" at the bottom...
and also, using goto is really bad scriting... admitidly is does what you want it 2 do, but you also need pieces of script for it not 2 fire if friendlies have overrun the "missile file", repeating a script over and over will kill your map sonner or later
and also, using goto is really bad scriting... admitidly is does what you want it 2 do, but you also need pieces of script for it not 2 fire if friendlies have overrun the "missile file", repeating a script over and over will kill your map sonner or later
hope this helps, prob not cos it's all foreign 2 me :-/
-
Desert Eagle
- Captain
- Posts: 237
- Joined: Mon Jan 13, 2003 1:05 am
- Location: Mapping Bunker
- Contact:
Just A Test
It was just a test scr to see if it actually would work, and the flak animation would work. In my real map it will be set up with triggers not threads. thread was the quickest way to show that it works, the anim fire with the 88 flak.
Desert-Eagle
....The Eagle Has Landed...
....The Eagle Has Landed...
There's nothing wrong with threads (as long as you don't start thousands), but the goto command is harmful.
Better:
Better:
Code: Select all
flakone:
while(1)
{
wait (randomfloat 13 + 23)
$flakone anim fire
wait 2
$flakflash anim start
}
end
-
Desert Eagle
- Captain
- Posts: 237
- Joined: Mon Jan 13, 2003 1:05 am
- Location: Mapping Bunker
- Contact:
Thanks JV your the man...
Now maybe you can help me with one other thing.
This also works for firing the mg42 without a gunner, ony problem is it shoots only one shot. I have tried a few things but nothing working. I just wanted the mg42 to fire some rounds for like 6 or 7 seconds.
Trying to put some random tracer fire in my map over the players head.
This also works for firing the mg42 without a gunner, ony problem is it shoots only one shot. I have tried a few things but nothing working. I just wanted the mg42 to fire some rounds for like 6 or 7 seconds.
Trying to put some random tracer fire in my map over the players head.
Desert-Eagle
....The Eagle Has Landed...
....The Eagle Has Landed...
-
Desert Eagle
- Captain
- Posts: 237
- Joined: Mon Jan 13, 2003 1:05 am
- Location: Mapping Bunker
- Contact:
