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

Knock&Jump System V1.02

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This System supports fully MUI knock back and jump.

Features:
realistic flying curve for jump,
collision detection for the knockback,
flexible manipulation of the jumps and knockbacks.

~redscores

if a tutorial is necessary I will write one.

Tell me bugs or problems.

UPDATE 1.01{You can't jump out of the map now)
UPDATE 1.02{If you target now your current location with jump, you wont jump in a arch, you will just stomp at your current location + fixed Collision Bug and added a bit collision}


Keywords:
System, Knockback, Jump, MUI
Contents

Knock&Jump System (Map)

Reviews
08:09, 28th Oct 2015 This resource has been Rejected by BPower. Criticism: I can't see a development of the thread since 2009. Please re-submit it, if you wish to work again on the flaws of your system. 7 Sep 2011 Bribe: The game message...

Moderator

M

Moderator

08:09, 28th Oct 2015

This resource has been Rejected by BPower.

Criticism:
I can't see a development of the thread since 2009. Please re-submit it, if you
wish to work again on the flaws of your system.

7 Sep 2011
Bribe: The game message leaks a player group (for the game message) in the periodic trigger, this is also very inefficient and should be using a better indexing approach.
 
Level 21
Joined
Aug 9, 2006
Messages
2,384
Well, if I would prevent that directly it would look weird :O

The Unit would smash on the ground infront of the end of the map.

But oh well, I put that in.

It does not dynasti....

I checked that... it uses a correct parabol formula...


I even checked it ingame now... it works correctly, you got something with your eyes.
 
Level 21
Joined
Aug 9, 2006
Messages
2,384
not really, the knock back uses following system:

StartSpeed - SpeedDecrease every 0.03 seconds till the speed is 0.

It is a different way of knockback.

So it is not a question of right and wrong...

and no dynasti, your imagination is not the only fact, and with my parabola function you cannot set the angle....


Simply respect the way I made.
 
Level 21
Joined
Aug 9, 2006
Messages
2,384
Dynasti, of course you can access to the distance of jump, you need to set the target location variable to the target point, the unit will directly jump to the target point, additionally you can manipulate the max height reached while the jump.

Thats by far enough for a valid jump, if you cannot work with such stuff... then I am sorry for you.

And the knockback is the most valid way of knocking back (look at rising_dusks knockback system, he uses the same way of knocking back).

And I will add a documentation if you need 1, i will describe everything, then you will understand the way of my knockback.


And I will test that bug paladon.

EDIT: It is not a bug, it is thought like that, it would really be shitty if you would simply jump up and come down....

And it is a problem with the function of jump, the jump will cancel if the distance between the target point and the position of the caster is smaller as the speed of the jump*0.03.

I hope that explained everything...
 
Level 21
Joined
Aug 9, 2006
Messages
2,384
well.. I may implement that, but the problem is to get the correct time of the animation.

The problem is following, if I give you a possibility for a animation, I would need to give you an possibility to select the exact time when the animation should be paused and that would require a wait, which would make MUIness impossible... if someone knows a solution for that problem I will implement it that way.
 
Level 9
Joined
Oct 7, 2008
Messages
299
I have a little problem with the JKSystemCore JASS line.The line is a little bigger then the other ones.
JASS:
function Trig_JKSystemCore_Actions takes nothing returns nothing
    set udg_JKS_Integer[3]=1
    loop
        exitwhen udg_JKS_Integer[3] > udg_JKS_Integer[2]
        if ( Trig_JKSystemCore_Func001Func001C() ) then
            if ( Trig_JKSystemCore_Func001Func001Func001C() ) then
                set udg_JKS_temppoint[1]=GetUnitLoc(udg_JKS_J_Jumper2[udg_JKS_Integer[3]])
                if ( Trig_JKSystemCore_Func001Func001Func001Func003C() ) then
                    set udg_JKS_J_distancetravelled[udg_JKS_Integer[3]]=( udg_JKS_J_distancetravelled[udg_JKS_Integer[3]] + udg_JKS_J_JumpSpeed2[udg_JKS_Integer[3]] )
                    "HERE IS THE PROBLEM"set udg_JKS_J_heightchange = ParabolaZ(udg_JKS_J_MaxHeightReached2[udg_JKS_Integer[3]] , udg_JKS_J_distance[udg_JKS_Integer[3]] , udg_JKS_J_distancetravelled[udg_JKS_Integer[3]])[/B]
                    set udg_JKS_temppoint[2]=PolarProjectionBJ(udg_JKS_temppoint[1] , udg_JKS_J_JumpSpeed2[udg_JKS_Integer[3]] , AngleBetweenPoints(udg_JKS_temppoint[1] , udg_JKS_J_TargetPoint2[udg_JKS_Integer[3]]))
                    if ( Trig_JKSystemCore_Func001Func001Func001Func003Func017C() ) then
                        set udg_JKS_terrainZ = GetLocationZ(udg_JKS_temppoint[2])
                        call SetUnitFlyHeightBJ(udg_JKS_J_Jumper2[udg_JKS_Integer[3]] , ( udg_JKS_J_heightchange - udg_JKS_terrainZ ) , 0.00)
                    else
                        call SetUnitFlyHeightBJ(udg_JKS_J_Jumper2[udg_JKS_Integer[3]] , udg_JKS_J_heightchange , 0.00)
                    endif
                    call SetUnitPositionLoc(udg_JKS_J_Jumper2[udg_JKS_Integer[3]] , udg_JKS_temppoint[2])
                    call RemoveLocation(udg_JKS_temppoint[2])
                else
                    if ( Trig_JKSystemCore_Func001Func001Func001Func003Func001C() ) then
                        call DisplayTextToForce(GetPlayersMatching(Condition(function Trig_JKSystemCore_Func001Func001Func001Func003Func001Func001001001)) , "TRIGSTR_034")
                    else
                    endif
                    call SetUnitFlyHeightBJ(udg_JKS_J_Jumper2[udg_JKS_Integer[3]] , GetUnitDefaultFlyHeight(udg_JKS_J_Jumper2[udg_JKS_Integer[3]]) , 0.00)
                    set udg_JKS_J_distancetravelled[udg_JKS_Integer[3]]=0.00
                    call DestroyEffectBJ(udg_JKS_J_AttachSfx1[udg_JKS_Integer[3]])
                    call DestroyEffectBJ(udg_JKS_J_AttachSfx2[udg_JKS_Integer[3]])
                    call SetUnitPathing(udg_JKS_J_Jumper2[udg_JKS_Integer[3]] , true)
                    call SetUnitInvulnerable(udg_JKS_J_Jumper2[udg_JKS_Integer[3]] , false)
                    if ( Trig_JKSystemCore_Func001Func001Func001Func003Func008C() ) then
                        set udg_JKS_temppoint[4]=GetUnitLoc(udg_JKS_J_Jumper2[udg_JKS_Integer[3]])
                        set udg_JKS_tempgroup[1]=GetUnitsInRangeOfLocMatching(udg_JKS_J_DamageRadius2[udg_JKS_Integer[3]] , udg_JKS_temppoint[4] , Condition(function Trig_JKSystemCore_Func001Func001Func001Func003Func008Func002002003))
                        call ForGroupBJ(udg_JKS_tempgroup[1] , function Trig_JKSystemCore_Func001Func001Func001Func003Func008Func003A)
                        call RemoveLocation(udg_JKS_temppoint[4])
                        call DestroyGroup(udg_JKS_tempgroup[1])
                    else
                    endif
                    call AddSpecialEffectTargetUnitBJ(udg_JKS_J_AttachPointEndString2[udg_JKS_Integer[3]] , udg_JKS_J_Jumper2[udg_JKS_Integer[3]] , udg_JKS_J_EndSfxString2[udg_JKS_Integer[3]])
                    call DestroyEffectBJ(GetLastCreatedEffectBJ())
                    set udg_JKS_J_Jumper2[udg_JKS_Integer[3]]=null
                    set udg_JKS_Integer[1]=( udg_JKS_Integer[1] - 1 )
                    if ( Trig_JKSystemCore_Func001Func001Func001Func003Func013C() ) then
                        set udg_JKS_Integer[2]=0
                        call DisableTrigger(GetTriggeringTrigger())
                    else
                    endif
                endif
                call RemoveLocation(udg_JKS_temppoint[1])
            else
            endif
        else
            if ( Trig_JKSystemCore_Func001Func001Func002C() ) then
                if ( Trig_JKSystemCore_Func001Func001Func002Func001C() ) then
                    set udg_JKS_temppoint[1]=GetUnitLoc(udg_JKS_K_target2[udg_JKS_Integer[3]])
                    set udg_JKS_temppoint[2]=PolarProjectionBJ(udg_JKS_temppoint[1] , udg_JKS_K_startspeed2[udg_JKS_Integer[3]] , udg_JKS_K_angle2[udg_JKS_Integer[3]])
                    if ( Trig_JKSystemCore_Func001Func001Func002Func001Func004C() ) then
                        set udg_JKS_tempgroup[1]=GetUnitsInRangeOfLocMatching(udg_JKS_K_CollisionRadius2[udg_JKS_Integer[3]] , udg_JKS_temppoint[2] , Condition(function Trig_JKSystemCore_Func001Func001Func002Func001Func004Func001002003))
                        if ( Trig_JKSystemCore_Func001Func001Func002Func001Func004Func002C() ) then
                            set udg_JKS_K_startspeed2[udg_JKS_Integer[3]]=0.00
                            call ForGroupBJ(udg_JKS_tempgroup[1] , function Trig_JKSystemCore_Func001Func001Func002Func001Func004Func002Func002A)
                        else
                        endif
                        call DestroyGroup(udg_JKS_tempgroup[1])
                    else
                    endif
                    if ( Trig_JKSystemCore_Func001Func001Func002Func001Func005C() ) then
                        call EnumDestructablesInCircleBJ(udg_JKS_K_TreeKillRadius2[udg_JKS_Integer[3]] , udg_JKS_temppoint[2] , function Trig_JKSystemCore_Func001Func001Func002Func001Func005Func001A)
                    else
                    endif
                    if ( Trig_JKSystemCore_Func001Func001Func002Func001Func006C() ) then
                        call AddSpecialEffectLocBJ(udg_JKS_temppoint[1] , udg_JKS_K_TrailSfxString2[udg_JKS_Integer[3]])
                        call DestroyEffectBJ(GetLastCreatedEffectBJ())
                        call SetUnitPositionLoc(udg_JKS_K_target2[udg_JKS_Integer[3]] , udg_JKS_temppoint[2])
                        set udg_JKS_K_startspeed2[udg_JKS_Integer[3]]=( udg_JKS_K_startspeed2[udg_JKS_Integer[3]] - udg_JKS_K_speeddecrease2[udg_JKS_Integer[3]] )
                    else
                        set udg_JKS_K_startspeed2[udg_JKS_Integer[3]]=0.00
                    endif
                    call RemoveLocation(udg_JKS_temppoint[2])
                    call RemoveLocation(udg_JKS_temppoint[1])
                else
                    call SetUnitPathing(udg_JKS_K_target2[udg_JKS_Integer[3]] , true)
                    set udg_JKS_K_target2[udg_JKS_Integer[3]]=null
                    set udg_JKS_Integer[1]=( udg_JKS_Integer[1] - 1 )
                    if ( Trig_JKSystemCore_Func001Func001Func002Func001Func011C() ) then
                        set udg_JKS_Integer[2]=0
                        call DisableTrigger(GetTriggeringTrigger())
                    else
                    endif
                endif
            else
            endif
        endif
        set udg_JKS_Integer[3]=udg_JKS_Integer[3] + 1
    endloop
endfunction

the NEWGEN jasshelper gives 2 errormessages:
1. Undecleared function ParabolaZ
2. Cannot convert null to real

Am I just an idiot or is it a kind of other JASS/GUI?! I can't work with jass and only one single line is a problem for me :hohum:
I've tested the map... the system is great for me and I need it for a map. I've already rated this system.
 
Level 3
Joined
Jan 23, 2008
Messages
37
Don't know what i'm doing wrong but i can't use the spell in my map, cause i have a problem with one line in JKSystemCore, the line that sets the ParabolaZ (it is a custom script almost in the begin of the trigger). After importing all the needed functions the system gets disabled upon saving or testing! I use only triggers (nothing extra like: vGui, Jesp or Jass). Is there a solution for this?
 
Level 4
Joined
Jul 11, 2007
Messages
82
Not that it matters much, but people don't jump (and objects on Earth don't move) in a parabolic path. You jump in an elliptical path. Math teachers like to use parabolic equations in real life story problems, but your physics instructor can tell you that it's not technically correct (though it is close).
 
Level 11
Joined
Aug 24, 2009
Messages
706
For jump, people should add
Unit - Order JKS_J_Jumper2[JKS_Integer[3]] to Stop
in JKSystemCore when using jump on more than one unit at the same time to prevent them from clumping in one place.
 
Last edited:
Top