• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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