Jump to content

Need help making a skript where a player has fall damage disabled for 10 seconds if they step on a barrier


BrooksBoss

Recommended Posts

Here is a Skript I made for you. Thanks, you stay safe too!

on walk on barrier:
    set {nd::%player's uuid%} to now

on damage:
    damage cause is fall:    
        set {_time} to diffrence between {nd::%player's uuid%} and now
        if {_time} >= 10 seconds:
            cancel event

Shouldn't be any issues with it if there is make sure to respond!

 

Active Minehut Player since 2016

Advanced at Skript - Know a lot about running a server 

If you need help with anything contact me @ KJPAKA#0001

 

Link to comment
Share on other sites

3 hours ago, KJPAKA said:

Here is a Skript I made for you. Thanks, you stay safe too!


on walk on barrier:
    set {nd::%player's uuid%} to now

on damage:
    damage cause is fall:    
        set {_time} to diffrence between {nd::%player's uuid%} and now
        if {_time} >= 10 seconds:
            cancel event

Shouldn't be any issues with it if there is make sure to respond!

Thanks for your help. It didn't seem to work though. I thought it could be because difference didn't have an e, but that didn't seem to help. I extended the time and that didn't help it either.

Link to comment
Share on other sites

Sorry about that, forgot it was a damage event. I tested this out, this works!

on walk on barrier:
    set {nd::%player's uuid%} to now

on damage:
    damage cause is fall:    
        set {_time} to difference between {nd::%victim's uuid%} and now
        if {_time} < 10 seconds:
            cancel event

 

 

Active Minehut Player since 2016

Advanced at Skript - Know a lot about running a server 

If you need help with anything contact me @ KJPAKA#0001

 

Link to comment
Share on other sites

On 5/26/2020 at 5:28 PM, KJPAKA said:

Sorry about that, forgot it was a damage event. I tested this out, this works!


on walk on barrier:
    set {nd::%player's uuid%} to now

on damage:
    damage cause is fall:    
        set {_time} to difference between {nd::%victim's uuid%} and now
        if {_time} < 10 seconds:
            cancel event

 

You could also do this:

on walk on barrier:
	set {nd::%player's uuid%} to (unix timestamp of now) + 10

on damage:
	if damage cause is fall:
		if unix timestamp of now >= {nd::%player's uuid%}:
			cancel event
			delete {nd::%player's uuid%} # save variable storage :)

 

VIP since January 7th, 2020

Support since September 19th, 2020

Helper since November 3rd, 2020

Moderator since March 8th, 2021

unknown.png

5.png.e14b1bf83edf0ac2edc1bfb822177184.png

image.png.fe30b7b2c0be5a541ba4ed2187b23030.png

Link to comment
Share on other sites

  • 3 months later...

Topic Locked. 🔒

Please do not reply on month-old / inactive threads. Necroposting is not allowed. 

𝚄𝚗𝚝𝚛𝚎𝚊𝚝𝚎𝚍

𝔻𝕚𝕤𝕔𝕠𝕣𝕕: @𝕌𝕟𝕥𝕣𝕖𝕒𝕥𝕖𝕕#𝟘𝟘𝟘𝟙

News & Updates  Rules • Helper Application

Reports • Appeals

𝚂𝚝𝚊𝚏𝚏 𝚘𝚗 𝙼𝚒𝚗𝚎𝚑𝚞𝚝 𝚜𝚒𝚗𝚌𝚎 𝙹𝚞𝚗𝚎 𝟹𝟶𝚝𝚑, 𝟸𝟶𝟸𝟶

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...