• 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.

Triggers

Status
Not open for further replies.
Level 2
Joined
Jun 8, 2014
Messages
15
Hi! I'm facing a problem here. How do I make a skill to be on "cooldown" (which means that I'm fine with the skill becoming a darkened icon OR via a trigger that says "Skill is not ready") for all players. So far, these are my triggers for that skill.

<This is the trigger for the skill "Mortar Strike">

Events
Unit - A unit begins channeling an ability

Conditions
(Ability being cast) equals to Mortar Strike

Actions
Wait 10 seconds
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
Unit - Create 1 Dummy etc.


<This is for the countdown timer>

Events
Unit - A unit begins channeling an ability

Conditions
(Ability being cast) equals to Mortar Strike
(Reamining time for MortarCDTimer) equal to 0

Actions
Game - Display to (All players) the text: blah blah blah


<This is timer box>

Events
Unit - A unit begins channeling an ability

Conditions
(Ability being cast) equals to Mortar Strike

Actions
Create etc.


As this is my first map after learning from the tutorial, I would prefer a GUI explanation.

Thank you!
 
Level 5
Joined
Jan 23, 2014
Messages
152
Use begins casting an ability instead of begins channeling an ability. And dont use wait. Try setting the cast time of the ability to 10 seconds in the object editor.
It would be better if you could post the trigger, right click the trigger name and copy as text, paste it here and enclose it with the the trigger tag. ie: [GUI] *paste your trigger here* [/GUI]
 
[trigger=]
Events
Unit - A unit Starts the effect of an ability
Conditions
Actions
[/trigger]

Use that event instead of what you have been using as well what elm0 has suggested, both are bad and should not be used.

Also you could add a dummy ability where you remove the casted ability then a dummy passive one or where one like windwalk doesn't interrupt orders to have a visible cooldown or dummy unit-required for each ability and I am sure there are other ways too.
 
Level 2
Joined
Jun 8, 2014
Messages
15

Trigger for Mortar Strike
  • Mortar Strike
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Mortar Strike
    • Actions
      • Wait 10.00 seconds
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for Neutral Passive at (Position of (Triggering unit)) facing 0.00 degrees
          • Unit - Add Mortar Strike Blast to (Last created unit)
          • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike (Random point in Mortar blast <gen>)
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Wait 7.00 seconds
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for Neutral Passive at (Position of (Triggering unit)) facing 0.00 degrees
          • Unit - Add Mortar Strike Blast to (Last created unit)
          • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike (Random point in Mortar blast <gen>)
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Wait 7.00 seconds
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for Neutral Passive at (Position of (Triggering unit)) facing 0.00 degrees
          • Unit - Add Mortar Strike Blast to (Last created unit)
          • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike (Random point in Mortar blast <gen>)
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Wait 7.00 seconds
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for Neutral Passive at (Position of (Triggering unit)) facing 0.00 degrees
          • Unit - Add Mortar Strike Blast to (Last created unit)
          • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike (Random point in Mortar blast <gen>)
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Wait 2.00 seconds
      • Game - Display to (All players) the text: Mortar Strike has e...
      • Trigger - Turn off (This trigger)



Trigger for cooldown
  • Cooldown
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Mortar Strike
      • (Remaining time for MortarCDTimer) Equal to 0.00
    • Actions
      • Game - Display to (All players) the text: Mortar Strike is no...



Trigger for timerbox
  • TImer
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mortar Strike
    • Actions
      • Countdown Timer - Create a timer window for MortarCDTimer with title Next Mortar Strike ...
      • Set MortarTimerWindow = (Last created timer window)
      • Countdown Timer - Start MortarCDTimer as a One-shot timer that will expire in 200.00 seconds


Thank you!
 
Status
Not open for further replies.
Top