OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Agent Fire on 18 Aug 2003, 17:13:57

Title: Destroying vehicles
Post 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:
Title: Re:Destroying vehicles
Post by: DrStrangelove on 18 Aug 2003, 17:29:22
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
Title: Re:Destroying vehicles
Post by: Agent Fire on 18 Aug 2003, 17:36:08
kaputt and burn a bit? hmmm... I THINK I'll go for 4 this tim...
Title: Re:Destroying vehicles
Post by: Agent Fire on 18 Aug 2003, 17:39:14
that works and everything, but It doesn't make a vehicle flip into the air at 200mph like mines do... any ideas?
Title: Re:Destroying vehicles
Post by: macguba on 18 Aug 2003, 17:59:58
camCreate a couple of LGBs at the vehicle's location.
Title: Re:Destroying vehicles
Post by: Agent Fire on 18 Aug 2003, 18:06:14
What exactly would I put in the activation field to do that?
Title: Re:Destroying vehicles
Post by: dmakatra on 18 Aug 2003, 18:33:45
"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.
Title: Re:Destroying vehicles
Post by: Agent Fire on 18 Aug 2003, 19:24:14
It says 'reserved variable in expression"
Title: Re:Destroying vehicles
Post by: _Ross_ on 18 Aug 2003, 20:17:25
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)
Title: Re:Destroying vehicles
Post by: dmakatra on 18 Aug 2003, 20:19:49
It says 'reserved variable in expression"
yea, that's because the syntax's wrong. But I can't remember the correct one.
Title: Re:Destroying vehicles
Post by: Agent Fire on 18 Aug 2003, 20:21:51
now it says "type object expect nothing"
Title: Re:Destroying vehicles
Post by: _Ross_ on 18 Aug 2003, 20:26:41
thats really not normal
in my script, i use this exact line to create the bomb in a carpet bombing script

Quote
"laserguidedbomb" camcreate (getpos tank1)

its pasted right out of the script and  it works fine

try maybe using different weapons like "rocket57"
Title: Re:Destroying vehicles
Post by: dmakatra on 18 Aug 2003, 20:37:01
now it says "type object expect nothing"
Have you named your tank tank1?
Title: Re:Destroying vehicles
Post by: Agent Fire on 18 Aug 2003, 20:41:11
check attachment
Title: Re:Destroying vehicles
Post by: Agent Fire on 18 Aug 2003, 20:48:00
should be attached this time
Title: Re:Destroying vehicles
Post by: _Ross_ on 18 Aug 2003, 20:59:26
armstrong, the mane is not the prablem. i just mada a lirrle mission with tank1 and in its init i put
Quote
"laserguidedbomb" camcreate (getpos tank1)

and i got the same arror message
Title: Re:Destroying vehicles
Post by: Agent Fire on 18 Aug 2003, 21:02:59
look 4 urselves
Title: Re:Destroying vehicles
Post by: Agent Fire on 18 Aug 2003, 21:38:33
this is weird - does AnYoNe know how to destroy a unit using the activation field of a trigger?
Title: Re:Destroying vehicles
Post by: Drozdov on 18 Aug 2003, 21:52:42
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?
Title: Re:Destroying vehicles
Post by: dmakatra on 18 Aug 2003, 21:58:47
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.
Title: Re:Destroying vehicles
Post by: Drozdov on 18 Aug 2003, 22:06:02
That doesn't work, they still go BOOM. Sometimes they don't even die at all.
Title: Re:Destroying vehicles
Post by: dmakatra on 18 Aug 2003, 22:33:09
That doesn't work, they still go BOOM. Sometimes they don't even die at all.
Are u sure they are down at 0 % ?
Title: Re:Destroying vehicles
Post by: Drozdov on 18 Aug 2003, 22:40:27
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.
Title: Re:Destroying vehicles
Post by: Sui on 19 Aug 2003, 02:23:31
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?
Title: Re:Destroying vehicles
Post by: dmakatra on 19 Aug 2003, 07:48:29
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.
Title: Re:Destroying vehicles
Post by: Sui on 19 Aug 2003, 11:43:14
Yeah, but the A10 with "laserguidedbomb" was only added later... ;)
Title: Re:Destroying vehicles
Post by: Unnamed on 19 Aug 2003, 14:07:29
I could never get "laserguidedbomb" to work with V1.91 either.

Code: [Select]
_Bomb = ("bomb" camcreate [_XTarget,_YTarget])
_Bomb setdamage 1

Worked for me?
Title: Re:Destroying vehicles
Post by: KyleSarnik on 19 Aug 2003, 14:46:21
I would use:

Code: [Select]
bomb = "laserguidedbomb" camcreate (getpos unluckybastard)
Worked for me when I wanted a T72 to get blown sky high  ;D