WARNING:
This is a untested, shot from the hip, script from a untrained syntax-challenged noob. ;D
lets say your convoy is west side.
In mission editor:
- make your truck and give it waypoints. Give it a name-- truck1.In the init field put this exec "triggerfollow.sqs"
-make a trigger east detected by west,100x100, on activation spotted = true, give the trigger a name--trigger1
-make your soldiers to be the cargo in the convoy. In each of their init fields put this moveincargo truck1; this exec "alarmed.sqs"
;;here is triggerfollow.sqs
spotted = false
#loop
trigger1 setpos getpos truck1
~1
? spotted : goto next
goto "loop"
#next
dostop truck1
exit
-------
;;here is alarmed.sqs
#loop
? spotted : goto "getout"
~.5
goto "loop"
#getout
_this action ["EJECT", truck1]
_this setbehaviour "Combat"
exit
------------
The trigger should follow around the truck. When the trigger is activated, the truck should stop and the guys should unload.
I don't know how to make them get back in if it is all clear.
Don't worry, you will probably get your solution soon because nothing brings out the good scrpiters around here like a bad script posted up ;D