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

Jumping ability help

Status
Not open for further replies.
Level 8
Joined
Sep 15, 2006
Messages
426
I need to know how to make an ability that allows a unit to physically jump (not blink-the actual unit moves up in the air and back down again). I have already tried to do it using storm crow form as a base and a trigger(although I have no idea if I did it right). Any ideas? This is the trigger I tried to use.

  • Jump
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Jump
    • Actions
      • Animation - Change (Triggering unit) flying height to 300.00 at 0.25
      • Wait 0.50 seconds
      • Animation - Change (Triggering unit) flying height to 0.00 at 0.25
 
Level 3
Joined
May 28, 2005
Messages
47
Well. first of all the unit must be a flying unit to go into the air OR have the storm crow ability (which is what I reccomend)
It seems you have some rudimentary knowledge of WE so here is the trigger that you need:

  • Jump
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Jump
    • Actions
      • Set Jumper = (Casting unit)
      • Unit - Pause Jumper
      • Unit - Turn collision for Jumper Off
      • Unit - Add Crow Form to Jumper
      • Animation - Change Leap flying height to 850 at 950
      • Wait 0.50 seconds
      • Animation - Change Leap flying height to 0.00 at 900
      • Wait 0.20 seconds
      • Unit - Remove Crow Form from Jumper
      • Unit - Unpause Jumper
      • Unit - Turn collision for Jumper On
That is a jump with nothing fancy- there are things you can add to make the Jumper move forward.
 
Level 8
Joined
Sep 15, 2006
Messages
426
Thanks. That works really well. Just a couple questions: why do I have to pause the unit, and what does rate mean in change flying height?
I have a new problem now, though. I need a unit to play its walk animation as long as a key is pressed. Any ideas there? This is what I tried.
  • Animations
    • Events
      • Time - Every 0.80 seconds of game time
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • arrow_leftPressed[1] Equal to True
          • arrow_rightPressed[1] Equal to True
    • Actions
      • Animation - Play player1_unit's walk animation
 
Level 3
Joined
May 28, 2005
Messages
47
Thanks. That works really well. Just a couple questions: why do I have to pause the unit, and what does rate mean in change flying height?
I have a new problem now, though. I need a unit to play its walk animation as long as a key is pressed. Any ideas there? This is what I tried.
  • Animations
    • Events
      • Time - Every 0.80 seconds of game time
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • arrow_leftPressed[1] Equal to True
          • arrow_rightPressed[1] Equal to True
    • Actions
      • Animation - Play player1_unit's walk animation

The problem with this is you have it running every 0.80 seconds. What you want is this 3 part trigger. I'm sure there is an easier/shorter way but I can't really think of one right now lol.

  • Red Left Pushed
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
    • Conditions
    • Actions
      • Set Left_On = True
      • Trigger - Run Untitled Trigger 001 <gen> (checking conditions)
Part 2:
  • Walk Animation
    • Events
    • Conditions
      • Left_On Equal to True
    • Actions
      • Animation - Queue (Random unit from (Units currently selected by Player 1 (Red)))'s walk animation
Part 3:
  • Red Left Released
    • Events
      • Player - Player 1 (Red) Releases the Left Arrow key
    • Conditions
    • Actions
      • Set Left_On = False
Then you just have to make one of these for every player that you will use this on...
 
Level 8
Joined
Sep 15, 2006
Messages
426
I already have triggers in use that detect wether the arrow keys are pressed. Would it be possible for me to just use them instead of making new ones, or is this one of those really weird quirks of WE?
 
Level 8
Joined
Sep 15, 2006
Messages
426
I have another question if anybody cares to answer: I have a unit that uses triggers to cause dagage, and because I need it to damage an area, it sometimes damages itsself. I can't figure put how to make it not damage itsself, and it's playing hell with my map right now. Any ideas?
 
Level 8
Joined
Sep 15, 2006
Messages
426
Yes, normally that would work, but the reason I am using these triggers is to basically make the unit's attacks completely controlled by the player, and because of other special circumstances in my map, I need the unit to only damage other units.
 
Level 4
Joined
Jul 20, 2005
Messages
107
I remembered in wc3sear.ch got a skill which let you jump. and the best part is... HE DIDNT USES ANY TRIGGER OR JASS!!!

He uses the storm earth and fire to do that jumping skill
 
Level 8
Joined
Sep 15, 2006
Messages
426
I don't think that would work, conan, because it would be too easy to just make yourself invincable by continually using the spell that triggers the damage (it has no cooldown). I need to make it so the unit can't recieve the damage that it is giving. Is there any trigger that says something like

Event: A unit takes damage
Condidtion: damage source=(same unit)
Action: Set unit's life to (unit's life+damage amount)

Would something like that work anyway?
 
Level 17
Joined
Jan 21, 2007
Messages
2,014
I have another question if anybody cares to answer: I have a unit that uses triggers to cause dagage, and because I need it to damage an area, it sometimes damages itsself. I can't figure put how to make it not damage itsself, and it's playing hell with my map right now. Any ideas?

Maybe u can use something like:
If all conditions is true then do action.
Use a variable for the caster/attackers and then (variable) equal to true.
and actions will be do nothing or something like that? i dunno if it will work but its worth testing :grin:
 
Level 4
Joined
Feb 23, 2007
Messages
82
I have another question if anybody cares to answer: I have a unit that uses triggers to cause dagage, and because I need it to damage an area, it sometimes damages itsself. I can't figure put how to make it not damage itsself, and it's playing hell with my map right now. Any ideas?
You should add matching
Code:
(Picked Unit - the ones damaged (is equal to an enemy of (Owner of (Casting Unit)))
 
Status
Not open for further replies.
Top