-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved death animation and respawn
- Loading branch information
Showing
34 changed files
with
221 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
datapacks/Scaffolding Rush/data/scaffolding_rush/functions/lobby/suffocation.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
tp @s ~ ~1 ~ | ||
say @s suffocating | ||
execute if block ~ ~ ~ #scaffolding_rush:lobby_suffocation positioned ~ ~1 ~ run function scaffolding_rush:lobby/suffocation |
1 change: 0 additions & 1 deletion
1
datapacks/Scaffolding Rush/data/scaffolding_rush/functions/lobby/tp_to_lobby.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
spreadplayers 0 0 0 5 false @s | ||
execute at @s run teleport @s ~ ~-11 ~ 0 0 | ||
tag @s remove InGame | ||
spawnpoint @a 1 24 1 | ||
gamemode adventure @s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
datapacks/Scaffolding Rush/data/scaffolding_rush/functions/player/death/die.mcfunction
This file was deleted.
Oops, something went wrong.
26 changes: 14 additions & 12 deletions
26
...ding Rush/data/scaffolding_rush/functions/player/death/drown_in_lava/animation.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
# Execute as & at the player | ||
# Called by function scaffolding_rush:player/death/trigger | ||
|
||
execute at @a[scores={player.death.animation=1..}] run particle lava ~ ~ ~ 0.5 0.5 0.5 0 3 normal | ||
# Force ride and sink into lava | ||
ride @s mount @e[tag=player.death.drown_in_lava.animation,limit=1,sort=nearest] | ||
execute as @e[tag=player.death.drown_in_lava.animation,limit=1,sort=nearest] at @s run tp @s ~ ~-0.025 ~ | ||
execute at @s run particle lava ~ ~ ~ 0.5 0.5 0.5 0 3 normal | ||
|
||
execute as @a[scores={player.death.animation=1..}] at @s anchored eyes positioned ^ ^ ^ if block ~1 ~ ~ magma_block on vehicle at @s run tp @s ~ ~1 ~ | ||
execute as @a[scores={player.death.animation=1..}] at @s anchored eyes positioned ^ ^ ^ if block ~-1 ~ ~ magma_block on vehicle at @s run tp @s ~ ~1 ~ | ||
execute as @a[scores={player.death.animation=1..}] at @s anchored eyes positioned ^ ^ ^ if block ~ ~ ~1 magma_block on vehicle at @s run tp @s ~ ~1 ~ | ||
execute as @a[scores={player.death.animation=1..}] at @s anchored eyes positioned ^ ^ ^ if block ~ ~ ~-1 magma_block on vehicle at @s run tp @s ~ ~1 ~ | ||
# Prevent new lava layer to make the player suffocate | ||
execute at @s anchored eyes positioned ^ ^ ^ if block ~1 ~ ~ magma_block on vehicle at @s run tp @s ~ ~1 ~ | ||
execute at @s anchored eyes positioned ^ ^ ^ if block ~-1 ~ ~ magma_block on vehicle at @s run tp @s ~ ~1 ~ | ||
execute at @s anchored eyes positioned ^ ^ ^ if block ~ ~ ~1 magma_block on vehicle at @s run tp @s ~ ~1 ~ | ||
execute at @s anchored eyes positioned ^ ^ ^ if block ~ ~ ~-1 magma_block on vehicle at @s run tp @s ~ ~1 ~ | ||
|
||
execute as @e[tag=player.death.animation.vehicle] at @s run tp @s ~ ~-0.025 ~ | ||
execute as @a[scores={player.death.animation=1..}] at @s run ride @s mount @e[tag=player.death.animation.vehicle,limit=1,sort=nearest] | ||
|
||
kill @e[tag=player.death.animation.vehicle,scores={player.death.animation=1}] | ||
execute as @a[scores={player.death.animation=1}] at @s run function scaffolding_rush:player/death/kill | ||
|
||
scoreboard players remove @e[scores={player.death.animation=1..}] player.death.animation 1 | ||
# End of animation | ||
kill @e[tag=player.death.drown_in_lava.animation,scores={player.death.animation=..1}] | ||
execute if score @s player.death.animation matches 1 run function scaffolding_rush:player/death/respawn/start |
19 changes: 14 additions & 5 deletions
19
...ffolding Rush/data/scaffolding_rush/functions/player/death/drown_in_lava/start.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
# Execute as & at the player | ||
# Called by function scaffolding_rush:player/death/trigger | ||
|
||
execute if score DevelopementMode data matches 1 run say player/death/kill/lava | ||
function scaffolding_rush:player/death/just_died | ||
|
||
execute if entity @s run tellraw @a[scores={option.language=0}] ["",{"text":"[BS] ","color":"gold"},{"selector":"@s"},{"text":" fell into the lava","color":"gray"}] | ||
execute if entity @s run tellraw @a[scores={option.language=1}] ["",{"text":"[BS] ","color":"gold"},{"selector":"@s"},{"text":" est tombé·e dans la lave","color":"gray"}] | ||
|
||
effect give @s resistance 3 127 true | ||
effect give @s fire_resistance 3 127 true | ||
|
||
playsound minecraft:entity.player.hurt_on_fire ambient @s ~ ~ ~ | ||
|
||
playsound blazing_scaffolding:lava_drown master @a[distance=..30] ~ ~ ~ 1 1 0 | ||
|
||
summon armor_stand ~ ~ ~ {Tags:["player.death.animation.vehicle","player.death.animation.vehicle.new"],NoGravity:1,Small:1,Marker:1,Invisible:1} | ||
summon armor_stand ~ ~ ~ {Tags:["player.death.drown_in_lava.animation","player.death.drown_in_lava.animation.new"],NoGravity:1,Small:1,Marker:1,Invisible:1} | ||
|
||
tp @e[tag=player.death.animation.vehicle.new,limit=1,sort=nearest] @s | ||
ride @s mount @e[tag=player.death.animation.vehicle.new,limit=1,sort=nearest] | ||
tp @e[tag=player.death.drown_in_lava.animation.new,limit=1,sort=nearest] @s | ||
ride @s mount @e[tag=player.death.drown_in_lava.animation.new,limit=1,sort=nearest] | ||
|
||
scoreboard players set @e[tag=player.death.animation.vehicle.new] player.death.animation 40 | ||
scoreboard players set @e[tag=player.death.drown_in_lava.animation.new] player.death.animation 40 | ||
scoreboard players set @s player.death.animation 40 | ||
tag @s add player.death.drown_in_lava | ||
|
||
tag @e[tag=player.death.drown_in_lava.animation.new] remove player.death.drown_in_lava.animation.new |
16 changes: 16 additions & 0 deletions
16
datapacks/Scaffolding Rush/data/scaffolding_rush/functions/player/death/just_died.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Execute as & at the player | ||
# Called by functions scaffolding_rush:player/death/<type>/start | ||
|
||
tag @s add player.is_dead | ||
|
||
# Drop the flag | ||
summon marker ~ ~ ~ {Tags:["last_death"]} | ||
execute store result entity @e[type=marker,tag=last_death,limit=1] Pos[0] double 1.0 run scoreboard players get @s pos.x | ||
execute store result entity @e[type=marker,tag=last_death,limit=1] Pos[1] double 1.0 run scoreboard players get @s pos.y | ||
execute store result entity @e[type=marker,tag=last_death,limit=1] Pos[2] double 1.0 run scoreboard players get @s pos.z | ||
execute unless score #flag.take_over options matches 0 if entity @s[tag=flag_carry] positioned as @e[type=marker,tag=last_death,limit=1] run function scaffolding_rush:game/flag/drop/any | ||
kill @e[type=marker,tag=last_death] | ||
|
||
effect clear @s | ||
clear @s | ||
tag @s remove player.item.can_have_items |
30 changes: 0 additions & 30 deletions
30
datapacks/Scaffolding Rush/data/scaffolding_rush/functions/player/death/kill.mcfunction
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
...g Rush/data/scaffolding_rush/functions/player/death/killed_by_player/animation.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Execute as & at the player | ||
# Called by function scaffolding_rush:player/death/trigger | ||
|
||
# Force spectate camera | ||
spectate @e[tag=player.death.killed_by_player.animation,limit=1,sort=nearest] @s[scores={player.death.animation=1..39}] | ||
execute as @e[tag=player.death.killed_by_player.animation,limit=1,sort=nearest] at @s run tp @s ^ ^ ^-0.05 ~ ~1 | ||
|
||
# End of animation | ||
kill @e[tag=player.death.killed_by_player.animation,scores={player.death.animation=..1}] | ||
execute if score @s player.death.animation matches 1 run function scaffolding_rush:player/death/respawn/start |
21 changes: 21 additions & 0 deletions
21
...lding Rush/data/scaffolding_rush/functions/player/death/killed_by_player/start.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Execute as & at the player | ||
# Called by function scaffolding_rush:player/death/trigger | ||
|
||
function scaffolding_rush:player/death/just_died | ||
|
||
execute if entity @s run tellraw @a[scores={option.language=0}] ["",{"text":"[BS] ","color":"gold"},{"selector":"@s"},{"text":" was killed","color":"gray"}] | ||
execute if entity @s run tellraw @a[scores={option.language=1}] ["",{"text":"[BS] ","color":"gold"},{"selector":"@s"},{"text":" a été tué","color":"gray"}] | ||
|
||
summon armor_stand ~ ~ ~ {Tags:["player.death.killed_by_player.animation","player.death.killed_by_player.animation.new"],NoGravity:1,Small:1,Marker:1,Invisible:1} | ||
|
||
tp @e[tag=player.death.killed_by_player.animation.new,limit=1,sort=nearest] @s | ||
gamemode spectator @s | ||
# spectate @e[tag=player.death.killed_by_player.animation.new,limit=1,sort=nearest] @s | ||
|
||
scoreboard players set @e[tag=player.death.killed_by_player.animation.new] player.death.animation 40 | ||
scoreboard players set @s player.death.animation 40 | ||
tag @s add player.death.killed_by_player | ||
|
||
scoreboard players set @s listener.death 0 | ||
|
||
tag @e[tag=player.death.killed_by_player.animation.new] remove player.death.killed_by_player.animation.new |
11 changes: 0 additions & 11 deletions
11
datapacks/Scaffolding Rush/data/scaffolding_rush/functions/player/death/respawn.mcfunction
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.