Forum Jump :

Author Message


Posts: 29
Rank:


Level: Member

Country: au
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2016-09-21 03:14        
     
Hi there,

Does anyone know how to use the zone restriction module? I cant seem to find any official documentation on it. Syncing it with a trigger and units isnt giving me the desired effect I want.

Im making a PvP mission, where if you leave the zone, a message comes up saying go back. If the unit is still outside the zone after 10mins then they are killed.

Any ideas?

Thanks


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 58
In-game name: Kobayashi Maru

 
#2 Posted at 2016-09-21 03:39        
     
Bah! It's easy to replace by 2 triggers:

in cond. field !(player in thisList) (BLUFOR present)

- one for the message with no delay, repeatable
in on act: Hint "return back to base!"

- the other one for the kill, with a 600 sec timeout:
in on act: player setDamage 1

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Advertisement


Author Message


Posts: 29
Rank:


Level: Member

Country: au
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2016-09-21 03:59        
     
Cool. This currently works in the editor. But is it safe for multiplayer?

Added 2 hours 2 minutes later:

Are you able to tell me why this doesn't work currently

while {true} do {
_InsideZone = player inArea _marker;
if !(_insideZone) then {
hint "You're not in the zone"};
sleep 1;

};

Im having trouble with getting my code to check if something is true or not.

The InArea command returns a boolean, so how come when I put _InsideZone into an if statement it isn't seen as a boolean?

Added 9 minutes later:

it works if i use a trigger instead of _marker. Documentation says i can use a marker though so i dont see why it doesnt work. I guess ill just place a blank trigger

This post was edited by danjoo (2016-09-21 06:12, 762 days ago)


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 58
In-game name: Kobayashi Maru

 
#4 Posted at 2016-09-21 09:29        
     
inArea has some bug with rectangle or ellipse a & b axis. A must be greater than or equal to b if I remember.

And what is _marker? you should have a string here, in regard of an exiting (created/edited) marker.And a global marker, not a local one.

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Author Message


Posts: 29
Rank:


Level: Member

Country: au
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2016-09-22 01:18        
     
yea _marker was just a place holder for my "anymarkername" string when i was writing an example. My actual code has the string. Everything is working as intended now :)