hopefully fixed border bug
parent
f35b780181
commit
0c112e2c04
|
@ -90,6 +90,7 @@ command /minigame_skybattle_start:
|
||||||
|
|
||||||
resetplayers()
|
resetplayers()
|
||||||
resetteams()
|
resetteams()
|
||||||
|
resetborder()
|
||||||
|
|
||||||
set {skybattle::current_arena} to 0
|
set {skybattle::current_arena} to 0
|
||||||
clear inventory of {skybattle::gaming_players::*}
|
clear inventory of {skybattle::gaming_players::*}
|
||||||
|
@ -109,6 +110,7 @@ command /minigame_skybattle_start:
|
||||||
clear inventory of {skybattle::gaming_players::*}
|
clear inventory of {skybattle::gaming_players::*}
|
||||||
|
|
||||||
if {skybattle::current_arena} is 1:
|
if {skybattle::current_arena} is 1:
|
||||||
|
resetborder()
|
||||||
set {skybattle::stop_players} to "True"
|
set {skybattle::stop_players} to "True"
|
||||||
execute console command "/scoreboard players set Kola XD 1"
|
execute console command "/scoreboard players set Kola XD 1"
|
||||||
setbordercenter()
|
setbordercenter()
|
||||||
|
@ -126,6 +128,7 @@ command /minigame_skybattle_start:
|
||||||
spawnteam(10, 10)
|
spawnteam(10, 10)
|
||||||
|
|
||||||
if {skybattle::current_arena} is 2:
|
if {skybattle::current_arena} is 2:
|
||||||
|
resetborder()
|
||||||
set {skybattle::stop_players} to "True"
|
set {skybattle::stop_players} to "True"
|
||||||
execute console command "/scoreboard players set Kola XD 2"
|
execute console command "/scoreboard players set Kola XD 2"
|
||||||
setbordercenter()
|
setbordercenter()
|
||||||
|
@ -143,6 +146,7 @@ command /minigame_skybattle_start:
|
||||||
spawnteam(10, 9)
|
spawnteam(10, 9)
|
||||||
|
|
||||||
if {skybattle::current_arena} is 3:
|
if {skybattle::current_arena} is 3:
|
||||||
|
resetborder()
|
||||||
set {skybattle::stop_players} to "True"
|
set {skybattle::stop_players} to "True"
|
||||||
execute console command "/scoreboard players set Kola XD 3"
|
execute console command "/scoreboard players set Kola XD 3"
|
||||||
setbordercenter()
|
setbordercenter()
|
||||||
|
@ -304,7 +308,7 @@ function setbordercenter():
|
||||||
set {_w} to world("021")
|
set {_w} to world("021")
|
||||||
set {_b} to {_w}.getWorldBorder()
|
set {_b} to {_w}.getWorldBorder()
|
||||||
{_b}.setDamageBuffer(0)
|
{_b}.setDamageBuffer(0)
|
||||||
{_b}.setDamageAmount(2)
|
{_b}.setDamageAmount(0.3)
|
||||||
{_b}.setCenter({_x}, {_z})
|
{_b}.setCenter({_x}, {_z})
|
||||||
|
|
||||||
function changeborder(size: number, time: number):
|
function changeborder(size: number, time: number):
|
||||||
|
@ -312,6 +316,10 @@ function changeborder(size: number, time: number):
|
||||||
set {_b} to {_w}.getWorldBorder()
|
set {_b} to {_w}.getWorldBorder()
|
||||||
{_b}.setSize({_size}, {_time})
|
{_b}.setSize({_size}, {_time})
|
||||||
|
|
||||||
|
function resetborder():
|
||||||
|
set {_w} to world("021")
|
||||||
|
set {_b} to {_w}.getWorldBorder()
|
||||||
|
{_b}.reset()
|
||||||
|
|
||||||
command /skybattle_setborder <number>:
|
command /skybattle_setborder <number>:
|
||||||
description: Set center of border for map x
|
description: Set center of border for map x
|
||||||
|
|
Loading…
Reference in New Issue