first of all there is you - player
and a policeman - p1
#1 Then, when the player picks up a M21 the policeman goes to "COMBAT"
?player hasweapon "M21": p1 setbehaviour "COMBAT"
#2 if M21 is fired then p1 will kill you
?player hasweapon "m21": player addeventhandler ["Fired",{p1 dofire player}]
#3 if you leave p1s company at more than 10 metres, he will kill you
? player has weapon "M21" and player distance p1 > 10: p1 dofire player
#4 if player surrenders then p1 will walk up to you and arrest you
? player hasweapon "M21": surrender = player addaction ["Surrender","surrender.sqs"]
#surrender.sqs
player removeaction surrender
player switchmove "FXStandsuruniv"
p1 domove getpos player
?player distance p1 < 1: removeallweapons player; p1 addweapon "m21"
exit
What I want to know is:
1) how do you get the p1 to calculate a 10m diameter of the spot you are from, and if you leave that circumfrence then he shoots you (kinda like a "DON'T MOVE" scenario
2)how do you get the p1 to hold his fire and stay "SAFE" until he sees (detects) you, otherwise, as soon as you pick the gun up he goes into "COMBAT"
3)can all this be worked into one big script instead of triggers everywhere
4) are there any suggestions that people want to add to the script.
5)is there anything wrong with the syntax's so far
Any help is needed and will be much appreciated.
Cheers
Nobby.