Help with trigger

Sonic

New Member
Reaction score
10
Trigger:
  • Events
    • Unit - A unit Is attacked
    • Conditions
      • (Level of Knockback for (Attacking unit)) Greater than (>) 0
      • (Random integer number between 1 and 100) Less than or equal to (<=) (4 + (3 x (Level of Knockback for (Attacking unit))))
    • Actions
      • Set TempUnit = (Attacking unit)
      • Set Camera_Hide = (Unit-type of TempUnit)
      • Set TempUnit = (Attacking unit)
      • Set TempUnit2 = (Attacked unit)
      • Set TempLoc = (Position of TempUnit)
      • Set TempLoc2 = (Position of TempUnit2)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (TempUnit2 is alive) Equal to (==) True
          • Then - Actions
            • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Items\AIil\AIilTarget.mdl
            • Special Effect - Destroy (Last created special effect)
            • Wait 0.10 seconds
            • Unit - Hide TempUnit
            • Wait 1.00 seconds
            • Unit - Unhide TempUnit
            • Selection - Select (Attacking unit) for (Owner of TempUnit)
            • Special Effect - Create a special effect attached to the chest of TempUnit using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
            • Special Effect - Destroy (Last created special effect)
            • Unit - Move (Triggering unit) instantly to (Position of (Attacked unit))
            • Set Damage_FORMULA = ((Real((Strength of TempUnit (Include bonuses)))) x 0.50)
            • Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage_FORMULA damage of attack type Spells and damage type Universal
            • Animation - Play TempUnit's Attack Slam animation
            • Unit - Cause TempUnit to damage TempUnit2, dealing (50.00 + (50.00 x (Real((Level of Knockback for TempUnit))))) damage of attack type Hero and damage type Universal
            • Set KnockbackCall_Unit = TempUnit2
            • Set KnockbackCall_Dur = 1.00
            • Set KnockbackCall_Dist = 400.00
            • Set KnockbackCall_Angle = (Angle from TempLoc to TempLoc2)
            • Set KnockbackCall_SFX = Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
            • Set KnockbackCall_DestroyTree = True
            • Trigger - Run Knocback Call <gen> (ignoring conditions)
          • Else - Actions

When the unit is becomes unhidden it selects the unit , but I want to select unit if the player was selected the unit before it hides,is it possible, IF I was selected before it will select, and If I was controling another unit it doesn't select
+rep!
 

BRUTAL

I'm working
Reaction score
118
make a trigger like
event- player 1 selects a unit
actions- set SelectedUnit = TriggeringUnit

then in your spell put an if/then like
if SelectedUnit equal to CastingUnit
then select new unit blah
 
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