Well Terox, if you're still interrested in the method i suggested
you, here's the working version:
How to setup a nofire-zone:
You need to 5 triggers:
Trigger 1: the nofire-zone trigger
size: as big as you want your nofire-zone (e.g: 20/20)
activation: anybody/present/once
name: triggerA
condition: this
Trigger 2: the outer nofire-zone trigger (place it at the same spot,
where the nofire-zone trigger is)
size: bigger than the nofire-zone trigger (e.g: 40/40)
activation: anybody/present/once
name: triggerB
condition this
Trigger 3: init-trigger
size: 0/0
activation: none/once
countdown: min: 0.1 / max: 0.1 / mid: 0.1
condition: true
onActivation: updlistA = true
Trigger 4: update nofire-zone trigger
size: 0/0
activation: none/repeatedly
countdown: min: 0.1 / max: 0.1 / mid: 0.1
condition: updlistA
onActivation: "_x addeventhandler [{fired}, {_this select 0 setDammage 0.95}]" forEach list triggerA; updlistB = true; updlistA = false
:important note - the countdown is required to get this whole thing to work (strange OFP editor)
Trigger 5: allow fire outer nofire-zone
size: 0/0
activation: none/repeatedly
condition: updlistB
onActivation: nofire = list triggerB - list triggerA; "_x removealleventhandlers {fired}" forEach nofire; updlistB = false; updlistA = true
:note - this method causes any unit who fires inside the area of the
nofire-zone to receive a damage of 0.95 => unit will have to crouch
from now. If you want to kill the unit, change the setdammage from 0.95
to 1
: optional onActivation: "_x addeventhandler [{fired}, {_this select 0 setDammage 0.95; hint format [{%1 was firing inside the nofire-zone}, _this select 0]}]" forEach list triggerA; updlistB = true; updlistA = false
:note - if you want to get the name of the unit displayed onto the screen, you can use optional onActivation for trigger 4, where i've added a hint format message to the eventhandler. You can also use globalchat instead of hint. But you should be aware of using this in your mission unless you want to test it only, because of a unit firing in burst or autofire mode. (hint will cause a lot of ping sounds, as globalchat will fill the chat-lines).
:additional note - if you only want units not to be able to fire,
then you will need to remove their ammo, and give it back to
them, with the allow firing trigger, but this might be a bit more
complicated and in my opinion unrealistic. If i can pull my trigger
here, who in the world could manage that i can't do it there? (except David Copperfield or so)
Ah yeah, i've also attached a little sample mission, where you
can try it out. You're leader of two AI's, and 3 ungrouped AI's
are standing around. Order one of your men inside the flag cage, order him to target a soldier and then tell him to fire (3-3).
Or order him into the cage, let him return to formation and order
him then to shot a soldier - you'll see the effect.
Or try it by yourself while shooting the ground or the clouds
hope this helps
~S~ CD