- Joined
- May 29, 2013
- Messages
- 1,566
I'm trying to make the Mind Rot ability (ANmr) look and behave like an autocast ability, so I made a dummy ability based on Frenzy (Afzy) because it is never used when I set the Targets Allowed to Wall.
I want to detect when the dummy ability is manually used, replace it with the real Mind Rot and force the player to press its hotkey; and then switch back the two abilities when the unit stops or finishes casting Mind Rot.
Also, hiding and unhiding an ability messes up the cooldown indicator; the ability looks like it's ready for use even though it's actually on cooldown. I tried adding and removing the ability instead, but that seems even slower and more inconsistent.
I want to detect when the dummy ability is manually used, replace it with the real Mind Rot and force the player to press its hotkey; and then switch back the two abilities when the unit stops or finishes casting Mind Rot.
-
Add Unit to Autocasting Group
-
Events
- Unit - A unit Is issued an order with no target
-
Conditions
- (Issued order) Equal to (Order(frenzyon))
-
Actions
- Unit Group - Add (Triggering unit) to AutocastingFrenzy
-
Events
-
Remove Unit from Autocasting Group
-
Events
- Unit - A unit Is issued an order with no target
-
Conditions
- (Issued order) Equal to (Order(frenzyoff))
-
Actions
- Unit Group - Remove (Triggering unit) from AutocastingFrenzy
-
Events
-
Unit Starts Casting
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Mind Rot (Frenzy)
-
Actions
- Unit - For (Triggering unit), Ability Mind Rot (Mind Rot), Hide ability: False
- Unit - For (Triggering unit), Ability Mind Rot (Frenzy), Hide ability: True
- Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + 50.00)
- -------- ^This refunds the mana cost of the dummy ability --------
- Wait 0.01 seconds
- -------- ^It doesn't seem to work without this wait --------
- Game - Force (Owner of (Triggering unit)) to press the key R
-
Events
-
Unit Stops Casting
-
Events
- Unit - A unit Stops casting an ability
- Unit - A unit Finishes casting an ability
-
Conditions
- (Ability being cast) Equal to Mind Rot (Mind Rot)
-
Actions
- Unit - For (Triggering unit), Ability Mind Rot (Frenzy), Hide ability: False
- Unit - For (Triggering unit), Ability Mind Rot (Mind Rot), Hide ability: True
-
Events
-
Autocast Order
-
Events
- Unit - A unit Is attacked
-
Conditions
- ((Attacking unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
- (Mana of (Attacking unit)) Greater than 30.00
-
Actions
- Set MR_Point = (Position of (Attacked unit))
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 600.00 of MR_Point) and do (Actions)
-
Loop - Actions
- Set MR_Caster = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (MR_Caster is alive) Equal to True
- (Level of Mind Rot (Frenzy) for MR_Caster) Greater than 0
- (MR_Caster is in AutocastingFrenzy) Equal to True
- (MR_Caster belongs to an ally of (Owner of (Attacked unit))) Equal to True
-
Then - Actions
- Unit - For (Triggering unit), Ability Mind Rot (Mind Rot), Hide ability: False
- Unit - For (Triggering unit), Ability Mind Rot (Frenzy), Hide ability: True
- Custom script: call IssueTargetOrderById (udg_MR_Caster, 852565, GetAttacker())
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Custom script: call RemoveLocation(udg_MR_Point)
-
Events
Also, hiding and unhiding an ability messes up the cooldown indicator; the ability looks like it's ready for use even though it's actually on cooldown. I tried adding and removing the ability instead, but that seems even slower and more inconsistent.
Last edited: