Speed Drowning

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

    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.

CormanYT

Active Member
Jan 6, 2018
122
5
18
I have two questions. How do I make it drown players 5x faster if they are under water (like the oxygen bubbles go down 5x as fast), and make it do twice the damage when they have lost their oxygen? Thanks!
 
Okay for part 2#
code_language.skript:
on damage:
    if victim is a player:
        if damage cause is DROWNING:
            increase the damage by 1
This adds 1 more level of damage when the player takes drowning damage

For part #1 ... growing faster, a simple way you can do it (involves skript-mirror as Skript doesn't have an expression for this)
code_language.skript:
on join:
    (player).setMaximumAir(60)

there are other methods you could use, to change the remaining air if you wanted to do it that way, and speed up the bubble popping process
Remaining Air
 
Thanks!
Okay for part 2#
code_language.skript:
on damage:
    if victim is a player:
        if damage cause is DROWNING:
            increase the damage by 1
This adds 1 more level of damage when the player takes drowning damage

For part #1 ... growing faster, a simple way you can do it (involves skript-mirror as Skript doesn't have an expression for this)
code_language.skript:
on join:
    (player).setMaximumAir(60)

there are other methods you could use, to change the remaining air if you wanted to do it that way, and speed up the bubble popping process
Remaining Air
 
You can just use
code_language.skript:
player.setMaximumAir(60)
Only names with multiple spaces need ()
code_language.skript:
(last spawned entity).setMaximumAir(60)
Good to know for the future
"the more you know" *shooting star*
 
maxresdefault.jpg
 
Status
Not open for further replies.