A Very Simple Question

Flamesword

New Member
Reaction score
0
I don't know if I'm revolutionary, or just really stupid, but a lot of the questions I ask here are responded with "That's not possible". Go look at my other posts and see for yourself. Anyway, that's not my question
I have a custom Defend ability, but I want it to drain mana. I have a trigger to drain mana when it detects the Phoenix Guard buff I created for this ability, but I can't seem to attach it properly. In my custom Defend ability's page, I have: "Level # - Stats - Buffs: Phoenix Guard" but it doesn't appear on my hero when I activate it. What gives?
I'm know this is a noob question, but I'd rather feel noobish now than frustrated later.
 

Zedzy

ℑΣÐℑΨ
Reaction score
41
We say if it's not possible so that the person doesn't spend wasted hours on something that isn't possible.

You could add the buff to a unit whenever it activates defend, and take it away when when they deactivate it.
 

Flamesword

New Member
Reaction score
0
If you mean by using triggers, that is not possible. There is no such trigger to add a buff to a unit. Furthermore, there is no trigger to determine when a toggelable ability, such as defend, turns on as oppose to off.
 

Knight7770

Hippopotomonstrosesquiped aliophobia
Reaction score
187
Well, you could have 3 abilities:
  • A dummy ability
  • An active Defend ability
  • An inactive Defend ability
The dummy ability would be added to the unit when it uses the spell to give it the buff. That way, you could simply detect whether the unit has the ability or not. The active Defend ability would be used to simulate a toggled-on Defend ability. When one uses the active Defend ability, thus turning it off, remove the ability and give the unit the inactive Defend ability, and vice versa.
 

Flamesword

New Member
Reaction score
0
That could work, but seems needlessly complicated. Besides, wouldn't that also require half of the allowed hero ability slots, and one fourth of the command card for one ability?
 

MurderMode

Giving new meaning to co-op... slowly
Reaction score
154
That could work, but seems needlessly complicated. Besides, wouldn't that also require half of the allowed hero ability slots, and one fourth of the command card for one ability?

lol a couple of things i don't get about you

-Why call your topic 'a very simple question' if you don't have an answer to it? How would u kno it is simple until you have solved it?

- why ask a question to solve something you don't know how to, just to respond that a possible solution is needlessly complicated?

anyways, that aside... it kind of is needlessly complicated lol.

Code:
ordered to defend
    Events
        Unit - A unit Is issued an order with no target
    Conditions
        (Issued order) Equal to Human Footman - Defend
    Actions
        Unit Group - Add (Triggering unit) to defendgroup

Code:
a unit is defending
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in defendgroup and do (Actions)
            Loop - Actions
                Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 10.00)

Code:
ordered to stop defending
    Events
        Unit - A unit Is issued an order with no target
    Conditions
        (Issued order) Equal to Human Footman - Stop Defend
    Actions
        Unit Group - Remove (Triggering unit) from defendgroup

anyways, just use more tact when you post. It's not very appealing to help someone who apparently has all the answers... so you might find that when you have a problem with a difficult solution people will just tell you its impossible instead of going through the effort to help you. And as far as some things being impossible... well some things are lol. But there is generally always a long, hard yet logical way around it. Build on what you know and sometimes you can stumble across an answer to an old problem... so when you get stuck in one area, move on to the next and come back later. You'll be surprised how many things you can figure out yourself when you step away from the problem.
 

Flamesword

New Member
Reaction score
0
I see. Sorry if I came off as an ass. ^^' Thanks for trying to help. It seems it just came to a misunderstanding of what you were trying to say. Like I said before, I could just be stupid. When I posted the question, I thought it would have been a lot simpler.
 

vypur85

Hibernate
Reaction score
803
Code:
Melee Initialization
    Events
        Unit - A unit Is issued an order with no target
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Issued order) Equal to (Order(defend))
                (Issued order) Not equal to (Order(undefend))
            Then - Actions
                Unit - Create 1 Footman for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
                Unit - Add Rejuvenation to (Last created unit)
                Unit - Order (Last created unit) to Night Elf Druid Of The Claw - Rejuvenation (Triggering unit)
                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                Unit - Hide (Last created unit)
            Else - Actions
                Unit - Remove Rejuvenation buff from (Triggering unit)

This may work too. Give negative mana regeneration for the Rejuvenation ability (do the maths yourself on how much mana deducted per second). Only one trigger but need 1 dummy unit and 1 dummy ability. See which suits you best.

And yes, you can 'add buff' to units. By using dummy units.

Edit:
Now that I think about it, using MurderMode method should be better.
 
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