• 🏆 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!

Jump Tutorial

Level 8
Joined
Jun 30, 2010
Messages
259
This tutorial will show you how to create a Jump ability. This is a spell that creates an effect which makes the unit casting the ability "fly" to the targeted point. This spell is good in RPGs and other maps, it can be used in particulary any map.

Requirements:
-Warcraft III World Editor
-Basic and some advanced triggering skills
-Knowledge about the Object Editor

First, create an ability named "Jump" with the same properties as shown:
JumpTutorialAbility.jpg
For the jumping unit, I will use a Paladin, you may use any unit you want, but make sure you add the jump ability to the unit:
JumpTutorialUnit.jpg
Now you have created an ability, but at this state, it does nothing, so let's start by making all the variables we need:
JumpTutorialVariables.jpg
Now, let's make the triggers needed for the ability to do anything, first, we need to make a trigger which activates when our unit uses the jump ability

  • Jump
  • Events
    • Unit - Paladin 0000 <gen> starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Jump
      • (Triggering unit) Equal to Paladin 0000 <gen>
    • Actions
      • Set JumpPoint1 = (Position of Paladin 0000 <gen>)
      • Set JumpPoint2 = (Target point of ability being cast)
      • Set JumpDirection = (Angle from JumpPoint1 to JumpPoint2)
      • Set JumpSpeed = ((Distance between JumpPoint1 to JumpPoint2) / 200.00)
      • Set JumpDown = (Distance between JumpPoint1 to JumpPoint2)
      • Unit - Add Storm Crow Form to Paladin 0000 <gen>
      • Unit - Remove Storm Crow Form to Paladin 0000 <gen>
      • Animation - Change Paladin 0000 <gen> flying height to ((Distance between JumpPoint1 and JumpPoint2) / 3.00) at ((Distance between JumpPoint1 and JumpPoint2) / 3.00)
      • Trigger - Turn on Jump Move <gen>
      • Unit - Turn collision for Paladin 0000 <gen> off
      • Unit - Make Paladin 0000 <gen> Invulnerable
      • Countdown Timer - Start JumpTimer[1] as a One-shot timer that will expire in 2.00 seconds
      • Countdown Timer - Start JumpTimer[2] as a One-shot timer that will expire in 1.00 seconds
      • Custom script: call RemoveLocation ( udg_JumpPoint1 )
      • Custom script: call RemoveLocation ( udg_JumpPoint2 )
Now create a new trigger, this one will be used to move the unit.

  • Jump Move
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set JumpPoint1 = Position of Paladin 0000 <gen>
      • Set JumpPoint2 = (JumpPoint1 offset by JumpSpeed towards JumpDirection degrees)
      • Unit - Move Paladin 0000 <gen> instantly to JumpPoint2
      • Custom script: call RemoveLocation ( udg_JumpPoint1 )
      • Custom script: call RemoveLocation ( udg_JumpPoint2 )
Make sure you right click the trigger and disable the initialization of the trigger, this way, the unit won't start jumping on map launch. Another important thing is the Custom Scripts, which will fix the leaks. Look at the first trigger. We made 2 countdown timers at the end of the trigger queue, the first timer is used to tell when our unit shall stop jumping. Also, create another variable of type "special effect" array. Call this "JumpEffect"

  • Jump Stop
    • Events
      • Time - JumpTimer[1] expires
    • Conditions
    • Actions
      • Special Effect - Create a special effect at (position of Paladin 0000 <gen> using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Set JumpEffect[1] = (Last created special effect)
      • Unit - Cause Paladin 0000 <gen> to damage circular area after 0.00 seconds of radius 150.00 at (position of Paladin 0000 <gen>), dealing 50 damage of attack type Chaos and damage type Normal
      • Trigger - Turn off Jump Move
      • Unit - Turn collision for Paladin 0000 <gen> On
      • Unit - Make Paladin 0000 <gen> Vulnerable
      • Wait 0.25 seconds
      • Special Effect - Destroy JumpEffect[1]
Now for the seconds timer, which is used to change the flying height of the jumping unit to while it is in middle-air at the middle of the jump

  • Jump Down
    • Events
      • Time - JumpTimer[2] expires
    • Conditions
    • Actions
      • Animation - Change Paladin 0000 <gen> flying height to 0.00 at (JumpDown / 3.00)
Here's the map I made, in case you need to look at the triggers some more:
View attachment Jump Tutorial.w3x
Thats it! Hope you enjoy my tutorial!
 
Last edited:
Level 17
Joined
Jun 17, 2007
Messages
1,433
The spell isn't MUI, and it leaks pretty badly. Secondly, you can just add and remove crow form instantly, you don't have to wait until the spell is over. In your conditions, use triggering unit rather than casting unit. Your jump's motion is also not a parabola, and looks terrible.
Now there is just one more thing, we have not turned off the Jump Move trigger untill the unit stops jumping, this means the jumping unit will start jumping at game startup, therefore, turn it off at map initialization
You can have the trigger initially off by right clicking it and removing the check from 'Initially on'.
 
Another tutorial with bad form!

That means something like:
Introduction: Say why we need this tut, what we can learn etc etc!
Requirements: What programs or skills we need to use this one!
Main part of tut (well you have only this one :p)
Few more words about whole tut, some more links etc etc!

Please read: Rules
and How to properly format a tutorial - Please read before posting!

About tutorial:

Nothing to say just look at this: Click

I Vote for Rejection
 
Level 8
Joined
Jun 30, 2010
Messages
259
Added requirements and "why you need this spell" part. I dont know what kind of links you are talking about thought. Links to the spell page here on THW? That spell you linked don't have anything with my tutorial to do, I made this tutorial because there was only one slightly bad jump tutorial on thw.
 
Level 8
Joined
Jun 30, 2010
Messages
259
I can see what you mean, however, that is more advanced triggering and is a SPELL, not a tutorial, my tutorial is meant to be more basic for people who want to do it themself and to understand what they are doing, instead of just editing variables and writing credits to the one that made the spell.
 
Top