• 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.

[Trigger] Blink Strike Spell Problems

Status
Not open for further replies.
Level 10
Joined
Sep 30, 2005
Messages
56
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Pain Lash
Actions
Unit - Pause (Target unit of ability being cast)
Unit - Move (Casting unit) instantly to ((Position of (Target unit of ability being cast)) offset by (2.00, 2.00))
Unit - Order (Casting unit) to Attack (Target unit of ability being cast)
Animation - Play (Casting unit)'s (Attack + Slam) animation
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 9999.00 damage of attack type Hero and damage type Normal
Special Effect - Destroy (Last created special effect)
Wait 2.00 seconds
Unit - Unpause (Target unit of ability being cast)

Alright so I'm trying to make a blink-strike sort of ability from scratch, and i cannot for the life of me figure out what on earth I'm doing wrong


----------------------------------------------------------------------------------------

So basically my problem is that after i get the unit to move (instantly) to the target, all actions under that simply fail to happen - the caster isn't ordered to attack the target, the special effects don't happened, and the damage isn't dealt.

Note: the ability Pain Lash, which is based on Storm Bolt, doesn't seem to even get used when the hero blinks - no mana is taken and it does not go into cooldown.

PS: If someone could tell me how to add trigger tags to make my posted junk look like whats in the world editor, that would be a big help as well=P
 
So this is your trigger:
  • Events
  • Unit - A unit Begins casting an ability
  • Conditions
  • (Ability being cast) Equal to Pain Lash
  • Actions
  • Unit - Pause (Target unit of ability being cast)
  • Unit - Move (Casting unit) instantly to ((Position of (Target unit of ability being cast)) offset by (2.00, 2.00))
  • Unit - Order (Casting unit) to Attack (Target unit of ability being cast)
  • Animation - Play (Casting unit)'s (Attack + Slam) animation
  • Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
  • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 9999.00 damage of attack type Hero and damage type Normal
  • Special Effect - Destroy (Last created special effect)
  • Unit - Unpause (Target unit of ability being cast)
This leaks hard...

Ok, first base the spell on chain lightning or something that hasn't any secondary effects(stunn/slow..) and then do this:

  • Events
  • Unit - A unit starts effect of an ability
  • Conditions
  • (Ability being cast) Equal to Pain Lash
  • Actions
  • Set Loc = Position of (Target unit of ability being cast)
  • Unit - Pause (Triggering unit)
  • Unit - Move (Triggering unit) instantly to (Loc) facing default...
  • Unit - Unpause (Triggering unit)
  • Unit - Order (Triggering unit) to Attack once (Target unit of ability being cast)
  • Animation - Play (Triggering unit)'s (attack, slam) animation
  • Special Effect - Create a special effect at (Loc) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
  • Special Effect - Destroy (Last created special effect)
  • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 9999.00 damage of attack type Hero and damage type Normal
  • Custom Script - call RemoveLocation(udg_Loc)
This will move the caster and cause it do damage target for 9999 + damage of caster.

I don't see the point of using wait 2 second here.... just maybe you want to stunn the target? if so left the base spell as it is (Storm bolt) remove special effect and change missile speed to 2000 or something ;D
 
Level 13
Joined
Sep 14, 2008
Messages
1,408
Mh I once heard that "moving instantly" resets cooldowns?

The problem with the special effect is in my opinion that the trigger runs that fast (as every trigger does) that you don't see the effect. Try to add a 1 sec wait in between.

And I assume, that the animation stops the order (and again through the enormous speed the unit has no time to attack)
Again try to add a 1 sec wait.
 
Level 6
Joined
Jul 25, 2005
Messages
221
To clear any confusion around the whole "move resets cooldown", it is in fact wrong. The only reason why it seems like it resets is because the unit never actually finishes casting because it is moved before it is done, which is why you should use "Finishes casting an ability" rather than "Starts the effect of an ability", the effect is applied before the spell is finished. However, you can work around this if you write it in JASS, where you have direct access to unit positioning.

And if you want to "stun" the unit, do it by yourself by making a TIMER, because wait functions should NEVER be used in a spell script...(except at map initialization) Just pause the unit and give it the stun special effect and then remove it afterwards.

And lastly, when you create a custom spell, use the one blizzard prepared for you: "Channel" looks like Death Pact, it allows you to change the attributes of a spell. Just press CTRL+F and look up Channel, copy and then change it to what suits your needs.

Here's a proper version without any pausing when attacked (which really ruins the effectiveness of the spell):

  • Pain Lash
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Pain Lash
    • Actions
      • -------- Initialize variables --------
      • Set damage = 75.00
      • Set offset = 30.00
      • Set stun_duration = 2.00
      • Set where = ((Facing of target) + 180.00)
      • Set caster = (Triggering unit)
      • Set target = (Target unit of ability being cast)
      • Set target_loc = ((Position of target) offset by offset towards where degrees)
      • -------- Move the hero, queue animations and give it some effects --------
      • Unit - Move caster instantly to target_loc, facing (Position of target)
      • Custom script: call RemoveLocation(udg_target_loc)
      • Unit - Cause caster to damage target, dealing damage damage of attack type Spells and damage type Normal
      • Animation - Queue caster's attack animation
      • Special Effect - Create a special effect attached to the chest of target using Objects\Spawnmodels\Orc\Orcblood\BattrollBlood.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Stun --------
      • Countdown Timer - Start stun_timer as a One-shot timer that will expire in stun_duration seconds
      • Unit - Pause target
      • Special Effect - Create a special effect attached to the overhead of target using Abilities\Spells\Human\StormBolt\StormBoltTarget.mdl
      • Set stun_effect = (Last created special effect)
  • Stun Effect Ends
    • Events
      • Time - stun_timer expires
    • Conditions
    • Actions
      • Unit - Unpause target
      • Special Effect - Destroy stun_effect
Note that this is not MUI. To make it MUI I suggest using arrays to be passed between the timer and the main function.
 
Last edited:
Status
Not open for further replies.
Top