• 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.

Capture?

Status
Not open for further replies.
Level 8
Joined
Jan 8, 2010
Messages
493
something like

  • Events
    • Unit - A unit enters RegionWithCaptureableBuilding
  • Conditions
  • Actions
    • Set CapturingUnit = Triggering Unit
    • Trigger - Turn on Countdown To Capture



  • Events
    • Time - Every 1.00 seconds of game time
  • Conditions
    • (RegionWithCaptureableBuilding contains CapturingUnit) Equal to True
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • CountdownTimer Equal to 10
      • Then - Actions
        • Unit - Change ownership of CaptureableBuilding to (Owner of CapturingUnit) and Change color
        • Trigger - Turn Off This Trigger
      • Else - Actions
        • Set CountdownTimer = CountdownTimer + 1


the first trigger will save what unit enters the region with the building and starts the next trigger which will act as a countdown. the next trigger is a periodic countdown trigger, checking every second if the capturing unit is in the region, until CountdownTimer reaches a certain value therefore the time for capturing is finished. i think those triggers are pretty much the basic ones you need.
 
Status
Not open for further replies.
Top