I tried the script and nothign happend.
This is what i used:
;spotter is name of spotter
;sniper is name of the sniper
;target1 is the name of the target
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]
target addEventHandler ["killed",{_this exec "targetKilled.sqs"}]
;and targetkilled.sqs contains this:
_killer=_this select 1
?_killer==sniper:hint "The sniper killed this guy!!"
I am new at this(as you can tell), but why did that not work?
Some other problems, there could only be one person that the spotter could report on. I want anyone in the battle field that is a person for the spotter to report the distance. Maby it could go like this:
_target1 gets assigned (thur an even action(or something), like telling the spotter to target the target) to the person targeted, it then goes thur the:
spotter sidechat format ["Distance = %1", sniper distance target1]
That sound good?
Then there is the report every x seconds, (I think three sounds good). How would that happen? Is there a time thing? A loop would work for this I think. After the guy gets targeted, a loop starts. If the guy is dead or the sniper targets something else (any thing, like the ground; dont want him going on forever) he stops.
Thanks for the help so far,
Teryan