• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Kinda Jump Ability

Status
Not open for further replies.
Level 5
Joined
Aug 12, 2007
Messages
132
I am trying to makke a jump-like ability but when the target is to close, the jumper ends waiting in midair, or if the target is too far ends running in midair. Is there a way I can make him, for example, when he reaches a certain height, land? I tried something but didn't really work...
 
I managed something, not usre if its good.
  • Jump
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Power Jump
    • Actions
      • Set JumpingMario = (Casting unit)
      • Set TargetedUnit = (Target unit of ability being cast)
      • Unit - Turn collision for JumpingMario Off
      • Sound - Play Mario_Jump <gen> at 100.00% volume, attached to JumpingMario
      • Unit - Add classification of A flying unit to JumpingMario
      • Unit - Set JumpingMario movement speed to 2000.00
      • Animation - Change JumpingMario flying height to 400.00 at 600.00
      • Unit - Order JumpingMario to Move To (Target point of ability being cast)
      • Unit - Create 1 Jump Dummy for Player 1 (Red) at (Position of TargetedUnit) facing (Position of (Triggering unit))
      • Set JumpDmg = (Last created unit)
      • Wait 0.35 seconds
      • Animation - Change JumpingMario flying height to (Current flying height of TargetedUnit) at 600.00
      • Wait 0.35 seconds
      • Unit - Turn collision for JumpingMario On
      • Unit - Set level of Jump Damage for JumpDmg to (Level of Power Jump for JumpingMario)
      • Unit - Order JumpDmg to Neutral - Firebolt TargetedUnit
      • Animation - Change JumpingMario flying height to ((Current flying height of TargetedUnit) + 100.00) at 600.00
      • Unit - Remove classification of Able to attack flying units from JumpingMario
      • Wait 0.10 seconds
      • Animation - Change JumpingMario flying height to 0.00 at 1200.00
      • Unit - Remove JumpDmg from the game
 
You should use a periodic trigger that updates every 0.03 seconds and in that trigger, update the position and height of the unit.

  • Jump
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Jump
    • Actions
      • * You do stuff here *
        • Unit Group - Add (Triggering Unit) to Jump_Group
        • Trigger - Turn on Jump Loop <gen>
  • Jump Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Jump_Group and do (Actions)
        • Loop - Actions
          • * Do stuff here *
Download some GUI spells to get the idea. Have a look at
https://www.hiveworkshop.com/forums/spells-569/jump-system-paladon-116556/

and read this:
https://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Status
Not open for further replies.
Back
Top