Unit Remains Unselectable

Zealot

Member
Reaction score
11
It works that if the unit casts the ability it will be removed from selection and will gain the Locust ability until the last trigger is executed. Thing is if the targeted unit dies before the execution of the triggers, another trigger gets started that should stop the other triggers and remove any attributes added by triggers until then.But while the unit becomes visible and is not invulnerable anymore, it remains unselectable. These are the triggers.

Trigger:
  • Dimensional Tear
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dimension Door
    • Actions
      • Set Dimensional_Tear_Check_Ready = 0
      • Set Dimensional_Tear_Check_Stun = 0
      • Set Dimensional_Tear_Growth = 0
      • Set Dimensional_Tear_Caster = (Casting unit)
      • Set Dimensional_Tear_Target = (Target unit of ability being cast)
      • Unit - Pause Dimensional_Tear_Caster
      • Animation - Play Dimensional_Tear_Caster's slam animation
      • Set Dimensional_Tear_Point = (Position of Dimensional_Tear_Target)
      • Set Dimensional_Tear_Origin = (Position of Dimensional_Tear_Caster)
      • Set Dimensional_Tear_Original = (Distance between Dimensional_Tear_Damage_Point and Dimensional_Tear_Origin)
      • Unit - Create 1 Dimensional Door Dummy for (Owner of Dimensional_Tear_Caster) at Dimensional_Tear_Point facing (Random angle) degrees
      • Set Dimensional_Tear_Tendril = (Last created unit)
      • Animation - Change Dimensional_Tear_Tendril's animation speed to 200.00% of its original speed
      • Unit - Make Dimensional_Tear_Caster face Dimensional_Tear_Point over 0.00 seconds
      • Countdown Timer - Start Dimensional_Tear_Timer as a One-shot timer that will expire in 0.00 seconds
      • Countdown Timer - Start Dimensional_Tear_Periodic as a One-shot timer that will expire in 0.00 seconds
      • Selection - Remove Dimensional_Tear_Caster from selection
      • Custom script: call UnitAddAbility(udg_Dimensional_Tear_Caster, 'Aloc')
      • Animation - Change Dimensional_Tear_Caster's vertex coloring to (100.00%, 100.00%, 100.00%) with 60.00% transparency
      • Trigger - Turn on Dimensional Tear Damage <gen>
      • Countdown Timer - Start Dimensional_Tear_Periodic as a One-shot timer that will expire in 0.00 seconds
      • Trigger - Turn on Dimensional Tear Check <gen>
      • Countdown Timer - Start Dimensional_Tear_Check_Timer as a One-shot timer that will expire in 0.00 seconds
      • Trigger - Turn on Dimensional Tear Movement <gen>
      • Custom script: call RemoveLocation (udg_Dimensional_Tear_Point)
      • Custom script: call RemoveLocation (udg_Dimensional_Tear_Origin)
      • Trigger - Turn on Dimensional Tear Debug <gen>


Trigger:
  • Dimensional Tear Movement
    • Events
      • Time - Dimensional_Tear_Timer expires
    • Conditions
      • (Dimensional_Tear_Target is alive) Equal to True
    • Actions
      • Set Dimensional_Tear_Point = (Position of Dimensional_Tear_Target)
      • Set Dimensional_Tear_Origin = (Position of Dimensional_Tear_Caster)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Distance between Dimensional_Tear_Origin and Dimensional_Tear_Point) Less than or equal to 600.00
    • Then - Actions
      • Animation - Change Dimensional_Tear_Caster's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Unit - Hide Dimensional_Tear_Caster
      • Unit - Create 1 Dimensional Door SFX for (Owner of Dimensional_Tear_Caster) at Dimensional_Tear_Origin facing Default building facing degrees
      • Unit - Add a 0.40 second Generic expiration timer to (Last created unit)
      • Set Dimensional_Tear_Check_Ready = 1
      • Trigger - Turn on Dimensional Tear Attack <gen>
      • Custom script: call RemoveLocation (udg_Dimensional_Tear_Origin)
      • Custom script: call RemoveLocation (udg_Dimensional_Tear_Point)
      • Trigger - Turn off Dimensional Tear Movement <gen>
    • Else - Actions
      • Unit - Create 1 Dimensional Door SFX for (Owner of Dimensional_Tear_Caster) at Dimensional_Tear_Origin facing Default building facing degrees
      • Unit - Add a 0.40 second Generic expiration timer to (Last created unit)
      • Animation - Play Dimensional_Tear_Caster's attack animation
      • Unit - Move Dimensional_Tear_Caster instantly to (Dimensional_Tear_Origin offset by 300.00 towards (Angle from Dimensional_Tear_Origin to Dimensional_Tear_Point) degrees)
      • Countdown Timer - Start Dimensional_Tear_Timer as a One-shot timer that will expire in 0.50 seconds
      • Custom script: call RemoveLocation (udg_Dimensional_Tear_Origin)
      • Custom script: call RemoveLocation (udg_Dimensional_Tear_Point)


