base ability

hgkjfhfdsj

Active Member
Reaction score
55
hi
any base ability that:
- can turn on/off like defend
- starts cooldown AFTER turning off
- and if possible non-interrupting spell

thankyou
 

Bogrim

y hello thar
Reaction score
154
The only way you can get the spell to cooldown first after turning the ability off is by removing/disabling the ability and use Berserk to create a fake cooldown, then readd the ability once the cooldown is finished.
 

Bogrim

y hello thar
Reaction score
154
Berserk doesn't interrupt the unit's current order unless it's channeling a spell, which seems highly doubtful considering you wanted the effect to take place when turning off a toggle ability.
 

hgkjfhfdsj

Active Member
Reaction score
55
but to order unit to use berserk interrupts order (trhough trigger)? or are you thinking of another method.. >.>
 

Bogrim

y hello thar
Reaction score
154
No, it doesn't. You should really go test the solutions you are given before questioning them.
 

hgkjfhfdsj

Active Member
Reaction score
55
actually i tested this before i posted the question xD
Trigger:
  • Untitled Trigger 001
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Order The Power Lich 0027 <gen> to Orc Troll Berserker - Berserk


my trigger + c&p berserk >> hero ability enabled.

did i do something wrong?
 

Bogrim

y hello thar
Reaction score
154
Uhm, yes? That's not even a trigger for what you're asking. Seriously man, start trying or I won't even bother helping.
 

hgkjfhfdsj

Active Member
Reaction score
55
.. ?
from what i understood in post 2 (2 interpretations)
(1)
- a unit turns on ability
- a unit turns off ability
- remove/disable turns off ability
- add berserk
- order berserk
- timer >> cooldown
- remove berserk
- add turn 'on ability'

(2)
- a unit turns on ability
- remove/disable turns on ability
- add berserk (turn off)
- a unit turns off ability (uses berserk)
- timer >> cooldown
- remove berserk
- add turn 'on ability'
 

Bogrim

y hello thar
Reaction score
154
Let's assume you're using the Defend ability. Defend has two order IDs, "defend" and "undefend", which both are detectable in a generic unit event. When a unit is issued to turn off the ability, you just remove or disable said ability and add your "fake cooldown" ability, which would be an ability based on Berserk altered to do nothing but look identical in its tooltip, and then it's just about swapping between those two abilities to create the illusion of a real cooldown.

Use timers to make sure the change happens at the accurate moment so that the player won't notice any difference.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
- starts cooldown AFTER turning off
Perhaps you could just make your effects start when the ability is turned off, and stop when turned on?

Let's assume you're using the Defend ability. Defend has two order IDs, "defend" and "undefend", which both are detectable in a generic unit event. When a unit is issued to turn off the ability, you just remove or disable said ability and add your "fake cooldown" ability, which would be an ability based on Berserk altered to do nothing but look identical in its tooltip, and then it's just about swapping between those two abilities to create the illusion of a real cooldown.
That would still require using a trigger to order the unit to use the Berserk ability in order to start that ability's cooldown, which, contrary to your previous statement, in fact does interrupt the unit's orders despite Berserk itself not interrupting a unit when cast by clicking on it.
 

Bogrim

y hello thar
Reaction score
154
That would still require using a trigger to order the unit to use the Berserk ability in order to start that ability's cooldown, which, contrary to your previous statement, in fact does interrupt the unit's orders despite Berserk itself not interrupting a unit when cast by clicking on it.
By removing or disabling the ability you still automatically turn off any active effects and it doesn’t interrupt whichever orders the unit currently has any less than ordering the unit to turn off the ability would have, which would give you the desired in-game effect.

I have done the exact same thing with Wind Walk to trigger the cooldown upon ending the effect rather than when it begins.
 

hgkjfhfdsj

Active Member
Reaction score
55
did you try to use defend?
yes, but the cooldown seems hardcoded? i tried with mana shield and the cooldown worked for that. i just changed the cooldown data field . anything else?

- corporeal form would of worked if it wasnt for its ethereal thingy..

