Hello guys,
I am trying to make that command /rtpteams choose random positions that are not in the blacklist biomes and subsequently teleports the teams to their spawn. What I did, except that sometimes the player falls on a blacklisted biome and i don't know where the problem comes from.
My actual skript :
Rapid explanations :
- {_Game.Tp.Red} is the location for Red team.
- {_Game.Tp.Blue} is the location for Blue team.
@Donut I tag you because you helped me before, so if you have the time and the urge to take a look
Thank's !
I am trying to make that command /rtpteams choose random positions that are not in the blacklist biomes and subsequently teleports the teams to their spawn. What I did, except that sometimes the player falls on a blacklisted biome and i don't know where the problem comes from.
My actual skript :
code_language.skript:
command /rtpteams:
trigger:
set {_Game.Tp.Blue} to location(random number from -1500 to 1500, 100, random number from -1500 to 1500, world("world"))
set {_Game.Tp.Red} to location(random number from -1500 to 1500, 100, random number from -1500 to 1500, world("world"))
loop all players:
set {searching_for_location.%loop-player%} to true
while {searching_for_location.%loop-player%} is true:
remove resistance from the loop-player
apply resistance 10 to loop-player for 30 seconds
if biome at {_Game.Tp.Blue} and {_Game.Tp.Red} is not desert or desert hills or jungle or jungle hills or mesa or ocean or mushroom island or deep ocean or frozen ocean or frozen river or cold beach or stone beach or ice plains or ice mountains or ice plains spikes:
if {Game.Team::%loop-player%} is "Blue":
teleport loop-player to {_Game.Tp.Blue}
set {searching_for_location.%loop-player%} to false
if {Game.Team::%loop-player%} is "Red":
teleport loop-player to {_Game.Tp.Red}
set {searching_for_location.%loop-player%} to false
wait 1 tick
Rapid explanations :
- {_Game.Tp.Red} is the location for Red team.
- {_Game.Tp.Blue} is the location for Blue team.
@Donut I tag you because you helped me before, so if you have the time and the urge to take a look
Thank's !
Skript Version: 2.2
Skript Author: ?
Minecraft Version: 1.8.8
Errors on Reload : Nothing
Console Errors : Nothing
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums ? Yes
Skript Author: ?
Minecraft Version: 1.8.8
Errors on Reload : Nothing
Console Errors : Nothing
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums ? Yes