unit-control

pneric

New Member
Reaction score
1
how do you make a unit move (w/o controlling) towards a set direction when your hero unit is near it; make it NOT move when there are two opposing hero units near it; and make it NOT move when there is no hero near it.

to make it clear i want to mimic a map like a certain mission in WC3 where you control Kael and Vashj and fight over the cage of Illidan vs. Maeiv. the cage moves depending who has "control" over it. control being the hero unit near it; if anyone can remember that. there's also a map kinda like this called Candy Wars, same idea but instead of one lane, there are three.

just want to find out the triggers related to this unit-control moving thing
 

Rainther

I guess I should write something of value here...
Reaction score
61
Either make a periodic timer to check how many heroes of that team and how many heroes of that team are close to this unit then change ownership or color of unit (and use global boolean) and then force it to move against desired location.

Or you could make a region peridocly move to the unit's location and have event - hero dies or leaves area and do as above (measure amounts too). And by this unit, I refer to the cage.
 

Silver

New Member
Reaction score
21
You could also take a look at the triggers of the campaign level.
It's only 28 triggers (but don't worry, you can easily tone that down to about 4 with some clever triggering).

Here's the map in case you haven't (yet) exported the campaign maps out of the mpq files.
View attachment 33168
 

pneric

New Member
Reaction score
1
You could also take a look at the triggers of the campaign level.
It's only 28 triggers (but don't worry, you can easily tone that down to about 4 with some clever triggering).

Here's the map in case you haven't (yet) exported the campaign maps out of the mpq files.
View attachment 33168

i didnt know you could open campaign maps, thanks for the post, what is this "clever triggering" ;)
 

Rainther

I guess I should write something of value here...
Reaction score
61
Efficient usage, I believe. Simply making most things happend in a few triggers, then in many.
 

pneric

New Member
Reaction score
1
ok i was not able to open that map for some reason, can someone post some sample code for this event? i want to see the triggers behind it.
 

Silver

New Member
Reaction score
21
Trigger:
  • Give Wagon to Player
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • InCinematic Equal to False
      • GameOver Equal to False
      • (Owner of Wagon) Equal to P5_Maiev
      • (Remaining time for TransferOwnerTimer) Less than or equal to 0.00
    • Actions
      • Set TempPointA = (Position of Wagon)
      • Set TempPointB = (Position of Maiev)
      • Set TempPointC = (Position of Kael)
      • Set TempPointD = (Position of Vashj)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Brewmaster Not equal to No unit
        • Then - Actions
          • Set TempPointE = (Position of Brewmaster)
        • Else - Actions
          • Set TempPointE = (Position of Castle 0000 <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Maiev is dead) Equal to True
              • (Distance between TempPointA and TempPointB) Greater than WagonControlRadius
          • Or - Any (Conditions) are true
            • Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (Kael is alive) Equal to True
                  • (Distance between TempPointA and TempPointC) Less than or equal to WagonControlRadius
              • And - All (Conditions) are true
                • Conditions
                  • (Vashj is alive) Equal to True
                  • (Distance between TempPointA and TempPointD) Less than or equal to WagonControlRadius
              • And - All (Conditions) are true
                • Conditions
                  • Brewmaster Not equal to No unit
                  • (Brewmaster is alive) Equal to True
                  • (Distance between TempPointA and TempPointE) Less than or equal to WagonControlRadius
        • Then - Actions
          • -------- Turn off how to get control hint --------
          • Trigger - Turn off Maiev Dies First Time <gen>
          • -------- Start TransferTimer --------
          • Countdown Timer - Start TransferOwnerTimer as a One-shot timer that will expire in 5.00 seconds
          • -------- Change Leaderboard --------
          • Trigger - Run Change Board to Player <gen> (checking conditions)
          • -------- Pause Caravan --------
          • Trigger - Run Caravan Orders Pause <gen> (checking conditions)
          • -------- Change Wagon Owner --------
          • Unit - Change ownership of Wagon to P3_IllidanCage and Change color
          • Unit - Order Wagon to Move To (Center of BloodElfGoal <gen>)
          • Countdown Timer - Start WagonHeartbeat as a Repeating timer that will expire in 4.00 seconds
          • -------- Reset Timer Minimums --------
          • Set NETimerMinimum = NETimerBaseMinimum
          • Set BETimerMinimum = BETimerBaseMinimum
          • -------- Free Guards to Suicide --------
          • Unit Group - Pick every unit in CaravanGuardsGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Picked unit) Not equal to Maiev
                • Then - Actions
                  • Unit - Order (Picked unit) to Attack-Move To (Center of BloodElfGoal <gen>)
                  • Unit - Change ownership of (Picked unit) to P11_NightElfAttack and Change color
                • Else - Actions
          • Unit Group - Remove all units from CaravanGuardsGroup
          • Unit - Set Maiev movement speed to (Default movement speed of Maiev)
          • Countdown Timer - Start MaievOrderPulse as a Repeating timer that will expire in 5.00 seconds
          • -------- Acknowledge ownership change to player --------
          • Trigger - Run Player gets Wagon First Time <gen> (checking conditions)
          • Trigger - Run Player gets Wagon Subsequent Times <gen> (checking conditions)
        • Else - Actions
      • Custom script: call RemoveLocation( udg_TempPointA )
      • Custom script: call RemoveLocation( udg_TempPointB )
      • Custom script: call RemoveLocation( udg_TempPointC )
      • Custom script: call RemoveLocation( udg_TempPointD )
      • Custom script: call RemoveLocation( udg_TempPointE )

