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

jump spell doesnt work propley

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
Hey with help of few people i managed to make jump spell but it doesnt always work propley so i need litle help how to fix it. i have also attachted the test map with the spell. The problem is that sometimes when unit is flying over the dooad he doesnt land near ground, hes supossed to land on ground whenever he touches some area that isnt walkable, unit must not get throught rock or tress



when i was testing this in game i set my hero like that and put casting point there as u can see, my hero doesnt land on ground hes stuck into air, but when i stand straight to the rock all works fine, idk whats reason there, when players are playing in my map sometimes also they manage to go throught tress, i noticed that they also get stuck into the air then they click to mvoe or jump again and it allows them to get throught tress. any idea how to fix that? i have 2 issues hero is stuck sometimes in air and sometimes can go throught tress.


upload_2021-2-22_1-11-26.png












JASS:
function IsPointWalkable takes real x, real y returns boolean
    local real X
    local real Y
    local item I = CreateItem('sehr', x, y)
    set X = GetItemX(I)
    set Y = GetItemY(I)
    call RemoveItem(I)
    return X-x <= 0.5 and Y-y <= 0.5
endfunction



  • first
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Jump
    • Actions
      • Set VariableSet TempLoc = (Position of Gimli 0005 <gen>)
      • Set VariableSet targecikjumpa = (Target point of ability being cast)
      • Set VariableSet LeapDistance = (Distance between TempLoc and targecikjumpa)
      • Custom script: if (IsPointWalkable(GetLocationX(udg_targecikjumpa),GetLocationY(udg_targecikjumpa))) then
      • Custom script: else
      • Unit - Order Gimli 0005 <gen> to Stop.
      • Game - Display to Player Group - Player 6 (Orange) the text: |cffffcc00This area...
      • Custom script: endif
      • Custom script: call RemoveLocation (udg_TempLoc)
      • Custom script: call RemoveLocation(udg_targecikjumpa)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • LeapDistance Less than 100.00
        • Then - Actions
          • Unit - Order Gimli 0005 <gen> to Stop.
          • Game - Display to Player Group - Player 6 (Orange) the text: |cffffcc00Target is...
        • Else - Actions

  • second
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Jump
    • Actions
      • Set VariableSet TempLoc = (Position of Gimli 0005 <gen>)
      • Set VariableSet targecikjumpa = (Target point of ability being cast)
      • Set VariableSet LeapDistance = (Distance between TempLoc and targecikjumpa)
      • Set VariableSet skok = (TempLoc offset by 20.00 towards LeapDistance degrees.)
      • Custom script: call RemoveLocation (udg_TempLoc)
      • Unit - Turn collision for Gimli 0005 <gen> Off.
      • Unit - Add Crow Form to Gimli 0005 <gen>
      • Unit - Remove Crow Form from Gimli 0005 <gen>
      • Animation - Change Gimli 0005 <gen> flying height to 130.00 at 400.00
      • Trigger - Turn on third <gen>


  • third
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set VariableSet TempLoc = (Position of Gimli 0005 <gen>)
      • Set VariableSet LeapDistance = (Distance between TempLoc and targecikjumpa)
      • Set VariableSet skok = (TempLoc offset by 20.00 towards (Angle from TempLoc to targecikjumpa) degrees.)
      • Custom script: if (IsPointWalkable(GetLocationX(udg_skok),GetLocationY(udg_skok))) then
      • Unit - Move Gimli 0005 <gen> instantly to skok
      • Set VariableSet newLoc = (Position of Gimli 0005 <gen>)
      • Custom script: endif
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • LeapDistance Less than or equal to 15.00
              • (Distance between newLoc and TempLoc) Less than 15.00
        • Then - Actions
          • Set VariableSet skok = targecikjumpa
          • Trigger - Turn off (This trigger)
          • Custom script: call RemoveLocation(udg_targecikjumpa)
          • Custom script: call RemoveLocation(udg_newLoc)
          • Custom script: call RemoveLocation (udg_skok)
          • Animation - Change Gimli 0005 <gen> flying height to 0.00 at 400.00
          • Unit - Turn collision for Gimli 0005 <gen> On.
          • Unit - Create 1 Dummy for Player 6 (Orange) at TempLoc facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add gimlia dummy to (Last created unit)
          • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
          • Custom script: call RemoveLocation (udg_TempLoc)
          • Special Effect - Destroy (Last created special effect)
          • Unit - Set level of gimlia dummy for (Last created unit) to (Level of Jump for Gimli 0005 <gen>)
          • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp.
          • Set VariableSet gimliuk = (Position of Gimli 0005 <gen>)
          • Set VariableSet gimliknock = (Units within 230.00 of gimliuk matching (((Matching unit) has buff Knockbacked (Pause) gimljusz) Equal to True).)
          • Unit Group - Pick every unit in gimliknock and do (Actions)
            • Loop - Actions
              • Custom script: if IsUnitType(GetEnumUnit(),UNIT_TYPE_GIANT) then
              • Unit Group - Remove (Picked unit) from gimliknock.
              • Custom script: endif
          • Unit Group - Pick every unit in gimliknock and do (Actions)
            • Loop - Actions
              • Unit - Turn collision for (Picked unit) Off.
              • Unit - Add Crow Form to (Picked unit)
              • Unit - Remove Crow Form from (Picked unit)
              • Animation - Change (Picked unit) flying height to (Random real number between 150.00 and 190.00) at 400.00
          • Set VariableSet knockbackCounter = 0
          • Trigger - Turn on fourth <gen>
        • Else - Actions
      • Custom script: call RemoveLocation (udg_TempLoc)
 

Attachments

  • BrokenJumpMap.w3m
    23.2 KB · Views: 23
Level 14
Joined
Jun 15, 2016
Messages
749
Few things:
- Ya uses pre-placed hero as caster. This spell will not work once the hero dies and it is only for 1 player, not to mention that one can only cast one instance at one time. (not MUI, MPI)
- No need to use many pick unit in groups with periodic triggers or buff checks.

I suggest ya using this jump system, in GUI: Jump System [Paladon] with minimum requirements and settings. Save yourself some time.

Or this similar spell: Shadow Leap v1.0.0.3

Or even learn more from these: Search Results for Query: jump | HIVE

:ugly:
 
Level 11
Joined
Jul 17, 2013
Messages
544
Few things:
- Ya uses pre-placed hero as caster. This spell will not work once the hero dies and it is only for 1 player, not to mention that one can only cast one instance at one time. (not MUI, MPI)
- No need to use many pick unit in groups with periodic triggers or buff checks.

I suggest ya using this jump system, in GUI: Jump System [Paladon] with minimum requirements and settings. Save yourself some time.

Or this similar spell: Shadow Leap v1.0.0.3

Or even learn more from these: Search Results for Query: jump | HIVE

:ugly:



i alreday checked all the jumps from hive workshop and there is no good one thats why i made my own one but its not perfect also. the jumps from hive workshop dont check for pathning or even if they do hero can still jump in area without tress. i dont have to worry my skill isnt mui because my map is rpg and anyway only 1 hero has it and more units wont surley have it because its lord of the rings map.
 
Status
Not open for further replies.
Top