Trigger:
  • Dimensional Tear Damage
    • Events
      • Time - Dimensional_Tear_Periodic expires
    • Conditions
      • (Dimensional_Tear_Target is alive) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Dimensional_Tear_Growth Equal to 180
    • Then - Actions
      • Unit - Add Storm Bolt to Dimensional_Tear_Tendril
      • Unit - Set level of Storm Bolt for Dimensional_Tear_Tendril to (Level of Dimension Door for Dimensional_Tear_Caster)
      • Unit - Order Dimensional_Tear_Tendril to Human Mountain King - Storm Bolt Dimensional_Tear_Target
      • Set Dimensional_Tear_Check_Stun = 1
      • Custom script: call RemoveLocation (udg_Dimensional_Tear_Damage_Point)
      • Trigger - Turn off Dimensional Tear Damage <gen>
    • Else - Actions
      • Set Dimensional_Tear_Damage_Point = (Position of Dimensional_Tear_Target)
      • Unit - Move Dimensional_Tear_Tendril instantly to Dimensional_Tear_Damage_Point
      • Set Dimensional_Tear_Growth = (Dimensional_Tear_Growth + 1)
      • Custom script: call RemoveLocation (udg_Dimensional_Tear_Damage_Point)
      • Countdown Timer - Start Dimensional_Tear_Periodic as a One-shot timer that will expire in 0.01 seconds


Trigger:
  • Dimensional Tear Check
    • Events
      • Time - Dimensional_Tear_Check_Timer expires
    • Conditions
      • (Dimensional_Tear_Target is alive) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
    • Conditions
      • Dimensional_Tear_Check_Ready Equal to 1
      • Dimensional_Tear_Check_Stun Equal to 1
    • Then - Actions
      • Countdown Timer - Start Dimensional_Tear_Attack as a One-shot timer that will expire in 0.50 seconds
      • Trigger - Turn off Dimensional Tear Check <gen>
    • Else - Actions
      • Countdown Timer - Start Dimensional_Tear_Check_Timer as a One-shot timer that will expire in 0.01 seconds


Trigger:
  • Dimensional Tear Attack
    • Events
      • Time - Dimensional_Tear_Attack expires
    • Conditions
      • (Dimensional_Tear_Target is alive) Equal to True
    • Actions
      • Set Dimensional_Tear_Point = (Position of Dimensional_Tear_Target)
      • Unit - Move Dimensional_Tear_Caster instantly to (Dimensional_Tear_Point offset by 15.00 towards (Random angle) degrees), facing Dimensional_Tear_Point
      • Set Dimensional_Tear_Origin = (Position of Dimensional_Tear_Caster)
      • Unit - Create 1 Dimensional Door SFX for (Owner of Dimensional_Tear_Caster) at Dimensional_Tear_Origin facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Unpause Dimensional_Tear_Caster
      • Unit - Make Dimensional_Tear_Caster face Dimensional_Tear_Point over 0.00 seconds
      • Unit - Unhide Dimensional_Tear_Caster
      • Unit - Order Dimensional_Tear_Caster to Attack Dimensional_Tear_Target
      • Unit - Remove Dimensional_Tear_Tendril from the game
      • Custom script: call RemoveLocation (udg_Dimensional_Tear_Origin)
      • Custom script: call RemoveLocation (udg_Dimensional_Tear_Point)
      • Trigger - Turn on Dimensional Tear Strike <gen>
      • Trigger - Turn off Dimensional Tear Attack <gen>