Trigger:
  • Force Wagon Moves
    • Events
      • Time - WagonHeartbeat expires
    • Conditions
      • InCinematic Equal to False
      • GameOver Equal to False
    • Actions
      • Unit - Order Wagon to Move To (Center of BloodElfGoal <gen>)

Trigger:
  • Player gets Wagon First Time
    • Events
    • Conditions
      • ((This trigger) is on) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Add Player gets Wagon First Time Q <gen> to the trigger queue (Checking conditions)
      • Wait 0.01 seconds
      • Trigger - Turn on Player gets Wagon Subsequent Times <gen>

Trigger:
  • Player gets Wagon First Time Q
    • Events
    • Conditions
      • GameOver Equal to False
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Run Quest Secure Wagon Update Recapture <gen> (checking conditions)
      • Wait Campaign quest delay seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Kael is alive) Equal to True
        • Then - Actions
          • Sound - Setup all volume channels for speech
          • Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael24 <gen> and display Illidan is unconsci.... Modify duration: Add 0.00 seconds and Don't wait
          • Wait for A05Kael24 <gen> to be 0.00 seconds from finished playing
          • Sound - Reset all volume channels to 100%
        • Else - Actions
      • Trigger - Run Quest Escort Wagon Discover <gen> (checking conditions)
      • Cinematic - Ping minimap for (All players) at (Center of BloodElfGoal <gen>) for 4.00 seconds
      • Camera - Set a spacebar-point for AP1_Player at (Center of BloodElfGoal <gen>)
      • Wait Campaign quest delay seconds
      • Trigger - Remove (This trigger) from the trigger queue

Trigger:
  • Player gets Wagon Subsequent Times
    • Events
    • Conditions
      • ((This trigger) is on) Equal to True
    • Actions
      • Trigger - Add Player gets Wagon Subsequent Times Q <gen> to the trigger queue (Checking conditions)

Trigger:
  • Player gets Wagon Subsequent Times Q
    • Events
    • Conditions
      • GameOver Equal to False
    • Actions
      • Trigger - Run Quest Secure Wagon Update Recapture <gen> (checking conditions)
      • Wait Campaign quest delay seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Kael is alive) Equal to True
        • Then - Actions
          • Sound - Setup all volume channels for speech
          • Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael27 <gen> and display We've rescued Illid.... Modify duration: Add 0.00 seconds and Don't wait
          • Wait for A05Kael27 <gen> to be 0.00 seconds from finished playing
          • Sound - Reset all volume channels to 100%
        • Else - Actions
      • Trigger - Remove (This trigger) from the trigger queue

