• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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?
 
Level 6
Joined
Jul 24, 2008
Messages
180
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.
 
Level 6
Joined
Jul 24, 2008
Messages
180
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. =)
 
Level 4
Joined
Jun 4, 2009
Messages
70
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
 
Level 6
Joined
Jul 24, 2008
Messages
180
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.
 
Level 4
Joined
Jun 4, 2009
Messages
70
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.
Top