Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
SpecterM

Giving a player warning

Recommended Posts

I was setting up this tutorial on how to give a player a warning upon leaving a certain area. The problem Im having is that the warning is displayed to all players when 1 player leaves the area. Anyone know how I can isolate the warning to just the player that is leaving the area?

Give a warning when player leaves the bordered area or kill them

use (F3) trigger, define your area with your axis(I will use same as my border), activation = bluefor/opfor repeatedly, detected by bluefor/opfor and on dea you want to add the following

 titletext ["You are going outside the battle area!!","plain down"]

here is a trigger that gives a warning if the bluefor player leaves the 200X200 circular border.

th_outofareatrigger.jpg

To kill the player for going too far you would use(F3) trigger, define your area with your axis(I will use same as my border), activation = bluefor/opfor repeatedly, detected by bluefor/opfor and on dea you want to add the following

 player setdamage 1

**I had to use a trigger for each team.**

Share this post


Link to post
Share on other sites

this works a treat, its great for Team Deathmatch... and is being actively used in [NGS]'s TDM missions from now on :D 5/5

Share this post


Link to post
Share on other sites

Isnt hint played locally? I'd imagine that would be better...

Share this post


Link to post
Share on other sites

There are much better ways to do this.

Place your trigger with your area, and give it a name. Set activation to anybody present.

Then from the init.sqf, execVM this script:

while{local player}do{
 waitUntil{alive player && !(player in list [i]triggername[/i])};
 cutText ["You are going outside the battle area!! You have 5 seconds to return!","PLAIN DOWN",1];
 sleep 5;
 if(player in list [i]triggername[/i] && alive player)then{
   player setDammage 1;
   cutText ["You have been killed for leaving the battlefield","PLAIN DOWN",1];
 };
};

Share this post


Link to post
Share on other sites
Sign in to follow this  

×