Jump to content
Sign in to follow this  
jshock

Disabling Burn Effect?

Recommended Posts

Hello A3 Dev Community,

I was wondering if there was some way to disable the burn effect of vehicles and/or delete and respawn the vehicle after it begins to burn.

Main reason for this is because my regiment has official operations every Saturday and this last one our entire infantry platoon froze and had to restart Arma, twice, because of the fire from crashed/destroyed vehicles.

I would also like it to be checked every once in a while by the server so I don't have to have a radio trigger set up, but my lack in understanding how to do that without causing server lag and such has kept me from trying to do this below.

Here was my crack at it:

if (isServer) then {

_vehicle = _x isKindof "AllVehicles";
_burning = isBurning _vehicle;

if (_burning) then {

	deletevehicle _vehicle;
};

};

I'm still kind of new to scripting, but I am trying my best to get better at this, any help would be greatly appreciated.

If this is posted somewhere else please let me know where and I will delete this thread afterwards, thanks :).

Edited by JShock

Share this post


Link to post
Share on other sites

I believe isBurning doesn't work on vehicles only units.

You may have to just do a getdamnage instead.

Share this post


Link to post
Share on other sites
I believe isBurning doesn't work on vehicles only units.

You may have to just do a getdamnage instead.

Ok, so it would look something like this:

if (isServer) then {

_vehicle = _x isKindof "AllVehicles";
_burning = getdamage _vehicle;

if (damage _burning == 1) then {

	deletevehicle _vehicle;

};

};

Edited by JShock
Edit: This code still didn't work...not really sure what would be causing it, unless it's syntax somewhere...?

Share this post


Link to post
Share on other sites

Neither of the above seem to be working at all, anyone have an idea of how to do this?

Share this post


Link to post
Share on other sites

What you need is to use an Eventhandler, I'm just not sure which one.

When I tried it I got some odd results, I think this is one I tried.

unitname addeventhandler ["hit",{if (damage (_this select 0) > 0.91) then {deletevehicle (_this select 0)} }];

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  

×