Jump to content
Sign in to follow this  
HateDread

Destroying Vehicles so They Catch Alight?

Recommended Posts

Hey guys,

How do you make a vehicle explode and catch alight?

"this Setdamage 1" doesn't work - it turns the vehicle into a wreck.

The ideal solution would be for the vehicle to be explode, and catch alight, with a simple command.

And for other situations, how do I get this without creating a sound? Like if I want burning wrecks at mission start, but don't want player to hear the 'BANG's. I know you can set fire to wrecks, but it isn't the same. I'm after the fire with the large plume of smoke, etc.

Share this post


Link to post
Share on other sites

It's quite simple: you need to create an explosion. Just use this code in a trigger:

bomb = "Bo_GBU12_LGB" createVehicle getPos vehicleName

"Bo_GBU12_LGB" it's the type of the bomb you want to cause the explosion (here is a list: http://community.bistudio.com/wiki/ArmA_2:_Weapons#Artillery_Weapons_and_Special_Ammo . You have to choose in the section "Vehicle & Static Weapons" or "Artillery Weapons and Special Ammo"; take only "Ammo classnames" entries). VehicleName indicates the name of the vehicle you want to explode. In practice with this command you create a bomb magazine on the object (in your case a vehicle); the bomb will explode, creating the effect you were searching for.

Let me know if there are troubles!

Share this post


Link to post
Share on other sites

The problem with using LGB is that it's so powerful, it sometimes blasts the vehicle tens of meter across the map. If that's not the required effect, an M119 shell would be better and much smaller too - an LGB is quite big so can sometimes be seen as it spawns! :)

Share this post


Link to post
Share on other sites
It's quite simple: you need to create an explosion. Just use this code in a trigger:

bomb = "Bo_GBU12_LGB" createVehicle getPos vehicleName

"Bo_GBU12_LGB" it's the type of the bomb you want to cause the explosion (here is a list: http://community.bistudio.com/wiki/ArmA_2:_Weapons#Artillery_Weapons_and_Special_Ammo . You have to choose in the section "Vehicle & Static Weapons" or "Artillery Weapons and Special Ammo"; take only "Ammo classnames" entries). VehicleName indicates the name of the vehicle you want to explode. In practice with this command you create a bomb magazine on the object (in your case a vehicle); the bomb will explode, creating the effect you were searching for.

Let me know if there are troubles!

Ahh thank you.

This does create the final effect I was after, but my only problem is with the sound, and the actual explosion. I am after the effect of a car reaching 0 HP via gunfire or something - there isn't a big explosion with a big cloud, just a bang, fire, and a smoke plume.

I will be using your solution untill I find the exact effect I am after.

Cheers.

Share this post


Link to post
Share on other sites
Ah. You need to spawn a fire under the car then. Damage the car using setdamage, then set it alight.

http://www.ofpec.com/COMREF/index.php?action=details&id=170&game=All

In Trigger's OnAct:

BoomTruck1 inflame true;

Where the truck is called BoomTruck1.

Doesn't seem to have any effect?

The only way I achieved what I wanted in the past is to setpos the vehicle a few hundred metres in the air, so it blew up on impact with the ground. It's clumsy and hard to do without the player noticing, though.

Any ideas?

Share this post


Link to post
Share on other sites

Won't setting the car's damage to a bit less than 1 cause it to spontaneously catch fire a short time afterward? You may want to play around with that and see what you get (aka this setDammage 0.9;).

Share this post


Link to post
Share on other sites
Still a no-go. :/

Any other ideas, matey?

Yeah, ask someone who knows what they're talking about. :), like Galzo. ^^^^:D

Share this post


Link to post
Share on other sites
Won't setting the car's damage to a bit less than 1 cause it to spontaneously catch fire a short time afterward? You may want to play around with that and see what you get (aka this setDammage 0.9;).

This seems like a step in the right direction - anything higher than 0.9 causes the car to eventually catch fire and become destroyed. The only thing missing is the sound - the small 'boom' when a vehicle reaches 0 health in a more conventional manner.

Any ideas?

And thank you for trying, TankBuster :)

Share this post


Link to post
Share on other sites
The problem with using LGB is that it's so powerful, it sometimes blasts the vehicle tens of meter across the map. If that's not the required effect, an M119 shell would be better and much smaller too - an LGB is quite big so can sometimes be seen as it spawns! :)

:D yeah, you're right! It was a destructive example :p

Share this post


Link to post
Share on other sites
This seems like a step in the right direction - anything higher than 0.9 causes the car to eventually catch fire and become destroyed. The only thing missing is the sound - the small 'boom' when a vehicle reaches 0 health in a more conventional manner.

Any ideas?

And thank you for trying, TankBuster :)

You're welcome. About your small boom, if the vehicle doesn't do that when it eventually gets fully damaged, you might be able to script it.

Attach a killed eventhandler to the vehicle and play a boom noise when it's triggered.

Or put a small trigger over the vehicle. When it becomes a wreck, it changes side to civilian. So when a civ enters the trigger area, have an explosion effect as an environmental sound.

http://community.bistudio.com/wiki/trigger#Effects

Share this post


Link to post
Share on other sites
You're welcome. About your small boom, if the vehicle doesn't do that when it eventually gets fully damaged, you might be able to script it.

Attach a killed eventhandler to the vehicle and play a boom noise when it's triggered.

Or put a small trigger over the vehicle. When it becomes a wreck, it changes side to civilian. So when a civ enters the trigger area, have an explosion effect as an environmental sound.

http://community.bistudio.com/wiki/trigger#Effects

I got it!

If the unit is at full health AND THEN triggered to setdamage 0.99, it instantly bursts into flame, with the explosion and the plume of smoke!

Thank you to all involved!

Much appreciated.

- HateDread

Share this post


Link to post
Share on other sites

I know this is quite an old thread, but this may still be of use to it's author. This was a method I was made aware of a while back.

How to use

[unit,intensity,time,lifecheck,fade] spawn BIS_Effects_Burn

unit: the name of the object that the fire will be attached to

intensity: the intensity of the fire. Recommended to use values between 0.7 and 10, higher values may be used if desired though.

time: the time that the fire started. use global variable "time". this is used to keep effects synced for JIP players

lifecheck: if this is true then the unit will only burn as ling as it is dead (!alive unit). set to false to burn things like buildings and gamelogics

fade: if true then the fire will die down over time, eventually dying out. set to false if you want it to keep burning. (affected by rain too).

If you want to kill a fire you can delete the object it is attached to.

hint: you can attach a gamelogic to a moving object via the attachto command, and then make the gamelogic burn.

that way you can kill the fire without deleting the object.

So to make an object called 'vehicle1' burn indefinitely with a large fire, I would set a trigger up with:

  • Condition:
    • getDammage vehicle1 > 0.99

    [*]Activation:

    • nil = [vehicle1, 10, time, false, false];

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×