Jump to content
Nutzgo

Indestructible car tires?

Recommended Posts

Hi.
I'm making a small Kart mission. I've set the vehicle attributes to disable damage, but the kart wheels/tires could be destroyed when crashing.

I also tried evading this, by setting vehicle respawn when vehicle disabled or abandoned by 1m - but that only works one time. E.g. I get into the kart, then I leave it - a new one respawns. When I get out of this new one, the respawn doesn't seem to work anymore.
Any solutions?

Share this post


Link to post
Share on other sites
<vehicle> allowDamage false

disables damage for all vehicle parts.

About respawn, describe method of

Quote

setting vehicle respawn when vehicle disabled

first

Share this post


Link to post
Share on other sites

Place this in the init of the desired vehicle

 

Quote

this addEventHandler ["HandleDamage", { if ((_this select 1) find "wheel" != -1) then { 0; }else { (_this select 2); }; }];

You may see the tire get destroyed for a fraction of a frame depending on whats going on but it works(I.E crew wont dismount)

Share this post


Link to post
Share on other sites
2 hours ago, pierremgi said:

Not very easy. Similar topic here. Don't mind for the "bullet proof" sense. Any kind of damage is taken into account. It's important to read all the topic.

 

Thanks. I will try out redarmys version first.

 

8 hours ago, davidoss said:

<vehicle> allowDamage false

disables damage for all vehicle parts.

About respawn, describe method of

first

 

Isn't this the same as this in the editor: Attributes -> Unheck Enable Damage?

Respawn method: I have a vehicle respawn module synced to the vehicles.

 

 

2 hours ago, redarmy said:

Place this in the init of the desired vehicle

 

You may see the tire get destroyed for a fraction of a frame depending on whats going on but it works(I.E crew wont dismount)

 


Will check it out, thanks.

Share this post


Link to post
Share on other sites

put this in init fireld  for every vehicle for sure (in case you have enabled respawn on start)

this allowDamage false;
Quote

Respawn method: I have a vehicle respawn module synced to the vehicles.

In respawn module there are expression field. Paste this inside:

 

if (isServer) then {
params [["_newVeh", objNull,[objNull]], ["_oldVeh", objNull,[objNull]]];
_newVeh allowDamage 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

×