less than ordering the unit to turn off the ability would have
- when you said 'use fake cooldown' it meant add ability and then order?
- non-interrupting spell >> does not interrupt queued orders
- i still cant grasp your method :(
- do you still have the wind walk spell? mind posting?

Perhaps you could just make your effects start when the ability is turned off, and stop when turned on?
lol yea i tried that.. its just that when its on cooldown in the stop (which is the cast) you can still use it (for mana shield)––testing immolation now =D

just clarifying something:
every triggered order unit ability interrupts queue/order? any way around that? otherwise ill just play around with autocast activate/deactivate instead lol. else ill scrap this idea and stick to an passive icon representing cooldown.
 

Tyrulan

Ultra Cool Member
Reaction score
37
The best base ability is almost always "Channel." Check the resources, there are tutorials are on how to modify it.

Cheers.
 

Bogrim

y hello thar
Reaction score
154
- when you said 'use fake cooldown' it meant add ability and then order?
- non-interrupting spell >> does not interrupt queued orders
- i still cant grasp your method :(
- do you still have the wind walk spell? mind posting?
Keep in mind that the trigger I made is not MUI and designed for a hero, therefore some parts are irrelevant:
Trigger:
  • Ability Wind Walk learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Wind Walk (Dummy)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned skill level) Equal to 1
        • Then - Actions
          • Unit - Add Wind Walk (Blademaster) to (Triggering unit)
          • Set unit_WindWalk = (Triggering unit)
        • Else - Actions
          • Unit - Increase level of Wind Walk (Blademaster) for (Triggering unit)
Trigger:
  • Ability Wind Walk
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Wind Walk (Blademaster)
    • Actions
      • Countdown Timer - Start timer_WindWalk[0] as a One-shot timer that will expire in 10.00 seconds
Trigger:
  • Ability Wind Walk break
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • GDD_DamageSource Equal to unit_WindWalk
      • (Remaining time for timer_WindWalk[0]) Greater than 0.00
    • Actions
      • Special Effect - Create a special effect attached to the chest of (Triggering unit) using war3mapImported\Bladewing.mdx
      • Special Effect - Destroy (Last created special effect)
      • Player - Disable Wind Walk (Blademaster) for (Owner of unit_WindWalk)
      • Unit - Add Berserk (Wind Walk) to GDD_DamageSource
      • Unit - Set level of Berserk (Wind Walk) for GDD_DamageSource to (Level of Wind Walk (Dummy) for GDD_DamageSource)
      • Unit - Order GDD_DamageSource to Orc Troll Berserker - Berserk
      • Unit - Remove Berserk buff from GDD_DamageSource
      • Countdown Timer - Start timer_WindWalk[1] as a One-shot timer that will expire in 10.00 seconds
      • Trigger - Turn off (This trigger)
Trigger:
  • Ability Wind Walk cooldown
    • Events
      • Time - timer_WindWalk[1] expires
    • Conditions
    • Actions
      • Unit - Remove Berserk (Wind Walk) from unit_WindWalk
      • Player - Enable Wind Walk (Blademaster) for (Owner of unit_WindWalk)
      • Trigger - Turn on Ability Wind Walk break <gen>

Berserk is like using a Potion. If your unit is running, it will continue running. If your unit is attacking, it will continue attacking. You don't have to worry about it overwriting any orders when using it in combination with another skill (considering you can't queue orders involving skills).
 

Bogrim

y hello thar
Reaction score
154
It means something that you tried. Here's a map with the trigger you're trying to accomplish. These are the triggers:
Trigger:
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set hashtable_Defend = (Last created hashtable)
Trigger:
  • Defend Off
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(undefend))
    • Actions
      • If (Increasing_Array Equal to 8192) then do (Set Increasing_Array = 1) else do (Set Increasing_Array = (Increasing_Array + 1))
      • Countdown Timer - Start timer_Defend[Increasing_Array] as a One-shot timer that will expire in 10.00 seconds
      • Hashtable - Save Handle Of(Triggering unit) as 0 of (Key (Last started timer)) in hashtable_Defend
      • Unit - Remove Defend from (Triggering unit)
      • Unit - Add Berserk (Defend) to (Triggering unit)
      • Unit - Order (Triggering unit) to Orc Troll Berserker - Berserk
      • Unit - Remove Berserk buff from (Triggering unit)
      • Trigger - Add to Defend On <gen> the event (Time - timer_Defend[Increasing_Array] expires)
Trigger:
  • Defend On
    • Events
    • Conditions
    • Actions
      • Set Temp_Unit = (Load 0 of (Key (Expiring timer)) in hashtable_Defend)
      • Unit - Remove Berserk (Defend) from Temp_Unit
      • Unit - Add Defend to Temp_Unit
      • Hashtable - Clear all child hashtables of child (Key (Expiring timer)) in hashtable_Defend

Copy the triggers and object data into your map and it'll work.
 

Attachments

  • Defend.w3x
    17.7 KB · Views: 107

Weep

Godspeed to the sound of the pounding
Reaction score
400
Berserk is like using a Potion. If your unit is running, it will continue running.
Why, then, in the map you posted subsequent to the post I'm quoting, does the footman stop running toward wherever I ordered it to move when I tell it to undefend, while without the triggers, it will continue running?

That's a rhetorical question - it's as I mentioned previously: even if an ability would not interrupt a unit's orders when you click on the ability in the game, using triggers to order the unit to cast it will interrupt it. This is true for any successful order, whether it be to cast Berserk, to turn off Immolation, to activate autocasting for any ability... It sucks, but it seems to be a limitation of triggering orders. Your solution is the right way to create fake cooldowns except for that one requirement the requester had.

I had an idea with using Spell Shield as a fake cooldown ability...give the unit a dummy Spell Shield ability with no mana cost and a cooldown, and immediately use an enemy dummy to cast an instant, immunity-penetrating spell like Finger of Death changed to be an "ultimate", which will trigger the spell shield...and then remove the ability after its cooldown with a timer. I think this might be the only true way to trigger a cooldown without interrupting the unit...
 

Bogrim

y hello thar
Reaction score
154
It's a good idea and I tested it out, Weep. However, I couldn't get it to work. When I used Channel, the ability wouldn't reflect and active the cooldown. When I used Finger of Pain, the spell wouldn't reflect either (and all there was left of those poor Footmen was a pool of blood). I also tried using Slow, which it did reflect, but the cooldown still didn't activate.

I don't think the Spell Amulet ability is coded well enough to work for anything but its original purpose.
 
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