OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Agent Fire on 18 Aug 2003, 17:13:57
-
I was wondering what was the best way to destroy vehicles; I often use mines on armoured vehicles, but is there an 'on activation' command that I can put on a trigger that will destroy a unit? :hmm:
-
Make a vehicle, name vehicle1 (or whatever)
then make a trigger that is activated by whatever
OnActivation: vehicle1 setdammage 4 (makes vehicle explode)
Or instead:
vehicle1 setdammage 1 (makes vehicle kaputt and burn a bit)
*gg* ;D
-
kaputt and burn a bit? hmmm... I THINK I'll go for 4 this tim...
-
that works and everything, but It doesn't make a vehicle flip into the air at 200mph like mines do... any ideas?
-
camCreate a couple of LGBs at the vehicle's location.
-
What exactly would I put in the activation field to do that?
-
"syntax not guaranteed" ;)
Dunno about LGB, never use em but Heats would do fine. Something like this:
bomb="heat125" camcreate getpos setpos tank1; bomb="heat125" camcreate getpos setpos tank1; bomb="heat125" camcreate getpos setpos tank1; bomb="heat125" camcreate getpos setpos tank1
Something like that.
-
It says 'reserved variable in expression"
-
i blow up stuff alot so i got the syntax
tank1 is your vehicle
"laserguidedbomb" camcreate (getpos tank1)
that simple
wont work with some planes though, sometimes, the planes just drop them (which is also kinda cool)
-
It says 'reserved variable in expression"
yea, that's because the syntax's wrong. But I can't remember the correct one.
-
now it says "type object expect nothing"
-
thats really not normal
in my script, i use this exact line to create the bomb in a carpet bombing script
"laserguidedbomb" camcreate (getpos tank1)
its pasted right out of the script and it works fine
try maybe using different weapons like "rocket57"
-
now it says "type object expect nothing"
Have you named your tank tank1?
-
check attachment
-
should be attached this time
-
armstrong, the mane is not the prablem. i just mada a lirrle mission with tank1 and in its init i put
"laserguidedbomb" camcreate (getpos tank1)
and i got the same arror message
-
look 4 urselves
-
this is weird - does AnYoNe know how to destroy a unit using the activation field of a trigger?
-
Is there any way to set a vehicle's status to 'destroyed' without having to hear it go BOOM? Useful if you want to create a mission on the site of a recent battle. I'm thinking of the play/switchmove commands but they only work with humans don't they?
-
Is there any way to set a vehicle's status to 'destroyed' without having to hear it go BOOM? Useful if you want to create a mission on the site of a recent battle. I'm thinking of the play/switchmove commands but they only work with humans don't they?
Yea, lower both ammo, health and fuel in the three lines.
And Fire, it must be a syntax error. Try searching the forums for "camcreating bombs" or something like that.
-
That doesn't work, they still go BOOM. Sometimes they don't even die at all.
-
That doesn't work, they still go BOOM. Sometimes they don't even die at all.
Are u sure they are down at 0 % ?
-
Yep. Though maybe when they don't explode they aren't quite. They still go BOOM, which isn't much good. Same with the setdammage 1 command.
-
If you set a vehicles ammo and fuel to zero, when it is killed (by moving the health slider to the left or by setdammage 1), it will not explode.
I use this all the time, believe me it works ;)
Agent Fire, what version of OFP are you using? I take it you don't have Resistance?
-
If you set a vehicles ammo and fuel to zero, when it is killed (by moving the health slider to the left or by setdammage 1), it will not explode.
I use this all the time, believe me it works ;)
Agent Fire, what version of OFP are you using? I take it you don't have Resistance?
Hey, I camreated heats/shells with 1.0! It oughta work.
-
Yeah, but the A10 with "laserguidedbomb" was only added later... ;)
-
I could never get "laserguidedbomb" to work with V1.91 either.
_Bomb = ("bomb" camcreate [_XTarget,_YTarget])
_Bomb setdamage 1
Worked for me?
-
I would use:
bomb = "laserguidedbomb" camcreate (getpos unluckybastard)
Worked for me when I wanted a T72 to get blown sky high ;D