1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved How to disable fall damage on jumping from spawn

Discussion in 'Requests' started by KAVKAZIE, Jul 25, 2019.

  1. KAVKAZIE

    KAVKAZIE Active Member

    Joined:
    Feb 27, 2017
    Messages:
    146
    Likes Received:
    0
    Hey, i want to disable the fall damage when a player jumps from spawn on kitpvp how i can do this ?

     
  2. Best Answer:
    Post #17 by KAVKAZIE, Jul 25, 2019
  3. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    check if player is in spawn region then just
    Code (Text):
    1. on damage:
    2.     if damage cause is "fall":
    3.         cancel event
     
  4. KAVKAZIE

    KAVKAZIE Active Member

    Joined:
    Feb 27, 2017
    Messages:
    146
    Likes Received:
    0
    i want it when he leaves spawn region the first fall damage wont be given
     
  5. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    then you could check if he left that zone, and set a boolean to true like
    Code (Text):
    1. set {FIRST_FALL::%player%} to true
    then when he dies reset that var to false
     
  6. KAVKAZIE

    KAVKAZIE Active Member

    Joined:
    Feb 27, 2017
    Messages:
    146
    Likes Received:
    0
    I can the region called "Spawn" can u do the full code for me please ?
     
  7. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    You gotta have the region...
     
  8. KAVKAZIE

    KAVKAZIE Active Member

    Joined:
    Feb 27, 2017
    Messages:
    146
    Likes Received:
    0
    i have the region bro
     
  9. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    Then make region checks, it ain't that hard I can give you pseudo code if you want me to
     
  10. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    Just add invisibility or whatever the heck it is to the world guard region flags.
    This way players won't take damage in the region.
     
  11. KAVKAZIE

    KAVKAZIE Active Member

    Joined:
    Feb 27, 2017
    Messages:
    146
    Likes Received:
    0
    the region on spawn called "Spawn" and when someone jumps out of this region i want the first fall damage to be canceled
    I would like too
     
  12. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    just expand the region a bit, then they won't take fall damage
     
  13. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    Code (Text):
    1. if player leaves region "spawn":
    2.     make_player_invincible( ) # pseudo code
    edit:

    just put water lmao
     
  14. KAVKAZIE

    KAVKAZIE Active Member

    Joined:
    Feb 27, 2017
    Messages:
    146
    Likes Received:
    0
    I can't add water its ugly and not smooth
     
  15. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    Code (Text):
    1. set block at {_loc} to water
    2. set data value of block at {_loc} to 7
    not ugly yet effective
    [​IMG]
     
  16. KAVKAZIE

    KAVKAZIE Active Member

    Joined:
    Feb 27, 2017
    Messages:
    146
    Likes Received:
    0
    can u make the code for me bro ?
     
  17. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    What code dude, expand the region... Not code just world guard basics
     
    • Agree Agree x 1
  18. KAVKAZIE

    KAVKAZIE Active Member

    Joined:
    Feb 27, 2017
    Messages:
    146
    Likes Received:
    0
    i just did
    Code (Text):
    1. on damage:
    2.     damage cause is fall:
    3.         if {lastfall.%victim%} is set:
    4.             cancel the event
    5.             delete {lastfall.%victim%}
    6.  
    7. on region exit:
    8.     if player is in the region "spawn":
    9.         set {lastfall.%player%} to true
     
  19. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    Great! You see doesn't it feel good to do something yourself? :emoji_slight_smile:
     
    • Agree Agree x 1
  20. exacto

    exacto Member

    Joined:
    Oct 27, 2021
    Messages:
    1
    Likes Received:
    0
    Hi does this still work on newer version ? I got this error
    can't understand this condition/effect: if player is in region "spawn"; set{lastfall.%player%} to true (item command.sk,line 2:if okayer is in the region "spawn": set {lastfall.%player%} to true')
     
  21. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    post your whole code, and it should work with the newest version

    And btw. I recommend using list variables instead of normal ones ({lastfall.%player%} --> {lastfall::%player%})
     

Share This Page

Loading...