Capture Ability Help

Karthis

New Member
Reaction score
0
I'm tryin to create an ability that will allow certain units to capture an enemy or neutral building. I've tried a couple things, but I can't quite figure it out. Making the ability is easy, but I would guess I need to set up a trigger of some sort to make it work. Can anyone give me an idea on what to do?
 

Avaleirra

Is back. Probably.
Reaction score
128
Make a trigger that changes the ownership of the building when the unit comes near and remove the unit
 

ZugZugZealot

New Member
Reaction score
33
Using Finger of Pain as an ability, setting its damage to 0, and setting its targets to enemy, neutral, ground, air, structure; I made these triggers, assuming that the only two buildings you want stolen are scout tower and farm. (you may replace/remove/add farm and scout tower for different buildings)

Trigger:
  • CheckValidity
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Building Steal (Finger of Pain|Neutral Hostile)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Target unit of ability being cast)) Equal to Farm
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Target unit of ability being cast)) Equal to Scout Tower
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • Unit - Order (Triggering unit) to Stop
      • Game - Display to (Player group((Triggering player))) the text: Building Steal cann...


Trigger:
  • TakeBuilding
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Building Steal (Finger of Pain|Neutral Hostile)
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Triggering player) and Change color
 

Karthis

New Member
Reaction score
0
Ah, I didn't even bother checking the conditions I could use. I used the same event as you did, but it bothered me that it happened anytime a unit cast an ability. I didn't even think to make a condition to limit it to the particular spell. Thanks much!

*EDIT*

What is that action above the Unit - Order? I can't seem to find it.
 

PrisonLove

Hard Realist
Reaction score
78
The "---- ----" is a trigger comment, you don't actually need that it's just for readability purposes.

Unless you're talking about Skip Remaining actions, then it is under the trigger category in actions.
 
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