Home   Help Search Login Register  

Author Topic: Convoy attack detection  (Read 646 times)

0 Members and 1 Guest are viewing this topic.

Swatdog

  • Guest
Convoy attack detection
« on: 11 May 2005, 17:46:14 »
Hey guys, I'm trying to build a mission kinda sort of like Desert Ambush in MP. You have to destroy a convoy, fight off a few tanks/squads of soldiers, attack a town, etc... But anyway, here's my question:

I've been picking my brains out trying to figure out a way to detect whether the convoy in whole, or any of it's vehicles are under attack, and if so, the convoy will release it's transport (troops in this case), tanks will then attack, etc... I don't want to use EHs because this is meant as a MP mission. I don't know any other way of doing it other than EHs. Also, I want the convoy to reload it's transport (troops) and continue on its way if they don't detect the enemy for a certain amount of time.

I'm kinda noobish at scripting, so any explaination would be great.

Thanks.
« Last Edit: 11 May 2005, 17:54:11 by Swatdog »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Convoy attack detection
« Reply #1 on: 11 May 2005, 19:33:29 »
This might help.    Use a gamelogic waypoint loop with scripting commands to keep trigger1 over the convoy.     You'll need to initialise your variables in init.sqs and add whatever you want to happen when the trigger is fired.   This is an example taken from a working mission:  adapt the waypoints for your own purposes.

move   <---- switch trigger 2
guard
move    <----- switch trigger 1
S&D
cycle

trigger2
Activation:  bradleyGuardGuard
On Activation:   bradleyGuardGuard=false

trigger1
Activation box:    detected by      repeatedly
On Activation:  as you like
On Deactivation:   bradleyGuardGuard=true;

The waypoint sequence can be repeated as often as necessary, controlled by the triggers.

When the variable bradleyGuardGuard goes true the first trigger fires and the group goes to the guard waypoint.    The variable is reset to false, ready for next time.    The group sits on that guard waypoint with the detected by trigger over them, and when it fires they go to seek and destroy.   When that trigger deactivates, that is they lose the enemy, then the first trigger fires again and they go back to the guard waypoint.

I told you triggers and waypoints were more powerful than most people think.   ;)
Plenty of reviewed ArmA missions for you to play

Swatdog

  • Guest
Re:Convoy attack detection
« Reply #2 on: 11 May 2005, 21:12:47 »
That looks like trigger 1 will only activate when an enemy is detected within the trigger radius (or am I wrong?)... What I need is if any unit that's part of the convoy gets hit, or damaged in anyway, a certain script will activate.

Let me clarify:

If any vehicle part of the convoy group gets destroyed or gets any damage whatsoever, the trucks carrying the enemy soldiers will eject them, the tanks behaviour will be set to "COMBAT", and the soldiers will have an action similar to the "Guard" waypoint, or even "Search And Destroy". Once the threat is gone, the soldiers re-embark their specified trucks, the tanks will then be reset to "SAFE" behaviour, and the convoy will continue to their specified destination.

Basically if the convoy gets under attack at all, all of the units will go WWIII, and then once the theat is gone, they will be reset to their original behaviour.


Thanks for that suggestion regardless, macguba. I may use that one for something else.
« Last Edit: 11 May 2005, 21:16:09 by Swatdog »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Convoy attack detection
« Reply #3 on: 11 May 2005, 23:02:25 »
Yes sorry I should have made it clearer that that was lifted from a mission and was intended to demonstrate the principal rather than provide a comprehensive answer.   It will need substantial modification to do what you want.
Plenty of reviewed ArmA missions for you to play