Blink Spell

Leazy

You can change this now in User CP.
Reaction score
50
Hello! I made a unit which has a 20% chance to blink forward when attacked, this is how I did it:

Trigger:
  • Blink
    • Events
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Warp Spirit (Level 1)
    • Actions
      • Set Integer[1] = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer[1] Less than or equal to 20
        • Then - Actions
          • For each (Integer A) from 300 to 100, do (Actions)
            • Loop - Actions
              • Set Point[1] = (Position of (Triggering unit))
              • Set Point[2] = (Point[1] offset by (Real((Integer A))) towards (Facing of (Triggering unit)) degrees)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Terrain type at Point[2]) Equal to Lordaeron Summer - Rock
                • Then - Actions
                  • Special Effect - Create a special effect at Point[1] using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect at Point[2] using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Move (Triggering unit) instantly to Point[2]
                  • Custom script: call RemoveLocation (udg_Point[1])
                  • Custom script: call RemoveLocation (udg_Point[2])
                  • Skip remaining actions
                • Else - Actions
                  • Custom script: call RemoveLocation (udg_Point[1])
                  • Custom script: call RemoveLocation (udg_Point[2])
        • Else - Actions


The problem is that they don't blink, and I can't figure out why :S

I tried setting the chance to 100%, still nothing.
I tried removing the terrain condition, still nothing.
I set the event with this:
Trigger:
  • Initialize Creeps
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Blink <gen> the event (Unit - (Triggering unit) Takes damage)


+rep if u can help me solve this :)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, are you tested this on pre-placed units ? :eek:
Since it wil only trigger if you first create the unit in-game ;)
 

Leazy

You can change this now in User CP.
Reaction score
50
Yeah, forgot to mention that, I made the units in-game. :)
 

HydraRancher

Truth begins in lies
Reaction score
197
Trigger:
  • (Unit-type of (Triggering unit)) Equal to Warp Spirit (Level 1)


Are you trying to detect the attacker or attacked unit?



Try from 100 to 300, I think thats one of the problems.

Why do you do a loop? You never use (Integer A).
 

Leazy

You can change this now in User CP.
Reaction score
50
I use a loop because if 300 units from the caster isn't rock terrain, then it checks if 299 units from the caster is and so on, if 100 units from the caster isn't rock either, then it doesn't blink.
 

HydraRancher

Truth begins in lies
Reaction score
197
Oh sorry I dint see the (Integer A). But I stil think the 300 to 100 is erroring. The description says: Assumes the first number is smaller or something. Try do 100 - 300 and instead of (Integer A) do 400 - (Integer A).
 
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