• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Charge Spell?

Status
Not open for further replies.
Level 4
Joined
Jun 4, 2009
Messages
70
I've tried make a spell when the units speed increases (to max over 2 seconds) and then instantly move to target, deal damage and then grip it, like a kind of net or a stun for 4 seconds. Anyone have any idea to do this?
 
I thought max move speed was 400.

  • Cast
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Charge
  • Actions
    • Set Target = Target of ability being cast
    • Set Unit = Casting unit
    • Set Accelrate = ((400 - (Current movement speed of (Unit))/20)
    • Trigger - Turn On Accel <gen>

  • Accel
  • Events
    • Time - Every 0.01 seconds of game time
  • Conditions
  • Actions
    • Set Temploc = (Position of (Target))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Movement speed of (Unit)) Greater Than or Equal to 400
      • Then - Actions
        • Move Unit Instantly to Temploc
        • Trigger - Turn Off (This Trigger)
      • Else - Actions
        • Unit - Set Unit movement speed to ((Current movement speed of (Unit) + Accelrate)
    • call RemoveLocation(udg_temploc)
This should work, if you want to be sure it stops at 2 seconds then use an integer variable and add (1/10) each second.
 
You should at least attempt to make this, otherwise, the next time you need a spell similar or possibly unrelated, you will just end back up here. Its a good learning experience, even if you get it wrong the first time. =)
 
i did set real but was nothing like that in here, just current or default + i cant find the move unit instantly trigger and custom script trigger he uses =S
 
Alright. For damage/stun, you should use
  • Unit - Cause Unit to damage Target, dealing 200.00 damage of attack type Hero and damage type Normal
You cant just add a buff or effect, so you'll need to create a dummy unit with a stun spell and order him to cast it. If you want this to look like an attack, before the damage add in
  • Animation - Play Unit's attack Animation
Edit: Unit move instantly will be under Unit - ... When you select 'Add action' use the top drop down box to search for text. For custom script, there is an action called 'Custom Script'. You need to type in the script i used to remove the temp location.
 
Not what i asked for, i need help to find all that stuff i asked about, not a clue.... + i know the thing and how to make dummy, and well, how do i make unit move forward the target unit?
 
Status
Not open for further replies.
Back
Top