Jump to content
Sign in to follow this  
B-Man

Temporary Invincibility on Respawn (Spawn Protection)

Recommended Posts

I currently have an armex-like mission in the making. However, spawn protection has been a problem. I enabled respawning for the mission, but players would simply camp the spawn and irritate everyone else.

My first solution to this was creating a trigger that covers spawn. Whenever a player entered the spawn area, the trigger would set off, disabling damage for that player. Once the trigger deactivates damage is re-enabled. However, I have found this can be quite abusable and is a little excessive in my opinion. It could be better.

What I've been trying to do is find a script that protects the player on respawn and displays a hint saying "Spawn Protection On", counts down ten seconds, then enables damage again displaying "Spawn Protection Off". However, I am not much of a scripter. Could someone give me some direction on how to script this? Any help is appreciated.

Share this post


Link to post
Share on other sites

why not just call a script on respawn with "MPRespawn" event handler ?

// make player invincable
player allowDamage false;

// tell player that he/she currently has spawn protection.
titleText ["\n\nSpawn Protection - ON","PLAIN DOWN"];
titleFadeOut 5;

// wait 10 seconds
sleep 10;

// tell player they no longer have spawn protection.
titleText ["\n\nSpawn Protection - OFF","PLAIN DOWN"];
titleFadeOut 5;

// make player killable :)
player allowDamage true;

if you still have an issue with spawn camping after that you could just make the player invincible until he shoots ("Fired" event handler) or gets in a vehicle then its open season on him..

Edited by Nimrod_Z

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  

×