• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

How to Order Hall to stop building Peasant by Trigger?

Status
Not open for further replies.
Hmm.. Could you post under what circumstances the training should be cancelled?

Anyway, I think the action: Order unit to stop could work out. (It's found under "Issue order with no target")
Probably the "pause unit" option could also work out.
Try it out, maybe one of these two would work.
 
Hmm.. Could you post under what circumstances the training should be cancelled?

Anyway, I think the action: Order unit to stop could work out. (It's found under "Issue order with no target")
Probably the "pause unit" option could also work out.
Try it out, maybe one of these two would work.

they have their own order ID

  • Custom script: call IssueImmediateOrderById(GetTriggerUnit(), 851976)
  • Test Map
    • Events
      • Unit - A unit Begins training a unit
    • Conditions
    • Actions
      • Custom script: set udg_u = GetTrainedUnitType()
      • Set tempPoint = (Position of (Triggering unit))
      • Unit - Create 1 u for (Owner of (Triggering unit)) at tempPoint facing Default building facing degrees
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • u Equal to Peasant
        • Then - Actions
          • Custom script: call IssueImmediateOrderById(GetTriggerUnit(), 851976)
        • Else - Actions
      • Unit - Remove (Last created unit) from the game
      • Custom script: call RemoveLocation (udg_tempPoint)
here is a test map
 

Attachments

Last edited:
Status
Not open for further replies.
Back
Top