Jump to content
Sign in to follow this  
havocsquad

Prevent Player death in vehicle

Recommended Posts

I searched and looked around but couldn't find any info on this, so here is my question...

I'm asking whether there is a method at least about 90% effective that will prevent the player from dying in a vehicle heavily damaged but not destroyed and causing "ondeathcamera" to occur.

It is a Single player mission and no respawning of any units.

Thanks.

Later,

Havoc.

Share this post


Link to post
Share on other sites

hm i am not certain if i got ya right here. if its not the veh explosion which causes the player, so its the players/infrantry's health itself. just heal him at some point.

Share this post


Link to post
Share on other sites

just add the following thingys when he is in the vehicle (should make him invincible)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addeventhandler ["hit", {this setdammage 0}]; this addeventhandler ["dammaged", {this setdammage 0}]

Altough i dont know what happens when the vehicle gets blown up  smile_o.gif

Share this post


Link to post
Share on other sites

I did this recently in a quick test of some modified machine gunners. I made myself invincible while driving a humvee directly at a group of machinegunners, and I remained very much alive until the constant fire finally destroyed the humvee. At which point the deathcam kicked in.

The "hit" eventhandler should work just fine as long as the vehicle hasn't been destroyed. You'll want to add the eventhandler to the player, though, and not the vehicle.

Share this post


Link to post
Share on other sites

Sounds goods, I thought it might involve that but I wanted to be more certain.

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  

×