Jump to content
Sign in to follow this  
wolffy.au

cB BIS Zone Restriction Module in MP

Recommended Posts

Download - http://creobellum.org/node/177

Summary:

So I did a bit of playing around with the BIS Zone Restriction Module, hoping to keep things interesting in some of my missions. In a nutshell, the ZORA module randomly spawn enemy groups around a player when they exit a zone defined by a trigger.

To begin with, put down the ZORA module:

zora1.GIF

Then place a trigger where you want your units to be safe. When the trigger is activated, any enemy units currently attacking will turn around and head in the opposite direction. Triggers have to be named BIS_Zora_#, where # are consecutive number from 0 upwards:

zora2.GIF

I use the following settings in the INIT of the ZORA module

this setvariable ["debug", true];

- This will place graphical markers down to view the spawned enemy groups

this setvariable ["bordersize", 10000];

- By default, if you pass 1000m past the trigger border, you will be killed. Use this variable to increase that value.

this setvariable ["factionlist", ["BIS_TK_GUE"]];

- This sets the enemy faction that they will spawn. For Operation Arrowhead, you will need to set the variable as above.

this setvariable ["maxgroups", 1];

- This limits the number of groups per player. A point to note about using this module in Multiplayer - each player outside the trigger will have a group spawned for them. This means that the number of enemy groups can get out of hand really quick.

zora3.GIF

Place a playable unit on the map and preview the mission.

zora4.GIF

If during the mission, you want to disable the ZORA module from creating more groups, set the following variable.

BIS_Zora_Pause = true;

- Pause the detection

One other note - there is a bug, when a unit exits a vehicle outside the zone, they will be automatically killed. To prevent this from happening, there is a workaround to pause ZORA when a playable unit enters a vehicle and unpause it once they've all dismounted.

[] spawn {
// anti Zora bug
while {isServer} do {
 // check if no players are in vehicles, unpause ZORA
 if ({vehicle _x != _x} count (playableUnits + [player]) == 0) then {BIS_Zora_Pause = false};
 // wait until any players enter a vehicle
 waitUntil { {vehicle _x != _x} count (playableUnits + [player]) > 0 };
 // then pause ZORA
 BIS_Zora_Pause = true;
 // and wait until no players are in vehicles
 waitUntil { {vehicle _x != _x} count (playableUnits + [player]) == 0};
 sleep 1;
};
};

For information on all the parameters, check here:

http://community.bistudio.com/wiki/Zone_Restriction

Created by: (AEF)Wolffy.au [CTB]

Visit us a http://creoBellum.org

Share this post


Link to post
Share on other sites

Nice! Now I can read the BIKI in the forums!

But what I would like to do is specify the type of groups allowed, for example it seems ignorant to have an AA team to hunt down a lone player.

Share this post


Link to post
Share on other sites

Nice, been following all your mini editing tutorials lately, starting to look like a series - all the useful editing tips that no-one knew about. :)

Share this post


Link to post
Share on other sites
Nice, been following all your mini editing tutorials lately, starting to look like a series - all the useful editing tips that no-one knew about. :)

Excellent news - its working then!! :D

I will continue making more tutorials as I discover interesting stuff within the editor. I've been doing this stuff since OFP days and even I keep finding tips new to me.

Thanks for the positive feedback!

Share this post


Link to post
Share on other sites

Is there any way to make it so that if the player leaves the area, it simply outputs info that other scripts and triggers can pick up on their own? What about spawning a low amount of patrols to harass, not to kill?

Cheers for this!

Share this post


Link to post
Share on other sites
Is there any way to make it so that if the player leaves the area, it simply outputs info that other scripts and triggers can pick up on their own? What about spawning a low amount of patrols to harass, not to kill?

Cheers for this!

If I understand you correctly, a normal trigger will do this for you.

As for number of patrols, adjust the 'maxgroups' variable.

Share this post


Link to post
Share on other sites

Hey, I have a question, is it possible to remove the markers from the map? So we can't like see where the enemys are when we're play. Also is it possible to take off this "popup" on the right side because all the time i see when a unit spawns... a bit annoying... But it is still good, just a question if this was possible!

Share this post


Link to post
Share on other sites
Hey, I have a question, is it possible to remove the markers from the map? So we can't like see where the enemys are when we're play. Also is it possible to take off this "popup" on the right side because all the time i see when a unit spawns... a bit annoying... But it is still good, just a question if this was possible!

Sounds like you still have debug on.

I haven't looked this mission for a while, but I'd say there is a ["debug", true] setting somewhere that shuold be set to false.

Share this post


Link to post
Share on other sites

Hey, I've encountered a bug here. I've added the anti-zora bug for that the vehicle explode when i exit the white zone, like the safe zone (Grey) then the border zone (White) and then i enter another zone outside of border, everytime i exit my vehicle, i get killed. But if i remove the anti-zora bug, i get randomly shot and killed by an anti-tank weapon if i drive/exit the white zone.

Any one have a solution?

- Thanks in advance!

Edited by Speederin

Share this post


Link to post
Share on other sites

Why spawned unit dont attack me? No matter the faction they do nothing while they are categorized as hostiles.

Share this post


Link to post
Share on other sites

Did you place at least 1 unit from their side in the editor itself? If not, you need to use createCenter. Hopefully that would solve your issue.

Share this post


Link to post
Share on other sites

Hey all,

Do you think it's possible to limit the amount of groups hunting players in MP? As you've rightly said Wolffy, it can get a *bit* out of hand in its current state.

I was thinking maybe keeping an array of all spawned groups and when the element count gets to x, stop spawning groups.

Share this post


Link to post
Share on other sites

As always Wolffy.au, your work is greatly appreciated. I often click on your name and go to "all threads started by.. " because you've done so much useful stuff.

About this thread;

What I think I'm seeing is this; lets say you set the limit to "3 per player". And then you and your buddy manage to fight off all the groups.... that's it. No more groups will spawn.

What I think would be really fantastic would be if this could be modified so that if/when you take out the groups coming after you, new ones are spawned in their place.

I'd like to be able to use this as sort of an super quick/easy way to set up sandbox missions where you can simply roam around a map and have endless groups coming after you. And I think this would work great for that use if that modification is possible.

Share this post


Link to post
Share on other sites

Thanks R.Flagg.

I haven't looked at this code for a while. I thought it would continue to spawn groups.

If I get back into it, I'll see if the groups can respawn.

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  

×