Trigger:
  • Give Wagon to Maiev
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • GameOver Equal to False
      • InCinematic Equal to False
      • (Owner of Wagon) Equal to P3_IllidanCage
      • (Remaining time for TransferOwnerTimer) Less than or equal to 0.00
    • Actions
      • Set TempPointA = (Position of Wagon)
      • Set TempPointB = (Position of Maiev)
      • Set TempPointC = (Position of Kael)
      • Set TempPointD = (Position of Vashj)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Maiev is alive) Equal to True
              • (Distance between TempPointA and TempPointB) Less than or equal to WagonControlRadius
          • And - All (Conditions) are true
            • Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Kael is dead) Equal to True
                  • (Distance between TempPointA and TempPointC) Greater than WagonControlRadius
              • Or - Any (Conditions) are true
                • Conditions
                  • (Vashj is dead) Equal to True
                  • (Distance between TempPointA and TempPointD) Greater than WagonControlRadius
        • Then - Actions
          • -------- Start TransferTimer --------
          • Countdown Timer - Start TransferOwnerTimer as a One-shot timer that will expire in 5.00 seconds
          • -------- Change Leaderboard --------
          • Trigger - Run Change Board to Maiev <gen> (checking conditions)
          • -------- Change Wagon Owner --------
          • Countdown Timer - Pause WagonHeartbeat
          • Unit - Change ownership of Wagon to P5_Maiev and Change color
          • -------- Reset Timer Minimums --------
          • Set NETimerMinimum = NETimerBaseMinimum
          • Set BETimerMinimum = BETimerBaseMinimum
          • -------- Reinitialize Wagon Guards --------
          • Countdown Timer - Pause MaievOrderPulse
          • Unit Group - Add Maiev to CaravanGuardsGroup
          • Unit - Create 1 Huntress for P5_Maiev at (Center of NE Ancient of War Spawn 01 <gen>) facing 270.00 degrees
          • Set CaravanHunt01 = (Last created unit)
          • Unit Group - Add CaravanHunt01 to CaravanGuardsGroup
          • Unit - Create 1 Archer for P5_Maiev at (Center of NE Ancient of War Spawn 02 <gen>) facing 270.00 degrees
          • Set CaravanArcher01 = (Last created unit)
          • Unit Group - Add CaravanArcher01 to CaravanGuardsGroup
          • Unit - Create 1 Archer for P5_Maiev at (Center of NE Ancient of War Spawn 03 <gen>) facing 270.00 degrees
          • Set CaravanArcher02 = (Last created unit)
          • Unit Group - Add CaravanArcher02 to CaravanGuardsGroup
          • Trigger - Run Init 09c Caravan Units <gen> (checking conditions)
          • -------- Reinitialize Wagon Position Along Breadcrumbs --------
          • Set ClosestRegionDistance = 1000000.00
          • For each (Integer A) from 1 to (BreadcrumbTotal - 1), do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between TempPointA and zBreadcrumbArray[(Integer A)]) Less than or equal to ClosestRegionDistance
                • Then - Actions
                  • Set ClosestRegionDistance = (Distance between TempPointA and zBreadcrumbArray[(Integer A)])
                  • Set BreadcrumbReached = (Integer A)
                  • Set BreadcrumbCurrent = ((Integer A) + 1)
                • Else - Actions
          • -------- Reorient the formation --------
          • Set zReorientTarget = zBreadcrumbArray[BreadcrumbCurrent]
          • Set ReorientAngle = BreadcrumbAngleArray[BreadcrumbCurrent]
          • Trigger - Run Reorient Formation <gen> (checking conditions)
          • -------- Resume Caravan Behavior --------
          • Trigger - Run Caravan Orders Resume <gen> (checking conditions)
          • -------- Acknowledge ownership change to player --------
          • Trigger - Run Player Loses Wagon First Time <gen> (checking conditions)
          • Trigger - Run Player Loses Wagon Subsequent Times <gen> (checking conditions)
        • Else - Actions
      • Custom script: call RemoveLocation( udg_TempPointA )
      • Custom script: call RemoveLocation( udg_TempPointB )
      • Custom script: call RemoveLocation( udg_TempPointC )
      • Custom script: call RemoveLocation( udg_TempPointD )

Trigger:
  • Player Loses Wagon First Time
    • Events
    • Conditions
      • ((This trigger) is on) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Add Player Loses Wagon First Time Q <gen> to the trigger queue (Checking conditions)
      • Wait 0.01 seconds
      • Trigger - Turn on Player Loses Wagon Subsequent Times <gen>