Trigger:
  • Dimensional Tear Strike
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
    • Conditions
      • ((Attacked unit) has buff Soul Prison ) Equal to True
      • (Attacking unit) Equal to Dimensional_Tear_Caster
    • Actions
      • Countdown Timer - Start Dimensional_Tear_End_Timer as a One-shot timer that will expire in 0.30 seconds
      • Set Dimensional_Tear_Target = (Attacked unit)
      • Set Dimensional_Tear_Damage = (((0.04 + (0.01 x ((Real((Level of Dimension Door for Dimensional_Tear_Caster))) x ((Real((Strength of Dimensional_Tear_Caster (Include bonuses)))) x 0.01)))) x Dimensional_Tear_Original) + ((10.00 x (Real((Level of Dimension Door for Dimensional_Tear_Caste
      • Trigger - Turn on Dimensional Tear End <gen>
      • Trigger - Turn off Dimensional Tear Strike <gen>


Trigger:
  • Dimensional Tear End
    • Events
      • Time - Dimensional_Tear_End_Timer expires
    • Conditions
      • (Dimensional_Tear_Target is alive) Equal to True
    • Actions
      • Special Effect - Create a special effect attached to the origin of Dimensional_Tear_Target using ShadowTrap.mdx
      • Unit - Cause Dimensional_Tear_Caster to damage Dimensional_Tear_Target, dealing Dimensional_Tear_Damage damage of attack type Hero and damage type Death
      • Floating Text - Create floating text that reads (String((Integer(Dimensional_Tear_Damage)))) above Dimensional_Tear_Target with Z offset 0.00, using font size 11.00, color (40.00%, 40.00%, 40.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
      • Unit - Remove Soul Prison buff from Dimensional_Tear_Target
      • Custom script: call UnitRemoveAbility(udg_Dimensional_Tear_Caster,'Aloc')
      • Selection - Add Dimensional_Tear_Caster to selection
      • Special Effect - Destroy (Last created special effect)
      • Trigger - Turn off Dimensional Tear End <gen>


And this is the failsafe trigger.
Trigger:
  • Dimensional Tear Debug
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to Dimensional_Tear_Target
    • Actions
      • Trigger - Turn off Dimensional Tear End <gen>
      • Trigger - Turn off Dimensional Tear Strike <gen>
      • Trigger - Turn off Dimensional Tear Attack <gen>
      • Trigger - Turn off Dimensional Tear Check <gen>
      • Trigger - Turn off Dimensional Tear Damage <gen>
      • Trigger - Turn off Dimensional Tear Movement <gen>
      • Custom script: call RemoveLocation (udg_Dimensional_Tear_Origin)
      • Custom script: call RemoveLocation (udg_Dimensional_Tear_Point)
      • Animation - Change Dimensional_Tear_Caster's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Unit - Remove Dimensional_Tear_Tendril from the game
      • Unit - Unpause Dimensional_Tear_Caster
      • Unit - Unhide Dimensional_Tear_Caster
      • Custom script: call UnitRemoveAbility(udg_Dimensional_Tear_Caster,'Aloc')
      • Selection - Add Dimensional_Tear_Caster to selection
      • Trigger - Turn off Dimensional Tear Debug <gen>


Any help would be appreciated.
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Could you make it more cleaner? E.G. Adding spaces after Events so it looks like this:
Trigger:
  • Dimensional Tear Debug
    • Events
      • A unit dies
    • Conditions
      • (Dying unit) equal to Dimensional_Tear_Target
    • Actions

instead of how you did it, so it's easier on the eye. Also: there is a feature in the editor that allows you to copy triggers, and then paste them as text. If you right click the Dimensional Tear Debug inside of the trigger, it will give you options to "Copy as text"
 

Zealot

Member
Reaction score
11
Could you make it more cleaner? E.G. Adding spaces after Events so it looks like this:
Trigger:
  • Dimensional Tear Debug
    • Events
    • A unit dies
    • Conditions
    • (Dying unit) equal to Dimensional_Tear_Target
    • Actions

instead of how you did it, so it's easier on the eye. Also: there is a feature in the editor that allows you to copy triggers, and then paste them as text. If you right click the Dimensional Tear Debug inside of the trigger, it will give you options to "Copy as text"

Changed them, is this better?
 

Ninva

Анна Ахматова
Reaction score
377
I think the "problem" is that this information is a block of text. Going through it and finding the problem will take anyone a bit of time. And since there's really no reward for finding the answer, you may have a hard time getting an answer.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
You have to hide the unit when you remove Locust from it, otherwise it doesn't work.
Trigger:
  • Unit - Hide MyUnit
    • Custom script: call UnitRemoveAbility(udg_MyUnit,'Aloc')
    • Unit - Unhide MyUnit

This seems to work too. I assume hiding it refreshes the unit's properties or something, which is why just unhiding didn't work.
Trigger:
  • Custom script: call UnitRemoveAbility(udg_MyUnit,'Aloc')
    • Unit - Hide MyUnit
    • Unit - Unhide MyUnit

I think the "problem" is that this information is a block of text. Going through it and finding the problem will take anyone a bit of time. And since there's really no reward for finding the answer, you may have a hard time getting an answer.
Most trigger problems come in blocks of text lol.
 

Zealot

Member
Reaction score
11
You have to hide the unit when you remove Locust from it, otherwise it doesn't work.
Trigger:
  • Unit - Hide MyUnit
    • Custom script: call UnitRemoveAbility(udg_MyUnit,'Aloc')
    • Unit - Unhide MyUnit

This seems to work too. I assume hiding it refreshes the unit's properties or something, which is why just unhiding didn't work.
Trigger:
  • Custom script: call UnitRemoveAbility(udg_MyUnit,'Aloc')
    • Unit - Hide MyUnit
    • Unit - Unhide MyUnit


Most trigger problems come in blocks of text lol.

Yeah this worked, weird how this works though. Thanks.

I think the "problem" is that this information is a block of text. Going through it and finding the problem will take anyone a bit of time. And since there's really no reward for finding the answer, you may have a hard time getting an answer.

What can you do, triggers are serious business.
 
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