Author: norrin
Author Website:

Requirements: No addons required

Version: 4.0

Short description:

Date: 2007-11-06 13:44

Comments: (1)


Out-of-bounds zone script

When a player enters a defined zone on the map he gets an onscreen warning message:

"You are leaving the field of combat. You have 10 seconds to return to the battlefield"

A timer starts counting down and if he hasn't left the zone in that time he will die. If he does leave the zone the message and timer disappear and the player is unharmed.

1. Copy across the boundary.sqf into your mission directory.
2. Set up your respawn settings in your description.ext as normal.
3. Create some rectangular or ellipse shaped markers on the map. I've given them the names "Out_of_Bounds_1" and "Out_of_Bounds_2" in the example mission in the zip file.
4. In the init.sqf you'll need a line of code activating the boundary.sqf for each zone like the following:
call {["name_of_zone"] execVM "boundary.sqf"};
So in my example mission where I have 2 zones called "Out_of_Bounds_1" and "Out_of_Bounds_2" the init.sqf looks like this:
waitUntil { player == player};
call {["Out_of_Bounds_1"] execVM "boundary.sqf"};
call {["Out_of_Bounds_2"] execVM "boundary.sqf"};

if (true) exitWith {};
5. Fire up your mission and test it out

Version 1.08 with two players

Test mission:
I've marked the two boundary zones with some wire so you can identify them more easily in game. Also try driving the Hummer into the zones and see what happens.

This script is designed so that it will only work with players. Its possible to revise it so it works with both playable AI and unplayable AI but they're going to have no idea they've entered a no go zone. I can also change it so that the player gradually loses health say 0.1 damage per sec after the timer expires.

Forum topic:

Enable javascript to be able to download from Armaholic please!

Tags: No tags