Arma 3
Zyme May 1, 2016 @ 5:37pm
Detect if player is outside play area
I created a marker named "gamearea" where I want players to stay. If they go outside it they will die.

But it is not triggering:

_trg = createTrigger ["DetectPlayerOutsideArea", getmarkerpos "gamearea"];
_trg setTriggerArea [ getMarkerSize "gamearea" select 0,getMarkerSize "gamearea" select 1,markerdir "gamearea",true];
_trg setTriggerActivation ["ANY", "PRESENT", true];
_trg setTriggerStatements ["!(player in thisList)", "hint 'Warning, outside play area!'; player setDamage 1;", ""];
< >
Showing 1-4 of 4 comments
IM SORRY BUFFALO May 1, 2016 @ 10:03pm 
just a quick easy thought, possibly have a trigger(s) going around the outside of the play area with the activation set to any present to activate, and then setDamage 1;? cause from looking at it you want your players to have setDamage 1; on them when they go outside the area, but why do you have the activation set to any present? are the players suppost to die outside of the trigger, or inside of the trigger?
Zyme May 1, 2016 @ 10:30pm 
Originally posted by TKgokitty199:
just a quick easy thought, possibly have a trigger(s) going around the outside of the play area with the activation set to any present to activate, and then setDamage 1;? cause from looking at it you want your players to have setDamage 1; on them when they go outside the area, but why do you have the activation set to any present? are the players suppost to die outside of the trigger, or inside of the trigger?

This trigger is as big as the game area and is reverse with "!", so if they go outside it they die.

Sure I could make 4 triggers around it but it seems easier to make a big one with one marker.

Also I rather want to damage the player slowly not kill them, if it is possible.
Last edited by Zyme; May 1, 2016 @ 10:34pm
NobodysLaw May 1, 2016 @ 11:59pm 
condition:
this && vehicle player in thisList

on activation:
[["2"], "deatharea.sqf"] call BIS_fnc_execVM

on deac:
[["1"], "deatharea.sqf"] call BIS_fnc_execVM

deatharea.sqf
_nr = _this select 0; switch(_nr)do { case "1": { missionNamespace setVariable [format["%1_hp", player], getDammage player]; missionNamespace setVariable [format["%1_loop", player], 1]; while{(missionNamespace getVariable format[format["%1_loop", player]]) == 1}do { player setDamage (getDammage player + 0.05); hint "You are taking damage! Go back!"; sleep 1; } }; case "2": { missionNamespace setVariable [format["%1_loop", player], 0]; player setDamage (missionNamespace getVariable format[format["%1_hp", player], 0]); }; };
Last edited by NobodysLaw; May 2, 2016 @ 12:02am
MrMessy187 May 13, 2016 @ 6:01pm 
hey,

That's actually a really nice snippet, i also have use for this.

Domino
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: May 1, 2016 @ 5:37pm
Posts: 4