OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: oGhOsTo on 23 Aug 2002, 21:14:21
-
OK, here goes.
I'm trying to create a scene in which the players are observing enemy positions. A friendly F-16 sweeps overhead and drops napalm on those positions...
I got the napalm part working. I found an excellent script with some VERY nice FX, which creates a burning cloud of napalm ("NapalmBomb") where a vehicle hits with its missiles.
Now, with my VERY limited scripting skills, I edited the script to suit my purposes. So whats happening now is the following:
The whole thing is activated by the friendly f-16 flying through a trigger (set to WEST present), which executes the script. I then used CamCreate to create three "heat125" explosions in the enemy position, combined with "NapalmBomb". The whole thing looks awesome! But is there ANYTHING I can add to the script which would cause severe damage to any ground unit entering within 50 metres of the area?
Activating trigger is called Napalmdrop (activated by WEST; On initialization: This exec "napalmfx.sqs"
Position of napalm drop is marked by triggers e, e_1 and e_2
Here's a copy of the script:
;The delay time between the F-16 activating the trigger and the script being executed
~5
;line to create position of Napalm effects and explosion
_pos = getpos e
_pos = "NapalmBomb" camCreate _pos
_pos = getpos e
_pos = "Heat125" camCreate _pos
;Next napalm bomb hits
~0.1
_pos_1 = getpos e_1
_pos_1 = "NapalmBomb" CamCreate _pos_1
_pos_1 = getpos e_1
_pos_1 = "Heat125" CamCreate _pos_1
; Aaaaaaaand the next one
~0.1
_pos_2 = getpos e_2
_pos_2 = "NapalmBomb" CamCreate _pos_2
_pos_2 = getpos e_2
_pos_2 = "Heat125" CamCreate _pos_2
exit
I would be VERY VERY happy if some1 could help me with this! I'm getting desperate!
Thx for ur time,
GhOsT
-
erm, you could make 3 triggers, radius 50*50
in the condition put: this AND timeout
in the activation, put
"_x setdammage 1" foreach thislist; starttimer = true
name each trigger t1, t2, t3
in the script, right after you spawn the bombs, put this:
t1 setpos getpos (name of first bomb)
t2 setpos getpos (name of first bomb)
t3 setpos getpos (name of first bomb)
thisll place triggers where the bombs blew up.
now you gotta make it so teh triggers stop killing peopel after a while...
make a new trigger, radius 0*0
make condition: starttimer
make countdown however long after the napalm you want peopel to die
in activation: starttimer = false
now make another trigger, make the activation: nobody present
in the activation field, put starttimer = true
this is just a basic summary of how to do this, there are more advanced ways, but this is the most practical.
be wary though, due to limitations in the "thislist" command, it takes time for everyone in the radius to die (one or two people die at a time, so there is a very short delay between peeps dying)
-
TY! I'll be sure to try it out :)