Jump to content
Sign in to follow this  
bulletoothdan

Zone restriction

Recommended Posts

Guys is there a way of allowing only certain players into an area on a map? i.e. i want to restrict entry to one airbase on takistan to a group of players, not ai, i also need to keep ai out of the area other, other players must still have access to the remainder of the map just not one particular area, bit like having a spec ops training area that not everyone can access unless there name is added to say a trigger or the like?

Thanks for any help and advice given!

Share this post


Link to post
Share on other sites

Create an array in your init.sqf with the names of the allowed memebers.

zrgrp = [guys,that,are,allowed];

Set up the trigger to activated repeatedly for everyone. that covers the area you want to restrict.

In the on activation of the trigger:

{if (_x !(in zrgrp)) then {_x setpos [pos,where,they should go];};} forEach thisList;

This is not tested but should work.

Share this post


Link to post
Share on other sites

I need some clarification on Zone restriction. Does the spawned AI know where the player is? I have a slight impression that they know, they always seem to come straight towards the player, i thought i could use Zone restriction to replace a spawn script, but if the AI knows where the player is always, then its no good for me. I wanted to populate a map with enemy troops and vehicles, that would spawn dynamically. Like if the player was encountering the enemy as he would advance on the terrain.

Share this post


Link to post
Share on other sites

Pretty sure i did read on the biki or somewhere that the Zone Restriction keeps spawning AI that hunts the player until hes dead, because you are trying to deny an area to a unit through death or the fear of death i guess.. So i think they do know where the player is.

ACM sounds more like what you're after CarlosTex.

I have just bumped the ACM topic as it goes.. its in this forum [Ambient Combat Module]

Share this post


Link to post
Share on other sites

Yeah but how well does ACM module work on a MP mission? I need a script that deletes the units when player is far away and spawns them back when player gets within, let's say, 1000 meters distance. Those units would patrol an area defined by a marker radius.

I like cB_TaskPatrol, but the units don't respawn. I would like to define a number of respawns for them. And i don't want to use the Caching System because it fucks up respawned air units.

Share this post


Link to post
Share on other sites
Yeah but how well does ACM module work on a MP mission? I need a script that deletes the units when player is far away and spawns them back when player gets within, let's say, 1000 meters distance. Those units would patrol an area defined by a marker radius.

I like cB_TaskPatrol, but the units don't respawn. I would like to define a number of respawns for them. And i don't want to use the Caching System because it fucks up respawned air units.

What you looking for is either DAC or MSO.

DAC

and here

MSO and here

Share this post


Link to post
Share on other sites
Create an array in your init.sqf with the names of the allowed memebers.

zrgrp = [guys,that,are,allowed];

Set up the trigger to activated repeatedly for everyone. that covers the area you want to restrict.

In the on activation of the trigger:

{if (_x !(in zrgrp)) then {_x setpos [pos,where,they should go];};} forEach thisList;

This is not tested but should work.

- I want to get the pos from a marker so I would use getmarkerpos but I do not know where to put it

- Do I have to run it from the init.sqf

- How would I kill the player if he / she tried to go in again

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  

×