Warcraft III resources & community, 2003–2006 · archived

Unique Ability/Spell Help

13 posts
#1

Unique Ability/Spell Help

i'm trying to make an ability that can be turned on and off like Divine Shield can. I want the ability to give 1 mana per second to the user while the ability is activated.

I have tried basing a new custom ability off of divine shield, but i am unable to properly bind a trigger to it and distinguish the difference when i am using this method to accomplish several things. for instance, one ability of the hero which gives 1 mana per second.. then a whole different one that gives 1 health per second.. ie. i want to be able to use this method many times.
#2
So, you wanna make a toggleable spell? well, in order to acquire it, you must compare the order string.

Event: Unit ordered with no target
Condition : Oredered string equal to "divineshieldon"
Action: bla..bla..bla..

Since it compare the order string, you must create another spell based on another toggleable ability (not divine shield).

In this case, if you wanna make mana-gain spell and health-gain spell, you must make those abilities based on different toggleable spell (e.g immolation and mana shield)

ps: instead of divine shield, you should make it based on mana shield, since divine shield cannot be deactivated, i guess <without gameplay constant changes>.
#3
In general, Leopard is right. However, I'd want to fix some stuff as well, such as the EXACT code, since you might not know. Ok, you will need two triggers, a toggable ability (dummy ability, read the FAQ to find out more), preferrable Mana Shield, an item ability which increases mana regeneration rate by 1 (search for it under Neutral Passive -> Items) and lots of patience.

Now, let's say that your dummy ability is called ManaMana and the other one is called ManaInc. And here are the triggers you will need:

Trigger 1
Event - An Unit is issued an order with no target
Condition - Issued Order equal to "manashieldon"
Action - Add ManaInc to (Ordered Unit)

Trigger 2
Event - An Unit is issued an order with no target
Condition - Issued order equal to "manashieldoff"
Actions - Remove ManaInc from (Ordered Unit)

That should do it, hopefully. Any other questions? Post here.

~Daelin
#4

ManaSpell Trigger
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)(((Matching unit) has buff ManaSpell ) Equal to True)) and do (Actions)
            Loop - Actions
                Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + 1.00)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Mana of (Picked unit)) Equal to (Max mana of (Picked unit))
                    Then - Actions
                        Unit - Remove ManaSpell  buff from (Picked unit)
                    Else - Actions
                        Do nothing


this is what i've got now... based it off Divine Shield and added a custom buff (ManaSpell). i like how this works... graphically and all... problem is, i need another ability just like this one that responds to a different trigger. so, i'm thinking i need another ability that has the Data - Can Deactivate property and i can set that to false.
#5
I think Wind Walk still has this property of deactivation but I'm not sure. I think all such abilities were made so you cannot deactive them. But I don't understand why you would want the unit to deactivate the ability if it wants. After all, who would want to get rid of mana bonus? You could base your ability off Berserk cuz if you based it off Divine Shield the unit might get invulnerable as well.

~Daelin
#6
i want it to remain on and not have the ability to click off, unless by triggers.

i have been unable to find another ability with that property. windwalk does not have it.
#7
you can do give abilities and stuff... use a dummy skill to show that the skill has been casted
#8
...
#9
evidently the WEU gives different ids to every copy of a custom ability. i was using the official editor. solved.
#10
Simple solution:

Immolation. Change the Data - Mana Drained Per Second to -1 or whatever it is you want.

Just adjust the fields and buffs etc.
#11
ordanis : i use the normal world editor

evasion : he doesnt want the spell to be able to be turned off. he just wants it to be disabled after the spell is casted
#12
For his spell, that's just Berserk. It gives the buff and it dooesn't require deactivation or something.

~Daelin
#13
"i'm trying to make an ability that can be turned on and off like Divine Shield can."

Taking that, you'd think he wanted something that "Turns on and off", such as Immolation.