command /game.start:
trigger:
set {_game.players::*} to all players
set {_team.amount} to round up ( amount of {_game.players::*} / 2 )
loop {_team.amount} times:
# 팀 번호
set {_team} to loop-number
# 플레이어 팀 번호 지정
loop ( loop-number * 2 - 1 ) and ( loop-number * 2 ):
{_game.players::%loop-integer%} is set
set {team::%{_game.players::%loop-integer%}%} to {_team}
on damage:
attacker is a player
victim is a player
# 팀 번호가 같으면 이벤트 취소
{team::%attacker%} is {team::%victim%}
cancel event
command /game.start:
trigger:
set {_game.players::*} to all players
set {_team.amount} toround up ( amount of {_game.players::*} / 2 )
loop {_team.amount} times:
# 팀 번호
set {_team} toloop-number
# 플레이어 팀 번호 지정
loop ( loop-number * 2 - 1 ) and ( loop-number * 2 ):
{_game.players::%loop-number-2%} issetset {team::%{_game.players::%loop-number-2%}%} to {_team}
on damage:
attacker is a player
victim is a player
# 팀 번호가 같으면 이벤트 취소
{team::%attacker%} is {team::%victim%}
cancelevent
스크립터브혼
2021.10.09냐이쿠스파워맨
2021.10.12감사합니다!
냐이쿠스파워맨
2021.10.15이 구문에서 loop-integer가 한꺼번에 쓸수 없다 해서 loop-integer를 전부 loop-integer-1로 한 뒤 해봤더니, 4명일때, 1팀과 2팀은 혼자 되고, 3팀만 2명이 되는 기적같은 일이 일어났네요..ㅠㅠ
스크립터브혼
2021.10.16command /game.start: trigger: set {_game.players::*} to all players set {_team.amount} to round up ( amount of {_game.players::*} / 2 ) loop {_team.amount} times: # 팀 번호 set {_team} to loop-number # 플레이어 팀 번호 지정 loop ( loop-number * 2 - 1 ) and ( loop-number * 2 ): {_game.players::%loop-number-2%} is set set {team::%{_game.players::%loop-number-2%}%} to {_team} on damage: attacker is a player victim is a player # 팀 번호가 같으면 이벤트 취소 {team::%attacker%} is {team::%victim%} cancel event
이중루프에서 loop-number-2를 사용하시면 됩니다.