• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Triggered Teleport - No Cooldown.

Status
Not open for further replies.
Level 6
Joined
Jun 15, 2008
Messages
175
I have made my first spell, it's a teleport that knocks nearby units back. Moderators were not to fond of it due to wait... I know a wait is bad, it destroys the possibility of MUI, which I intend to add later.
The problem is, I've used Cluster Rockets as my standard ability, and I trigger a teleport to the target of ability being cast, but this does so the ability does not recieve its cooldown. What am I to do?
I could create an additional trigger with a perodic event and do a timer with variables, but that would probably be shot down due to lack of effiency.
Here's the trigger for you
  • WarpStart
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Warp
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Warp for (Casting unit)) Equal to 1
        • Then - Actions
          • Set KnockbackDamage = 2.50
          • Set KnockbackUnitGroup = (Units within 10.00 of (Position of KnockbackCaster) matching (((Matching unit) is alive) Equal to True))
          • Unit Group - Add all units of (Units within 140.00 of KnockbackPoint) to KnockbackUnitGroup
          • -------- BEWARE! The damage is per 0.05 seconds, so the damage is multiplied by 40, unless you change duration --------
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Warp for (Casting unit)) Equal to 2
            • Then - Actions
              • Set KnockbackUnitGroup = (Units within 20.00 of (Position of KnockbackCaster) matching (((Matching unit) is alive) Equal to True))
              • Unit Group - Add all units of (Units within 190.00 of KnockbackPoint) to KnockbackUnitGroup
              • -------- BEWARE! The damage is per 0.05 seconds, so the damage is multiplied by 40, unless you change duration --------
              • Set KnockbackDamage = 5.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Warp for (Casting unit)) Equal to 3
                • Then - Actions
                  • Set KnockbackUnitGroup = (Units within 30.00 of (Position of KnockbackCaster) matching (((Matching unit) is alive) Equal to True))
                  • Unit Group - Add all units of (Units within 240.00 of KnockbackPoint) to KnockbackUnitGroup
                  • -------- BEWARE! The damage is per 0.05 seconds, so the damage is multiplied by 40, unless you change duration --------
                  • Set KnockbackDamage = 7.50
                • Else - Actions
      • Set KnockbackDistance = 5.30
      • Set KnockbackDuration = 2.00
      • Set KnockbackPoint = (Target point of ability being cast)
      • Set KnockbackCaster = (Casting unit)
      • Set KnockbackUnitGroup = (Units within 400.00 of (Position of KnockbackCaster))
      • Unit Group - Add all units of (Units within 400.00 of KnockbackPoint) to KnockbackUnitGroup
      • Unit Group - Remove KnockbackCaster from KnockbackUnitGroup
      • Unit - Move KnockbackCaster instantly to (Target point of ability being cast)
      • Trigger - Turn on WarpLoop <gen>
      • Custom script: call RemoveLocation (udg_KnockbackPoint)
It then runs a loop trigger, and yep I know this spell lacks effiency as it is but that's the next thing I need to look into.

How can I get him to be moved instantly and still have a cooldown?
 
Level 4
Joined
Mar 23, 2008
Messages
87
Instead off all the if/then/else statements use:
  • Set KnockbackDamage = ( 2.50 * Level of Warp for (Casting unit) )
 
Last edited:
Level 6
Joined
Jun 15, 2008
Messages
175
Instead off all the if/then/else statements use:
  • Set KnockbackDamage = ( 2.50 * Level of Warp for (Casting unit) )

Yep I know ><, I was using this method to make it easier to define other stuff per level than just this one variable...

I still haven't figured out how to use the "channel" ability proper though ><, I've modified it but the hero does not have the spell when in-game, I can level it up but it does not show as an ability I can use, it's sort of hidden.
 
Level 4
Joined
Mar 23, 2008
Messages
87
You need to hook Visible under options in the object editor in order to get the channel button ingame
 
Status
Not open for further replies.
Top