Jump to content
Sign in to follow this  
wyattwic

General scriping help needed

Recommended Posts

Hello everyone, I have been searching the BWIKI and google for a few days now without any success, so I am just going to blurt it out here.

In multiplayer, when a M2 tripod with AI are spawned, I am unable to give the AI infinite health however the M2 is perfect.

Current init: this addEventHandler ["HandleDamage", {false}]; {x_ addEventHandler ["HandleDamage", {false}]} foreach crew this; this addEventHandler ["Fired",{(_this select 0) setVehicleAmmo 1}];

Urgent help would be nice!

Share this post


Link to post
Share on other sites

Into your units init.

//invincible.
//if you are using this then remove the "Handle damage" part.
this allowdamage false;
//infinite ammo.
this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}];
//Handle damage(how much damage unit will recieve(unnecessary)).
//If you are using this then remove the "Invincible" part.
this addEventHandler ["HandleDamage", {false}];
this addEventHandler ["Hit", {this setDamage (0.5 + getDammage this)}]; //Recieves 50% damage.

Edited by sudslv

Share this post


Link to post
Share on other sites

"this allowdamage false" works perfectly for the turrent, but not the AI on the turrent.

Any ideas?

Share this post


Link to post
Share on other sites
this allowDamage false; gunner this allowDamage false;

Share this post


Link to post
Share on other sites

did not know you can target seats like that. thanks.

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  

×