Trigger:
  • Player Loses Wagon First Time Q
    • Events
    • Conditions
      • GameOver Equal to False
    • Actions
      • Trigger - Turn off (This trigger)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Kael is alive) Equal to True
        • Then - Actions
          • Sound - Setup all volume channels for speech
          • Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael19 <gen> and display Damn. We've lost th.... Modify duration: Add 0.00 seconds and Don't wait
          • Wait for A05Kael19 <gen> to be 0.00 seconds from finished playing
          • Sound - Reset all volume channels to 100%
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Vashj is alive) Equal to True
        • Then - Actions
          • Sound - Setup all volume channels for speech
          • Cinematic - Send transmission to (All players) from Vashj named Lady Vashj: Play A05LadyVashj20 <gen> and display There is still time.... Modify duration: Add 0.00 seconds and Don't wait
          • Wait for A05LadyVashj20 <gen> to be 0.00 seconds from finished playing
          • Sound - Reset all volume channels to 100%
        • Else - Actions
      • Trigger - Run Quest Secure Wagon Update Lost Wagon <gen> (checking conditions)
      • Wait Campaign quest delay seconds
      • Trigger - Remove (This trigger) from the trigger queue

Trigger:
  • Player Loses Wagon Subsequent Times
    • Events
    • Conditions
      • ((This trigger) is on) Equal to True
    • Actions
      • Trigger - Add Player Loses Wagon Subsequent Times Q <gen> to the trigger queue (Checking conditions)

