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

JASS Jump spell request

Status
Not open for further replies.
Level 8
Joined
Jul 25, 2009
Messages
194
Hi I'm looking for a jump spell that allows the unit to cast spells and attack while in mid air but cannot change direction or distance so he cant change the target point of the jump.

Can anyone make the spell? I heard its only possible in jass so i cant make it
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
The mechanics of your spell is a contradiction, why ?
Okay, here it is,

When we are doing "charge-like" spell or "move-to-target-position" kind of spell, not instant spell, but moving the unit to that location, we need either this action;
  • Unit - Move Caster instantly to TempLoc2
Or this function;
call SetUnitX(udg_Caster, GetLocationX(udg_TempLoc2))
call SetUnitY(udg_Caster, GetLocationY(udg_TempLoc2))

When we want to move unit and can receive orders at a time, we use the second method, the SetUnitX/Y, because that function does not interrupt orders, compared to MoveUnit function, you can't do anything at all (can't receive any other orders)

So next, you want that unit to move + receive orders + can't change direction.
Since we have accomplished the move + receive orders, we only need to do something about "can't change direction".

Now, if you want unit that won't be able to change their direction while moving, you're gonna have to issue a 'Stop' order to that unit per interval;
  • Untitled Trigger 004
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit - Order Caster to Stop
This way, that unit won't be able to change directions no matter how fast you order it to Move.

Since you have issued that unit a 'Stop' order, how do you expect that unit to receive an order to cast spell or attack ?
And if you removed the 'Stop' order method, Player can order that unit to move to any directions he want while during the spell and can cause the unit to end up at different location.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Yeah I think I've got the solution.
Just set the unit's movement speed to 0 in Trigger Editor but first, go to Gameplay Constants > Tick the box "Use Custom Gameplay Constants" > Change the "Movement - Unit Speed - Minimum" to 0.

This way, the unit won't be able to move at all (meaning it can't be ordered to move to change direction), but still can attack/cast spell.
 
Status
Not open for further replies.
Top