Safe Haven/Anti-Base-Rape scriptYou can down load it from
here (version 0.1 beta).
DescriptionThe script does 2 things:
1. if an enemy player injures someone in the zone then the "safe" player is not damaged and the enemy player receives that damage instead.
2. if an enemy player kills a "safe" player outright in the zone then both the enemy and the "safe" player are killed. Can't do much about this unfortunately as thats the way the eventhandlers are hard wired but at least the enemy is only going to kill one person before he gets his just deserts.
Therefore you can look but don't touch.
DiscussionAlthough this script is based on the work of Dinger for OFP from the OPFEC forum getting this to work hasn't been easy as it took me about 6 hours before I realised that the list of units for each side defined in the init sqf changes every time a player dies and needs to be recompiled for the eventhandlers to work properly - you won't believe the things I've tried along the way but I could write a book.
To implementYou'll need to define 3 arrays in the init.sqf that contain the unit's names for each side (west, east and independent). Also copy across the remaining code from the init.sqf and that should be about it other than copying across the anti_base_rape folder. The safe zones are currently marked at 100 metres from the respawn markers but you can extend those by editing the anti_base_rape_killed and hit sqfs that you can find in the anti_base_rape folder. One of the cool things about this is if you are in a vehicle and you kill someone in a safe zone then your vehicle is always destroyed and you are killed about 70 % of the time.
TestedVersion 1.08. I've tested it on both local and dedicated servers with 2 players and it works well under these conditions.
MissionsTry out the test mission included you'll need at least 2 human players. The big red circle on the map is the radius of the east players safe zone. Oh it also works with team killers within the safe zone.
Good luck,
norrin
OFPEC DOWNLOAD