PDA

View Full Version : Delay for smokeshell



granQ
Jan 9 2003, 19:09
I have made some 40 mm smoke (for m203) and a "mortar" we have in sweden for smoke. Probaly is that the smoke starts coming out as soon as it leaves the weapon. Can i set so the smoke starts on impact (best) or after some time?

Dinger
Jan 10 2003, 04:22
Of course, GranQ:
A. Make your unit fire a dummy shell round. (sim ShotShell) -- with 0 hit / and 0 indirecthit (or 1 or 2 or something small), and call it say GRQSmokeProxy
load an eventhandler (fired) onto the unit with the m203 or mortar. have the EH read:
(n.b., it may be _This select 3, I forget)
{if _this select 4 == "GRQSmokeProxy" then {[nearestobject [(_this select 0), (_this select 4)] exec "trackshell.sqs"}}

and have trackshell be:
;trackshell.sqs
_shell = _This select 0
_shellpos = getpos _shell
#TrackLoop
_newshellpos = getpos _shell
?_newshellpos select 0 == 0:goto "splash"
_shellpos = _newshellpos
~.0001
goto "trackloop"

#splash
_smoke = "GRQ40mmSmoke" createvehicle _shellpos
exit


easy, huh?
If you're clever, you can have most of this work via init EHs (have a mortar dude or something).

granQ
Jan 18 2003, 09:21
guess i ain't so clever, can't get it to work problem is not the script, well i don't really know yet since i can't get the script to start. I added a "hint" to check but the script is never started. What i did:
Fixed the "path" to the script file.
Tested with both "this select 3" and "this select 4"
Tested with the ammo and mag name (should not be mag name but was despreate )
still looks like it doesn't start..