Trigger:
  • Player Loses Wagon Subsequent Times Q
    • Events
    • Conditions
      • GameOver Equal to False
      • (Kael is alive) Equal to True
    • Actions
      • Set RandomValue = (Random real number between 0.00 and 3.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomValue Less than or equal to 1.00
        • Then - Actions
          • Sound - Setup all volume channels for speech
          • Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael21 <gen> and display They've retaken the.... Modify duration: Add 0.00 seconds and Don't wait
          • Wait for A05Kael21 <gen> to be 0.00 seconds from finished playing
          • Sound - Reset all volume channels to 100%
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RandomValue Less than or equal to 2.00
            • Then - Actions
              • Sound - Setup all volume channels for speech
              • Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael22 <gen> and display The cage is lost! W.... Modify duration: Add 0.00 seconds and Don't wait
              • Wait for A05Kael22 <gen> to be 0.00 seconds from finished playing
              • Sound - Reset all volume channels to 100%
            • Else - Actions
              • Sound - Setup all volume channels for speech
              • Cinematic - Send transmission to (All players) from Kael named Prince Kael'thas: Play A05Kael23 <gen> and display They're getting awa.... Modify duration: Add 0.00 seconds and Don't wait
              • Wait for A05Kael23 <gen> to be 0.00 seconds from finished playing
              • Sound - Reset all volume channels to 100%
      • Trigger - Run Quest Secure Wagon Update Lost Wagon <gen> (checking conditions)
      • Wait Campaign quest delay seconds
      • Trigger - Remove (This trigger) from the trigger queue
 

Silver

New Member
Reaction score
21
This is NOT a double post.
Trigger:
  • MaievOrderPulse Expires
    • Events
      • Time - MaievOrderPulse expires
    • Conditions
      • (Owner of Wagon) Equal to P3_IllidanCage
      • InCinematic Equal to False
      • GameOver Equal to False
    • Actions
      • Set TempPointA = (Position of Wagon)
      • Unit - Order Maiev to Attack-Move To TempPointA
      • Custom script: call RemoveLocation( udg_TempPointA )

Trigger:
  • Create Initial Board
    • Events
    • Conditions
    • Actions
      • Leaderboard - Create a leaderboard for (All players) titled |cFF1CE6B9Maiev|r |...
      • Set OwnerBoard = (Last created leaderboard)
      • Leaderboard - Change the display style for OwnerBoard to Show the title, Hide labels, Hide values, and Hide icons
      • Leaderboard - Show OwnerBoard

Trigger:
  • Change Board to Player
    • Events
    • Conditions
    • Actions
      • Leaderboard - Change the title of OwnerBoard to |cFFFE8A0EKael|r |c...

Trigger:
  • Change Board to Maiev
    • Events
    • Conditions
    • Actions
      • Leaderboard - Change the title of OwnerBoard to |cFF1CE6B9Maiev|r |...

Trigger:
  • Caravan Go
    • Events
    • Conditions
    • Actions
      • -------- Start the region testing timer --------
      • Countdown Timer - Start CaravanTestPulse as a Repeating timer that will expire in 0.20 seconds
      • Countdown Timer - Start CaravanOrderPulse as a Repeating timer that will expire in 3.00 seconds

Trigger:
  • Reorient Formation
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to FormationTotal, do (Actions)
        • Loop - Actions
          • Set TempAngle = (ReorientAngle + FormationAngleArray[(Integer A)])
          • Set TempX = (FormationDistanceArray[(Integer A)] x (Cos(TempAngle)))
          • Set TempY = (FormationDistanceArray[(Integer A)] x (Sin(TempAngle)))
          • Region - Center FormationRegionArray[(Integer A)] on (zReorientTarget offset by (TempX, TempY))

Trigger comment for above trigger "This trigger repositions all of the CaravanRegions in formation (according to FormationAngles and FormationDistances), centered about ReorientTarget and rotated to ReorientAngle.

Before running this trigger, set the following variables: ReorientAngle, ReorientTarget

The actions in the loop perform a simple transform on the formation data to rotate it to ReorientAngle (with respect to the formation origin) and shift it over to ReorientTarget.
The formation data is stored in polar notation to make this calculation easier."
Trigger:
  • Caravan Orders Pause
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from CaravanGuardFirst to CaravanGuardLast, do (Actions)
        • Loop - Actions
          • Unit - Set CaravanUnitArray[(Integer A)] movement speed to (Default movement speed of CaravanUnitArray[(Integer A)])
      • Countdown Timer - Pause CaravanOrderPulse

Trigger:
  • Caravan Orders Resume
    • Events
    • Conditions
    • Actions
      • Countdown Timer - Start CaravanOrderPulse as a Repeating timer that will expire in 3.00 seconds

Trigger:
  • Caravan Orders
    • Events
      • Time - CaravanOrderPulse expires
    • Conditions
      • InCinematic Equal to False
    • Actions
      • Trigger - Run Caravan Check Dist <gen> (checking conditions)
      • For each (Integer A) from CaravanWagonFirst to CaravanWagonLast, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CaravanUnitArray[(Integer A)] Not equal to No unit
            • Then - Actions
              • Set TempPointA = (Center of FormationRegionArray[(Integer A)])
              • Unit - Order CaravanUnitArray[(Integer A)] to Move To TempPointA
              • Custom script: call RemoveLocation( udg_TempPointA )
            • Else - Actions
      • For each (Integer A) from CaravanGuardFirst to CaravanGuardLast, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CaravanUnitArray[(Integer A)] Not equal to No unit
              • (Remaining time for CaravanAggroTimer) Less than or equal to 0.00
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GuardsCatchingUp Equal to True
                • Then - Actions
                  • Set TempPointA = (Center of FormationRegionArray[(Integer A)])
                  • Unit - Order CaravanUnitArray[(Integer A)] to Move To TempPointA
                  • Custom script: call RemoveLocation( udg_TempPointA )
                • Else - Actions
                  • Set TempPointA = (Center of FormationRegionArray[(Integer A)])
                  • Unit - Order CaravanUnitArray[(Integer A)] to Attack-Move To TempPointA
                  • Custom script: call RemoveLocation( udg_TempPointA )
            • Else - Actions

Trigger:
  • Caravan Check Dist
    • Events
    • Conditions
      • GuardsCatchingUp Equal to False
    • Actions
      • -------- Test each guar d to see if any of them are within range --------
      • Set GuardsCatchingUp = True
      • For each (Integer A) from CaravanGuardFirst to CaravanGuardLast, do (Actions)
        • Loop - Actions
          • Set TempPointA = (Position of CaravanUnitArray[(Integer A)])
          • Set TempPointB = (Center of FormationRegionArray[(Integer A)])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between TempPointA and TempPointB) Less than GuardLeftBehindRange
            • Then - Actions
              • -------- If at least one guard is within range, consider the group sufficiently close --------
              • Set GuardsCatchingUp = False
            • Else - Actions
          • Custom script: call RemoveLocation( udg_TempPointA )
          • Custom script: call RemoveLocation( udg_TempPointB )

Trigger:
  • Caravan Unit Dies
    • Events
      • Unit - A unit owned by Player 5 (Yellow) Dies
    • Conditions
      • ((Dying unit) is in CaravanGuardsGroup) Equal to True
    • Actions
      • Unit Group - Remove (Dying unit) from CaravanGuardsGroup
      • For each (Integer A) from 1 to FormationTotal, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dying unit) Equal to CaravanUnitArray[(Integer A)]
            • Then - Actions
              • Set CaravanUnitArray[(Integer A)] = No unit
            • Else - Actions

