Solved how to change player's knockback?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
You could do this and change the force to your liking

code_language.skript:
on damage of player:
    set {_hitlocation} to location of victim
    wait 1 tick
    teleport victim to {_hitlocation}
    push victim up with force 1
    push victim in direction of attacker with force 1
 
This is pretty much an exact copy of SmoothKnockback, you can look at it and see how it works (untested):
https://code.skript.pl/LW819vpA/
okey .. but it's not working
with errors:
code_language.skript:
[05:05:10] [Server thread/ERROR]: Can't understand this expression: 'velocity of {_entity}' (AriesKnockback.sk, line 13: set {_velocity} to velocity of {_entity}')
[05:05:10] [Server thread/ERROR]: Can't understand this condition/effect: set velocity of {_entity} to {_velocity} (AriesKnockback.sk, line 26: set velocity of {_entity} to {_velocity}')
[05:05:10] [Server thread/ERROR]: Can't understand this expression: 'new play_server_entity_velocity packet' (AriesKnockback.sk, line 29: set {_packet} to new play_server_entity_velocity packet')
[05:05:10] [Server thread/ERROR]: Invalid amount or placement of brackets. Please make sure that each opening bracket has a corresponding closing bracket. (AriesKnockback.sk, line 30: set {_entity}'s world pentity 0 of {_packet to {_entity}')
[05:05:10] [Server thread/ERROR]: Can't understand this condition/effect: set int pnum 1 of {_packet} to {_x} * 8000 (AriesKnockback.sk, line 31: set int pnum 1 of {_packet} to {_x} * 8000')
[05:05:11] [Server thread/ERROR]: Can't understand this condition/effect: set int pnum 2 of {_packet} to {_y} * 8000 (AriesKnockback.sk, line 32: set int pnum 2 of {_packet} to {_y} * 8000')
[05:05:11] [Server thread/ERROR]: Can't understand this condition/effect: set int pnum 3 of {_packet} to {_z} * 8000 (AriesKnockback.sk, line 33: set int pnum 3 of {_packet} to {_z} * 8000')
[05:05:11] [Server thread/ERROR]: Can't understand this condition/effect: send packet {_packet} to all players (AriesKnockback.sk, line 34: send packet {_packet} to all players')
[05:05:11] [Server thread/ERROR]: can't understand this condition: 'victim's no damage ticks is less than (victim's max no damage ticks / 2)' (AriesKnockback.sk, line 38: if victim's no damage ticks is less than (victim's max no damage ticks / 2):')
[05:05:11] [Server thread/ERROR]: can't understand this event: 'get players property no damage ticks' (AriesKnockback.sk, line 60: get players property no damage ticks:')
[05:05:11] [Server thread/ERROR]: can't understand this event: 'get players property max[imum] no damage ticks' (AriesKnockback.sk, line 64: get players property max[imum] no damage ticks:')
[05:05:11] [Server thread/ERROR]: can't understand this event: 'change players property no damage ticks' (AriesKnockback.sk, line 68: change players property no damage ticks:')
[05:05:11] [Server thread/ERROR]: can't understand this event: 'change players property max[imum] no damage ticks' (AriesKnockback.sk, line 81: change players property max[imum] no damage ticks:')
[05:05:11] [Server thread/INFO]: [0;37;22m[[0;33;22mSkript[0;37;22m][m [0;31;22mEncountered 13 errors while reloading [0;33;22mAriesKnockback.sk[m![m
[05:05:40] [Server thread/INFO]: [0;37;22m[[0;33;22mSkript[0;37;22m][m Reloading [0;33;22mAriesKnockback.sk[m...[m
[05:05:40] [Server thread/ERROR]: Can't understand this expression: 'velocity of {_entity}' (AriesKnockback.sk, line 13: set {_velocity} to velocity of {_entity}')
[05:05:40] [Server thread/ERROR]: Can't understand this condition/effect: set velocity of {_entity} to {_velocity} (AriesKnockback.sk, line 26: set velocity of {_entity} to {_velocity}')
[05:05:40] [Server thread/ERROR]: Can't understand this expression: 'new play_server_entity_velocity packet' (AriesKnockback.sk, line 29: set {_packet} to new play_server_entity_velocity packet')
[05:05:40] [Server thread/ERROR]: Invalid amount or placement of brackets. Please make sure that each opening bracket has a corresponding closing bracket. (AriesKnockback.sk, line 30: set {_entity}'s world pentity 0 of {_packet to {_entity}')
[05:05:40] [Server thread/ERROR]: Can't understand this condition/effect: set int pnum 1 of {_packet} to {_x} * 8000 (AriesKnockback.sk, line 31: set int pnum 1 of {_packet} to {_x} * 8000')
[05:05:40] [Server thread/ERROR]: Can't understand this condition/effect: set int pnum 2 of {_packet} to {_y} * 8000 (AriesKnockback.sk, line 32: set int pnum 2 of {_packet} to {_y} * 8000')
[05:05:40] [Server thread/ERROR]: Can't understand this condition/effect: set int pnum 3 of {_packet} to {_z} * 8000 (AriesKnockback.sk, line 33: set int pnum 3 of {_packet} to {_z} * 8000')
[05:05:40] [Server thread/ERROR]: Can't understand this condition/effect: send packet {_packet} to all players (AriesKnockback.sk, line 34: send packet {_packet} to all players')
[05:05:40] [Server thread/ERROR]: can't understand this condition: 'victim's no damage ticks is less than (victim's max no damage ticks / 2)' (AriesKnockback.sk, line 38: if victim's no damage ticks is less than (victim's max no damage ticks / 2):')
[05:05:40] [Server thread/ERROR]: can't understand this event: 'get players property no damage ticks' (AriesKnockback.sk, line 60: get players property no damage ticks:')
[05:05:40] [Server thread/ERROR]: can't understand this event: 'get players property max[imum] no damage ticks' (AriesKnockback.sk, line 64: get players property max[imum] no damage ticks:')
[05:05:40] [Server thread/ERROR]: can't understand this event: 'change players property no damage ticks' (AriesKnockback.sk, line 68: change players property no damage ticks:')
[05:05:40] [Server thread/ERROR]: can't understand this event: 'change players property max[imum] no damage ticks' (AriesKnockback.sk, line 81: change players property max[imum] no damage ticks:')

i installation this script needed's addon (mundosk, skript-mirror, protocollib)
but it's still not working :emoji_frowning:
 
Last edited:
Status
Not open for further replies.