Ok, I think i know how this is going to work.
Creat a trigger,
Condition: spotter knowsAbout target1 > 3
On Activation: Call script spotter
Creat a trigger,
Condition: spotter knowsAbout target2 > 3
On Activation: Call script spotter
Creat a trigger,
Condition: spotter knowsAbout target3 > 3
On Activation: Call script spotter
Script spotter:
spotter sidechat format ["Distance = %1",sniper distance target1]
_dis=sniper distance _target1
_dis=_dis + _dis*(((random 20)/100) -.1)
spotter sidechat format ["Distance = %1",_dis]
target1 addEventHandler ["killed",{_this exec "targetKilled.sqs"}]
;target2
spotter sidechat format ["Distance = %1",sniper distance target2]
_dis=sniper distance _target2
_dis=_dis + _dis*(((random 20)/100) -.1)
spotter sidechat format ["Distance = %1",_dis]
target2 addEventHandler ["killed",{_this exec "targetKilled.sqs"}]
;target3
spotter sidechat format ["Distance = %1",sniper distance target3]
_dis=sniper distance _target3
_dis=_dis + _dis*(((random 20)/100) -.1)
spotter sidechat format ["Distance = %1",_dis]
target3 addEventHandler ["killed",{_this exec "targetKilled.sqs"}]
;so on for however many targets there are...
;and targetkilled.sqs contains this:
_killer=_this select 1
?_killer==sniper:hint "Hit!"
I can't get it to work (Suprise!) so if someone could give it a go. There is probley something stupid i am missing.
So what do you think of it? I know there would be alot of work, but it seem like it would work.