Trigger:
  • Guard Attacked
    • Events
      • Unit - A unit owned by Player 5 (Yellow) Is attacked
    • Conditions
      • GuardsCatchingUp Equal to False
    • Actions
      • Trigger - Turn off (This trigger)
      • For each (Integer A) from CaravanGuardFirst to CaravanGuardLast, do (Actions)
        • Loop - Actions
          • Set TempPointA = (Position of CaravanUnitArray[(Integer A)])
          • Set TempPointB = (Position of (Attacked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between TempPointA and TempPointB) Less than or equal to GuardCallForHelpDist
            • Then - Actions
              • Unit - Set CaravanUnitArray[(Integer A)] movement speed to (Default movement speed of CaravanUnitArray[(Integer A)])
              • Region - Center GuardCallForHelpArea <gen> on TempPointB
              • Set TempPointC = (Random point in GuardCallForHelpArea <gen>)
              • Unit - Order CaravanUnitArray[(Integer A)] to Attack-Move To TempPointC
              • Custom script: call RemoveLocation( udg_TempPointC )
            • Else - Actions
          • Custom script: call RemoveLocation( udg_TempPointA )
          • Custom script: call RemoveLocation( udg_TempPointB )
      • Countdown Timer - Start CaravanAggroTimer as a One-shot timer that will expire in GuardCallForHelpDuration seconds
      • Wait GuardCallForHelpFrequency seconds
      • Trigger - Turn on (This trigger)

Trigger:
  • Guard Catches Up
    • Events
      • Time - CaravanTestPulse expires
    • Conditions
    • Actions
      • For each (Integer A) from CaravanGuardFirst to CaravanGuardLast, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CaravanUnitArray[(Integer A)] Not equal to No unit
              • (FormationRegionArray[(Integer A)] contains CaravanUnitArray[(Integer A)]) Equal to True
            • Then - Actions
              • Unit - Set CaravanUnitArray[(Integer A)] movement speed to SpeedOfGuards
              • Set GuardsCatchingUp = False
            • Else - Actions

Trigger:
  • Wagons Reach Breadcrumb
    • Events
      • Time - CaravanTestPulse expires
    • Conditions
      • (FormationRegionArray[1] contains CaravanUnitArray[1]) Equal to True
    • Actions
      • Set BreadcrumbReached = BreadcrumbCurrent
      • Trigger - Run Target Next Breadcrumb <gen> (checking conditions)

Trigger:
  • Target Next Breadcrumb
    • Events
    • Conditions
      • BreadcrumbCurrent Less than BreadcrumbAllowed
    • Actions
      • -------- Calculate the next breadcrumb --------
      • Set BreadcrumbCurrent = (BreadcrumbCurrent + 1)
      • Set zReorientTarget = zBreadcrumbArray[BreadcrumbCurrent]
      • Set ReorientAngle = BreadcrumbAngleArray[BreadcrumbCurrent]
      • -------- Recalculate the caravan's targets and start them on their way --------
      • Trigger - Run Reorient Formation <gen> (checking conditions)
      • Trigger - Run Caravan Orders <gen> (checking conditions)

There you go.

EDIT: Found another one
Trigger:
  • PingTimerExpires
    • Events
      • Time - WagonPingTimer expires
    • Conditions
      • InCinematic Equal to False
      • GameOver Equal to False
    • Actions
      • Set TempPingPoint = (Position of Wagon)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of Wagon) Equal to P5_Maiev
        • Then - Actions
          • Cinematic - Ping minimap for (All players) at (Position of Wagon) for 2.00 seconds, using a Simple ping of color (10.90%, 90.00%, 72.50%)
        • Else - Actions
          • Cinematic - Ping minimap for (All players) at (Position of Wagon) for 2.00 seconds, using a Simple ping of color (99.60%, 54.10%, 5.50%)
      • Custom script: call RemoveLocation( udg_TempPingPoint )
 

pneric

New Member
Reaction score
1
ok in relation to my previous posts and the incredibly long one, can anyone make a really short version of this? basically here's whats supposed to happen:

- the "cage" is neutral when no one is near it, it wont move at this state
- a unit comes within melee range (around 125) of the "cage"; cage changes owner to controller of unit that came in range then starts moving towards point X
- if two different controller units come near it, it does not change owner but stops moving until one of them goes away like really far, then its changes owner or continuous moving depending on what happened.

anyway you get the idea
 

Moridin

Snow Leopard
Reaction score
144
Ok I briskly read through some of it.

Firstly I'd like to say that there are some extra triggers that play sounds if the player keeps getting the wagon or keeps losing the wagon. Something like an encouragement and a warning. I find this useless.....so this would no doubt remove around....7/8 triggers out of the pile.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top