• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

Advanced Trigger Sorting

Status
Not open for further replies.
Level 2
Joined
Jul 12, 2005
Messages
15
how do you write a trigger that does something only when Divine Shield is active?

i'm trying to make an ability that's duration or toggle based like divine shield can be. i want this ability bound to a trigger that fires off an action, only when the ability is active/toggled/on. so far, i've only found that 'Unit - A unit is issued an order with no target' fires my trigger, but i might/probably will want to use this type of triggering in another way of my map with a different ability. so, i need to be able to know what is going on... not just that it's going on, because it fires when you learn the ability that way.
 
Level 2
Joined
Jul 12, 2005
Messages
15
i'm trying to make an ability that i can toggle on/off on a hero which gives 1 mana per second while it's on. simple as that...
 
Level 16
Joined
Oct 30, 2004
Messages
1,277
I didnt check this in the editor, but woulndt it go like this:

Event
Unit starts casting a spell
Conditions
Casting spell equal to manaspell
Actions
Set variable "Caster" = Casting unit
Turn on trigger "ThisgivesMana"

Trigger "ThisgivesMana":

Event
Every 1 second of game time
Conditions
None
Actions
Add 1 mana to "Caster" mana pool

Third trigger:

Event
"Caster" finishes casting a spell
Condition
Casted spell equal to Manaspell
Actions
Turn of trigger "ThisgivesMana"


Try that, i just wrote this while trying to remember some triggers, as said havent checked if it works, try it and say did it work.
 
Level 2
Joined
Jul 12, 2005
Messages
15
Event
Unit starts casting a spell
Conditions
Casting spell equal to manaspell
Actions
Set variable "Caster" = Casting unit
Turn on trigger "ThisgivesMana"

no, this don't work... seems the only one i have gotten to respond is the 'single player only' warned 'hero clicked ability button', something like that... not sure of the exact name right now..
 
Level 6
Joined
Aug 29, 2004
Messages
159
This is an 'air drain' trigger which i use to take air (mana) from submerged submarines. I've modified it slightly for your purposes. The unit that is regaining mana needs a spell based off 'Divine Shield' which gives them the custom buff 'ManaSpell'.

Mana Gain.
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching (((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 - Order (Picked unit) to Human Paladin - Deactivate Divine Shield
Else - Actions
Do nothing

That should work like diddly. :). Have fun.
=][= Bort
 
Level 2
Joined
Jul 12, 2005
Messages
15
ok, so if i base this off of divine shield and use:

Unit - Order (Picked unit) to Human Paladin - Deactivate Divine Shield

how would i go about making another ability that does the same thing, but for health.

it seems i can use this:

Unit - Remove ManaSpell buff from (Picked unit)

that would work with multiple spells, i think at least... going to try it. what would be the difference between using that and using yours? are there any cons or side affects?
 
Level 2
Joined
Jul 12, 2005
Messages
15
ok, got it working... but i made the 2nd ability based on immolation..... i need another ability to base the 2nd off of that has a Data - Can Deactivate property, so i can set that to false.
 
Level 2
Joined
Jul 12, 2005
Messages
15
evidently WEU gives a different id to every copy of a custom ability. i was using the official editor. solved.
 
Status
Not open for further replies.
Top