• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Unique Ability/Spell Help

Status
Not open for further replies.
Level 2
Joined
Jul 12, 2005
Messages
15
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.
 
Level 13
Joined
Dec 29, 2004
Messages
597
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>.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
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
 
Level 2
Joined
Jul 12, 2005
Messages
15
Code:
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.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
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
 
Level 2
Joined
Jul 12, 2005
Messages
15
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.
 
Level 10
Joined
Jul 2, 2004
Messages
690
you can do give abilities and stuff... use a dummy skill to show that the skill has been casted
 
Level 2
Joined
Jul 12, 2005
Messages
15
evidently the WEU gives different ids to every copy of a custom ability. i was using the official editor. solved.
 
Level 2
Joined
May 2, 2005
Messages
20
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.
 
Level 10
Joined
Jul 2, 2004
Messages
690
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
 
Level 2
Joined
May 2, 2005
Messages
20
"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.
 
Status
Not open for further replies.
Top