ability that kills the unit

MissKerrigan

Active Member
Reaction score
23
Hi,

How do I create an ability that cost 100 minerals and kills the unit after?

(it's a bomb on a field, once the bomb is killed, you are able to build on the space)


MissKerrigan
 

Dave312

Censored for your safe viewing
Reaction score
269
Just create a standard ability but make sure you link the Kill (Generic Kill Command) and have it applied to your caster. I can't really say how you should link this effect to your ability without knowing how you plan on making it.
 

MissKerrigan

Active Member
Reaction score
23
Well, what I actually want is creating bushes in some of the 1x1 fields, when a player selecting a bush, he/she must have the ability in the command card to remove the bush for 100 minerals which makes it able to place a tower at that location

I tried to do this with bombs because I know how to explode bombs and don't know how to remove bushes


Attempt

- I give the bushes to the player, so the command card will be visible
- I created an ability called remove bush ($100)

Now I want to make a trigger that if the button is pressed, the bush must disappear
But I CANNOT find the pressed-button-unit in the remove-unit-trigger-action

(the condition checks if the player has at least 100 minerals)


Anyone have any ideas?
 

X-maul

AKA: Demtrod
Reaction score
201
You cant check when a button is pressed.

You can only check when an ability or an effect is used. So use an instant ability.


BUT - I would suggest you to use an ability with a damage effect. Check the flag Kill, and set the target to caster.

You can set the cost of the ability to 100 minerals, or whatever you want it to be.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
As X-maul said, you don't need a trigger at all. Keep your button, create a damage effect with the flag Kill and the target set to caster. This means that if the effect is run, it will kill the caster.

Now you just want to be able to run this effect on the bomb. So create an effect-instant ability and link it to your button and effect and set the cost to 100 and you're done.

(Note that using this method, you could use bushes instead of bombs)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top