Jump to content
5133p39

Destroy car engine without visual damage?

Recommended Posts

Is there a way to destroy vehicle's engine without making the vehicle look damaged?


For example:
1.) Place the Offroad vehicle (C_Offroad_01_F)
2.) Add "this setHitPointDamage ["hitengine", 1.0];" into the init field.
3.) Start the mission and see how it is riddled with bullets - THAT IS BAD.

I need a vehicle with broken engine which can be later repaired.
If you drown the vehicle in water, the engine will get destroyed, but the vehicle will still look intact - i need similar behavior, except i cannot drown the vehicle in water, because afaik it cannot be made functional again, and it takes time until the vehicle gets drowned, which means delaying mission start by approx. 10 seconds, which is not an option.
Playing with fuel is also not an option, as the vehicle needs to retain its fuel, and i dont want to add unnecessary scripts for ensuring the fuel gets removed if player tries to refuel it, etc.
So, how?

Share this post


Link to post
Share on other sites
11 minutes ago, 5133p39 said:

If you drown the vehicle in water, the engine will get destroyed, but the vehicle will still look intact - i need similar behavior, except i cannot drown the vehicle in water, because afaik it cannot be made functional again, and it takes time until the vehicle gets drowned, which means delaying mission start by approx. 10 seconds, which is not an option.

What you are observing there are broken destruction RVMATs - none of them are working in water, even if vehicle is fully destroyed.

You could try play with https://community.bistudio.com/wiki/setObjectMaterial

that means though, that regular destruction materials will be broken (unless vehicle is fully destroyed)

Share this post


Link to post
Share on other sites

Well, i ended up adding "Engine" event handler that shuts the engine down if started, but i was hoping for better, more "sensible" solution based on engine hitpoints.
And to give the player at least some visual indication of what the hell is going on, i set the engine damage to 0.4 to make the indicator orange (though that is still misleading, because normally you can still drive with orange engine).

Share this post


Link to post
Share on other sites

I didn't try, but maybe using setHitPointDamage and setting the third element to false?

 

Quote

vehicle setHitPointDamage [hitPointName, damage, useEffects]

 

useEffects (Optional): Boolean - false to skip destruction effects. Default: true (Since Arma 3 v1.67)

 

Share this post


Link to post
Share on other sites
On 5/20/2020 at 6:13 PM, Erwin23p said:

I didn't try, but maybe using setHitPointDamage and setting the third element to false?

Nope, it makes no difference in regards to the damage textures.
I tried that, and the third parameter only prevented any accompanying particle effects, explosions, etc. - ie. using this, you can set the damage to 100% without causing any explosions, fire, smoke, but it won't affect whether the damage textures are applied or not.

I also tried all the other commands (setHit, setHitpointDamage, and setHitIndex), but all of them have the same result here - if you set the engine damage to 0.5 or higher, it "activates" the damage textures.
I did a lot of experiments like setting engine damage and then trying to set hull damage to zero, hoping it will revert the visual hull damage, mixing these commands, hoping i would find a combination allowing me to get broken engine with no visual damage, but nope.

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

×