Technik Wiki
Registrieren
Advertisement
Gruppe: Grid Ketten-Befehlsblock
Systeme

Grid Roter Sand blass mit Mechaniken

Grid Redstone blass mit Redstone
                Hier:
Grid Befehlsblock mit Befehlen
Verfügbar in:
Wiki Mechanik-Welt Mechanik-Welt

Kontrollpunkte (engl. Checkpoints) sind Orte an denen der Spieler sofort zurückkehren kann, wenn er beispielsweise beim Abschließen eines Parcours gescheitert ist, um wieder neu anzufangen. Kontrollpunkte können für einzelne Spieler ausgelegt sein oder für Teams, bei denen einer den neuen Kontrollpunkt setzen kann und die anderen können diesen ebenfalls nutzen.

Variante 1[]

Kontrollpunkt-System (Befehle) Bild 1.1

Dieses Kontrollpunkt-System ist für den Einzelspielermodus gedacht und gibt dem Spieler der es nutzt ein Etikett. Wenn der Spieler auf eine Wägeplatte läuft wird ein Kontrollpunkt erzeugt, sodass wenn er auf Diamantblöcke fällt, er wieder zu dem Kontrollpunkt zurück teleportiert wird.

Einschalten
  • Befehl 1.1 Der Konstruktionsblock im Lademodus wird gesetzt und daraufhin ein Redstone-Block[B1.2], der diesen aktiviert.
  • Befehl 1.3 Es wird ein fallender Block mit Passagieren erzeugt, welcher nach einem Tick verschwindet. Auf diesem befinden sich ein Rüstungsständer, der klein, keine Hitbox besitzt, unsichtbar ist und keine Schwerkraft hat. Dieser besitzt Etiketten und ein Totem im Kopfslot, welches sichtbar ist. Zum anderen sitzt auf diesen auch ein Rüstungsständer mit Anzeigenamen.
  • Befehl 1.4 Der nächste Spieler im Umkreis von 15 Metern bekommt ein Etikett, zum besseren Erkennen.
  • Befehl 1.5 Es wird eine Nachricht ausgegeben, damit man weis dass dies eine Einzelspieler-Variante des Kontrollpunkt-Systems ist.
Wiederholen
  • Befehl 1.6 Wenn der Spieler auf einer goldenen Wägeplatte steht und sich darunter ein Quarzblock befindet, so wird der Kontrollpunkt-Rüstungsständer zu diesem teleportiert.
  • Befehl 1.7 Wenn der Spieler auf einem Diamantblock steht, wird er wieder zum Kontrollpunkt teleportiert.
  • Befehl 1.8 Wenn der Kontrollpunkt auf einer Wägeplatte sich befindet und der Rüstungsständer mit Totem nicht innerhalb von drei Metern bei ihm befindet, wird der Totem-Rüstungsständer zu diesem teleportiert.
  • Befehl 1.9 Der Totem-Rüstungsständer wird rotiert, sodass er sich ständig dreht.
  • Befehl 1.10 An der Position des Totem-Rüstungsständers werden Rauchpartikel erzeugt.
Ausschalten
  • Befehl 1.11 Der gesamte Parcours wird entfernt.
  • Befehl 1.12 Die goldenen Wägeplatten droppen und werden mit einem Etikett markiert.
  • Befehl 1.13 Alle Objekte mit dem entsprechenden Etikett werden entfernt.
  • Befehl 1.14 Der Spieler bekommt das eigene Etikett entfernt.

Befehlsblöcke mit Befehlen:
setblock ~10 ~ ~-10 minecraft:structure_block{mode:"LOAD",rotation:"NONE",posX:-7,posY:0,posZ:-8,name:"kontrollpunkt-system:v1parcours"} replace
setblock ~10 ~-1 ~-9 minecraft:redstone_block replace
summon minecraft:falling_block ~10 ~1 ~-6 {Time:0,Passengers:[{id:"minecraft:armor_stand",Small:true,Marker:true,Invisible:true,NoGravity:true,Tags:["EtiKontPS.1Alle","EtiKontPS.1Dreher"],ArmorItems:[{},{},{},{id:"minecraft:totem_of_undying",Count:1b}]},{id:"minecraft:armor_stand",Small:true,Marker:true,Invisible:true,NoGravity:true,CustomNameVisible:true,CustomName:'{"text":"Kontrollpunkt","color":"aqua","bold":true}',Tags:["EtiKontPS.1Alle","EtiKontPS.1Kontrollpunkt"]}]}
tag @p[distance=..15] add EtiKontPS.1Spieler
tellraw @a[distance=..25] ["Kontrollpunkt-System.1:\n",{"text":"Für den Einzelspieler","bold":true}]


execute at @a[tag=EtiKontPS.1Spieler] if block ~ ~ ~ minecraft:light_weighted_pressure_plate if block ~ ~-1 ~ minecraft:quartz_block run teleport @e[type=minecraft:armor_stand,tag=EtiKontPS.1Kontrollpunkt,sort=nearest,limit=1] ~ ~ ~ ~ ~
execute as @a[tag=EtiKontPS.1Spieler] at @s if block ~ ~-1 ~ minecraft:diamond_block run teleport @s @e[type=minecraft:armor_stand,tag=EtiKontPS.1Kontrollpunkt,sort=nearest,limit=1]
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.1Kontrollpunkt] at @s if block ~ ~ ~ minecraft:light_weighted_pressure_plate run teleport @e[distance=3..,type=minecraft:armor_stand,tag=EtiKontPS.1Dreher,sort=nearest,limit=1] ~ ~ ~
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.1Dreher] at @s run teleport @s ~ ~ ~ ~5 ~
execute at @e[type=minecraft:armor_stand,tag=EtiKontPS.1Dreher] run particle minecraft:effect ~ ~0.8 ~ 0 0 0 0 5 force @a[distance=..25]


fill ~3 ~ ~-2 ~18 ~9 ~-17 minecraft:air replace
tag @e[dx=18,dy=10,dz=-18,type=minecraft:item,nbt={Item:{id:"minecraft:light_weighted_pressure_plate"} }] add EtiKontPS.1Alle
kill @e[tag=EtiKontPS.1Alle]
tag @a[tag=EtiKontPS.1Spieler] remove EtiKontPS.1Spieler

Variante 2[]

Kontrollpunkt-System (Befehle) Bild 2.1

Dieses Kontrollpunkt-System ist für den Mehrspielermodus gedacht und erzeugt für jeden einzelnen Spieler seinen persönlichen Kontrollpunkt. Jeder Spieler erhält zu beginn eine Nummer und bei Kontakt einer Wägeplatte wird ein Kontrollpunkt mit gleicher Nummer angelegt. Wenn der Spieler dann auf Diamantblöcke landet, wird der Kontrollpunkt gesucht der die gleiche Nummer besitzt und der Spieler wird zu diesen zurück teleportiert.

Einschalten
  • Befehl 2.1 Wenn der Hebel umgelegt wird, wird die Start-Funktion gestartet.
Wiederholen
  • Befehl 2.2 Beim Einschalten wird auch der Wiederhol-Befehlsblock gestartet, der jeden Tick die Zyklus-Funktion lädt.
Ausschalten
  • Befehl 2.3 Wenn der Hebel wieder in Ausgangsstellung zurück gelegt wird, wird die Stopp-Funktion ausgelöst und schaltet alles wieder ab.

Befehlsblöcke mit Befehlen:


Variante 2: Start-Funktion
Die Start-Funktion erzeugt das Punktestand-Ziel, setzt den Parcours und gibt eine Nachricht aus.

Editor Icon kontrollpunkt-system:v2start.mcfunction
# Das Punktestand-Ziel, für die Nummerierung der Spieler, wird erstellt.
scoreboard objectives add PZKontPS.2Nr dummy ["Kontrollpunkt-System.2: ",{"text":"Spielernummer","bold":true}]

# Ein Konstruktionsblock samt Redstone-Block werden platziert um einen Parcours zu erstellen.
setblock ~10 ~ ~-10 minecraft:structure_block{mode:"LOAD",rotation:"NONE",posX:-7,posY:0,posZ:-8,name:"kontrollpunkt-system:v2parcours"} replace
setblock ~10 ~ ~-9 minecraft:redstone_block replace

# Spielern im Umkreis von 25 Metern wird eine Nachricht in den Chat geschrieben.
tellraw @a[distance=..25] ["Kontrollpunkt-System.2:\n",{"text":"Für den Mehrspieler","bold":true}]

Variante 2: Zyklus-Funktion
Die Zyklus-Funktion gibt jedem Spieler eine Nummer, setzt die Spieler zu ihrem Kontrollpunkt zurück, wenn sie auf Diamantblöcken laufen und setzt Kontrollpunkte, wenn sie auf goldene Wägeplatten laufen

Editor Icon kontrollpunkt-system:v2zyklus.mcfunction
# Spieler die noch keine Nummer besitzen erhalten die nächst höhere aktuelle Nummer und sie erhalten dafür ein Etikett.
execute as @p[distance=..50,tag=!EtiKontPS.2Nummer] store result score @s PZKontPS.2Nr run scoreboard players add VarKontPS.2SpielerNummer PZKontPS.2Nr 1
tag @p[distance=..50,tag=!EtiKontPS.2Nummer,scores={PZKontPS.2Nr=1..}] add EtiKontPS.2Nummer

# Wenn Spieler auf einen Diamantblock laufen, führen alle Rüstungsständer, die einen Kontrollpunkt darstellen, eine Punkteprüfung aus, ob sie die gleiche Nummer wieder Spieler besitzen. Nur einer kann die gleiche Nummer besitzen und teleportiert so den Spieler zu sich.
execute as @a[tag=EtiKontPS.2Nummer] at @s if block ~ ~-1 ~ minecraft:diamond_block as @e[type=minecraft:armor_stand,tag=EtiKontPS.2Kontrollpunkt,scores={PZKontPS.2Nr=1..}] if score @s PZKontPS.2Nr = @p PZKontPS.2Nr run teleport @p @s

# Falls der Spieler auf einer goldene Wägeplatte mit Quarzblock getreten ist, wird der bisherige Kontrollpunkt-Rüstungsständer des Spielers mit gleicher Nummer zu diesem teleportiert. Falls dieser sich in einem Radius von zwei Metern aufhält.
execute as @a[tag=EtiKontPS.2Nummer] at @s if block ~ ~ ~ minecraft:light_weighted_pressure_plate if block ~ ~-1 ~ minecraft:quartz_block as @e[distance=..2,type=minecraft:armor_stand,tag=EtiKontPS.2Kontrollpunkt,scores={PZKontPS.2Nr=1..}] if score @s PZKontPS.2Nr = @p PZKontPS.2Nr run teleport @s @p

# Wenn der Spieler auf eine Wägeplatte mit Quarzblock tritt und sich kein Kontrollpunkt-Rüstungsständer bisher dort aufhält bekommt er ein Etikett.
execute as @a[tag=EtiKontPS.2Nummer] at @s if block ~ ~ ~ minecraft:light_weighted_pressure_plate if block ~ ~-1 ~ minecraft:quartz_block unless entity @e[distance=..2,type=minecraft:armor_stand,scores={PZKontPS.2Nr=1..}] run tag @s add EtiKontPS.2BrauchtKontrollpunkt

# Falls der Spieler auf die Wägeplatte mit Quarzblock getreten ist und es sich Rüstungsständer dort aufhielten, wird geprüft ob sie die gleiche Nummer wie der Spieler besitzen. Wenn nur einer davon nicht mit der Nummer übereinstimmt, wird dem Spieler ebenfalls ein Etikett gegeben.
execute as @a[tag=EtiKontPS.2Nummer,tag=!EtiKontPS.2BrauchtKontrollpunkt] at @s if block ~ ~ ~ minecraft:light_weighted_pressure_plate if block ~ ~-1 ~ minecraft:quartz_block as @e[distance=..2,type=minecraft:armor_stand,scores={PZKontPS.2Nr=1..}] unless score @s PZKontPS.2Nr = @p PZKontPS.2Nr run tag @p add EtiKontPS.2BrauchtKontrollpunkt

# Falls doch ein Rüstungsständer dabei war der die gleiche Nummer hatte, wird dem Spieler das Etikett wieder entfernt.
execute as @a[tag=EtiKontPS.2Nummer,tag=EtiKontPS.2BrauchtKontrollpunkt] at @s as @e[distance=..2,type=minecraft:armor_stand,scores={PZKontPS.2Nr=1..}] if score @s PZKontPS.2Nr = @p PZKontPS.2Nr run tag @p remove EtiKontPS.2BrauchtKontrollpunkt

# Der Rüstungsständer der die gleiche Nummer besitzt wird entfernt, falls es einen gab und der Spieler einen Kontrollpunkt braucht. Anschließend bekommt der Spieler eine Nachricht.
execute at @a[tag=EtiKontPS.2BrauchtKontrollpunkt] as @e[type=minecraft:armor_stand,scores={PZKontPS.2Nr=1..}] if score @s PZKontPS.2Nr = @p PZKontPS.2Nr run kill @s
title @a[tag=EtiKontPS.2BrauchtKontrollpunkt] actionbar ["",{"text":"Kontrollpunkt gesetzt","color":"aqua","bold":true}]

# An der Position des Spielers wird der neue Kontrollpunkt-Rüstungsständer erzeugt und er bekommt die gleiche Nummer wie dieser und das entsprechende Etikett wird entfernt.
execute at @a[tag=EtiKontPS.2BrauchtKontrollpunkt] run summon minecraft:armor_stand ~ ~ ~ {Invisible:true,NoGravity:true,Marker:true,CustomNameVisible:true,CustomName:'{"text":"Kontrollpunkt","color":"aqua","bold":true}',Tags:["EtiKontPS.2Alle","EtiKontPS.2BrauchtNummer","EtiKontPS.2Kontrollpunkt"] }
execute as @a[tag=EtiKontPS.2BrauchtKontrollpunkt] at @s run scoreboard players operation @e[distance=..2,type=minecraft:armor_stand,tag=EtiKontPS.2BrauchtNummer,sort=nearest,limit=1] PZKontPS.2Nr = @s PZKontPS.2Nr
tag @e[type=minecraft:armor_stand,tag=EtiKontPS.2BrauchtNummer] remove EtiKontPS.2BrauchtNummer
tag @a[tag=EtiKontPS.2BrauchtKontrollpunkt] remove EtiKontPS.2BrauchtKontrollpunkt

Variante 2: Stopp-Funktion
Die Stopp-Funktion löscht das Punktestand-Ziel, entfernt das Etikett, löscht den Parcours und entfernt alle Gegenstände davon.

Editor Icon kontrollpunkt-system:v2stopp.mcfunction
# Das Punktestand-Ziel wird wieder entfernt.
scoreboard objectives remove PZKontPS.2Nr

# Allen Spieler die das Etikett besitzen, wird es entfernt.
tag @a[tag=EtiKontPS.2Nummer] remove EtiKontPS.2Nummer

# Der Parcours wird wieder entfernt und die dabei droppenden Blöcke erhalten ein Etikett.
fill ~3 ~ ~-2 ~18 ~10 ~-17 minecraft:air replace
tag @e[dx=18,dy=15,dz=-18,type=minecraft:item,nbt={Item:{id:"minecraft:light_weighted_pressure_plate"} }] add EtiKontPS.2Alle

# Alle Objekte mit dem Etikett werden entfernt
kill @e[tag=EtiKontPS.2Alle]

Variante 3[]

Kontrollpunkt-System (Befehle) Bild 3.1

Dieses Kontrollpunkt-System ist für zwei Teams gedacht, bei dem Spieler im gleichen Team die Kontrollpunkte teilen. Jeder bereits erreichte Kontrollpunkt auf einer Wägeplatte wird markiert und nur der aktuellste zählt. So wird das Team vorangebracht. Falls man in einem Bereich gelandet ist bei dem man nicht auf Diamtblöcke stößt, kann man ein Totem per Q werfen und das Ergebnis ist, wie wenn man auf Diamtblöcken landen würde, man wird zum Kontrollpunkt zurück teleportiert.

Einschalten
  • Befehl 3.1 Wenn der Hebel umgelegt wird, wird die Start-Funktion gestartet.
Wiederholen
  • Befehl 3.2 Beim Einschalten wird auch der Wiederhol-Befehlsblock gestartet, der jeden Tick die Zyklus-Funktion lädt.
Ausschalten
  • Befehl 3.3 Wenn der Hebel wieder in Ausgangsstellung zurück gelegt wird, wird die Stopp-Funktion ausgelöst und schaltet alles wieder ab.

Befehlsblöcke mit Befehlen:


Variante 3: Start-Funktion
Die Start-Funktion erstellt zwei Teams mit Farben und ein Punktestand-Ziel. Desweiteren wird der Parcours erzeugt und die Spieler erhalten eine Nachricht.

Editor Icon kontrollpunkt-system:v3start.mcfunction
# Die beiden Teams "rot" und "blau" werden erstellt.
team add TMKontPS.3ROT ["Kontrollpunkt-System.3: ",{"text":"Team Rot","bold":true}]
team add TMKontPS.3BLAU ["Kontrollpunkt-System.3: ",{"text":"Team Blau","bold":true}]

# Entsprechend ihrer Namen erhalten die Teams ihre Farben.
team modify TMKontPS.3ROT color red
team modify TMKontPS.3BLAU color blue

# Das Punktestand für das Werfen von Totems wird erstellt.
scoreboard objectives add PZKontPS.3Wurf minecraft.dropped:minecraft.totem_of_undying ["Kontrollpunkt-System.3: ",{"text":"Wurf eines Totem","bold":true}]

# Alle Spieler im Umkreis von 25 Metern erhalten den Wert eins.
scoreboard players set @a[distance=..25] PZKontPS.3Wurf 1

# Ein Konstruktionsblock samt Redstone-Block werden platziert um einen Parcours zu erstellen.
setblock ~10 ~ ~-12 minecraft:structure_block{mode:"LOAD",rotation:"NONE",posX:-7,posY:0,posZ:-8,name:"kontrollpunkt-system:v3parcours"} replace
setblock ~10 ~ ~-11 minecraft:redstone_block replace

# Spielern im Umkreis von 25 Metern wird eine Nachricht in den Chat geschrieben.
tellraw @a[distance=..25] ["Kontrollpunkt-System.3:\n",{"text":"Für den Team-Mehrspieler","bold":true}]

Variante 3: Zyklus-Funktion
Die Zyklus-Funktion steckt Spieler in eines der beiden Teams bei Bedarf, sorgt dafür dass Kontrollpunkte gesetzt und benannt werden, teleportiert Spieler zum Kontrollpunkt bei Kontakt mit Diamantblöcken und sorgt für das zurück setzen zum Kontrollpunkt wenn man ein Totem wirft.

Editor Icon kontrollpunkt-system:v3zyklus.mcfunction
# Der nächstgelegene Spieler in einem Umkreis von 25 Metern der in keinen der beiden Teams ist und auf einer goldenen Wägeplatte mit Quarzblock steht, erhält ein Etikett.
execute as @p[distance=..35,tag=!EtiKontPS.3KeinTeam,team=!TMKontPS.3ROT,team=!TMKontPS.3BLAU] at @s if block ~ ~ ~ minecraft:light_weighted_pressure_plate if block ~ ~-1 ~ minecraft:quartz_block run tag @s add EtiKontPS.3KeinTeam

# Wenn es einen Spieler gibt der keinem der beiden Teams angehört, wird die aktuelle Anzahl der Team-Mitglieder der beiden Teams ausgelesen und in Variablen gespeichert.
execute if entity @p[tag=EtiKontPS.3KeinTeam] store result score VarKontPS.3ROT PZKontPS.3Wurf run team list TMKontPS.3ROT
execute if entity @p[tag=EtiKontPS.3KeinTeam] store result score VarKontPS.3BLAU PZKontPS.3Wurf run team list TMKontPS.3BLAU

# Wenn das rote Team weniger oder gleich viele Mitglieder wie das balue Team haben, dann wird der Spieler in das rote gesetzt ansonsten in das blaue Team.
execute as @p[tag=EtiKontPS.3KeinTeam] if score VarKontPS.3ROT PZKontPS.3Wurf <= VarKontPS.3BLAU PZKontPS.3Wurf run team join TMKontPS.3ROT @s
execute as @p[tag=EtiKontPS.3KeinTeam] if score VarKontPS.3ROT PZKontPS.3Wurf > VarKontPS.3BLAU PZKontPS.3Wurf run team join TMKontPS.3BLAU @s

# Anschließend wird das Etikett wieder entfernt.
tag @p[tag=EtiKontPS.3KeinTeam] remove EtiKontPS.3KeinTeam

# Wenn rote Spieler auf einer Wägeplatte mit Quarzblock stehen, werden alle aktuellen Kontrollpunkte des roten Teams umbenannt.
execute at @a[team=TMKontPS.3ROT] if block ~ ~ ~ minecraft:light_weighted_pressure_plate if block ~ ~-1 ~ minecraft:quartz_block unless entity @e[distance=..3,type=minecraft:armor_stand,tag=EtiKontPS.3TeamROT] as @e[type=minecraft:armor_stand,tag=EtiKontPS.3TeamROT,tag=!EtiKontPS.3Etappe] run data merge entity @s {CustomName:'{"text":"Team ROT","color":"red","bold":true}',Tags:["EtiKontPS.3Alle","EtiKontPS.3TeamROT","EtiKontPS.3Etappe"]}

# Wenn blaue Spieler auf einer Wägeplatte mit Quarzblock stehen, werden alle aktuellen Kontrollpunkte des blauen Teams umbenannt.
execute at @a[team=TMKontPS.3BLAU] if block ~ ~ ~ minecraft:light_weighted_pressure_plate if block ~ ~-1 ~ minecraft:quartz_block unless entity @e[distance=..3,type=minecraft:armor_stand,tag=EtiKontPS.3TeamBLAU] as @e[type=minecraft:armor_stand,tag=EtiKontPS.3TeamBLAU,tag=!EtiKontPS.3Etappe] run data merge entity @s {CustomName:'{"text":"Team BLAU","color":"blue","bold":true}',Tags:["EtiKontPS.3Alle","EtiKontPS.3TeamBLAU","EtiKontPS.3Etappe"]}

# Wenn Spieler der Teams auf Wägeplatten mit Quarzblöcken laufen und sich dort noch kein Kontrollpunkt befindet, wird ein neuer für das entsprechende Team erzeugt.
execute at @a[team=TMKontPS.3ROT] if block ~ ~ ~ minecraft:light_weighted_pressure_plate if block ~ ~-1 ~ minecraft:quartz_block unless entity @e[distance=..3,type=minecraft:armor_stand,tag=EtiKontPS.3TeamROT] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:true,Invisible:true,Marker:true,CustomNameVisible:true,CustomName:'{"text":">>Team ROT<<","color":"red","bold":true}',Tags:["EtiKontPS.3Alle","EtiKontPS.3TeamROT"] }
execute at @a[team=TMKontPS.3BLAU] if block ~ ~ ~ minecraft:light_weighted_pressure_plate if block ~ ~-1 ~ minecraft:quartz_block unless entity @e[distance=..3,type=minecraft:armor_stand,tag=EtiKontPS.3TeamBLAU] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:true,Invisible:true,Marker:true,CustomNameVisible:true,CustomName:'{"text":">>Team BLAU<<","color":"blue","bold":true}',Tags:["EtiKontPS.3Alle","EtiKontPS.3TeamBLAU"] }

# Wenn der Spieler auf einer Wägeplatte mit Quarzblock läuft bewegt sich der Kontrollpunkt mit, damit die letzte Ausrichtung mit gespeichert wird.
execute as @a[team=TMKontPS.3ROT] at @s if block ~ ~ ~ minecraft:light_weighted_pressure_plate if block ~ ~-1 ~ minecraft:quartz_block run teleport @e[distance=..3,type=minecraft:armor_stand,tag=EtiKontPS.3TeamROT] @s
execute as @a[team=TMKontPS.3BLAU] at @s if block ~ ~ ~ minecraft:light_weighted_pressure_plate if block ~ ~-1 ~ minecraft:quartz_block run teleport @e[distance=..3,type=minecraft:armor_stand,tag=EtiKontPS.3TeamBLAU] @s

# Wenn der Spieler auf Diamantblöcke läuft oder fällt, erhält den Wert eins, welchen er auch bekommen würde, wenn er das Totem aus dem Inventar durch Q wirft. Anschließend wird das Totem in seiner Umgebung entfernt und der Spieler wird zu dem Kontrollpunkt zurück teleportiert.
execute as @a[distance=..35,team=!] at @s if block ~ ~-1 ~ minecraft:diamond_block run scoreboard players set @s PZKontPS.3Wurf 1
execute at @a[scores={PZKontPS.3Wurf=1..}] run kill @e[distance=..3,type=item,nbt={Item:{tag:{kontrollpunkt-system:"v3gegenstand"} } },sort=nearest,limit=1]
clear @a[scores={PZKontPS.3Wurf=1..}] minecraft:totem_of_undying{kontrollpunkt-system:"v3gegenstand"}
teleport @a[team=TMKontPS.3ROT,scores={PZKontPS.3Wurf=1..}] @e[type=minecraft:armor_stand,tag=EtiKontPS.3TeamROT,tag=!EtiKontPS.3Etappe,sort=nearest,limit=1]
teleport @a[team=TMKontPS.3BLAU,scores={PZKontPS.3Wurf=1..}] @e[type=minecraft:armor_stand,tag=EtiKontPS.3TeamBLAU,tag=!EtiKontPS.3Etappe,sort=nearest,limit=1]

# Spieler die das Totem geworfen haben, erhalten das Totem in ihr Inventar zurück und der Wert wird wieder auf null gesetzt.
replaceitem entity @a[scores={PZKontPS.3Wurf=1..}] weapon.mainhand minecraft:totem_of_undying{kontrollpunkt-system:"v3gegenstand",display:{Name:'{"text":"Zurückkehren","color":"yellow","bold":true}',Lore:['"Wirf den Gegenstand mit Q"','"um zum letzten"','"Kontrollpunkt zurück zu kehren"']} }
scoreboard players set @a[scores={PZKontPS.3Wurf=1..}] PZKontPS.3Wurf 0

Variante 3: Stopp-Funktion
Die Stopp-Funktion löscht die beiden Teams und das Punktestand-Ziel, sowie den Parcours und alle Objekte mit entsprechenden Etikett.

Editor Icon kontrollpunkt-system:v3stopp.mcfunction
# Die beiden Teams werden wieder entfernt
team remove TMKontPS.3ROT
team remove TMKontPS.3BLAU

# Das Punktestand-Ziel wird entfernt
scoreboard objectives remove PZKontPS.3Wurf

# Das Totem mit bestimmter Eigenschaft wird entfernt.
clear @a minecraft:totem_of_undying{kontrollpunkt-system:"v3gegenstand"}

# Der Parcours wird wieder entfernt und die dabei droppenden Blöcke erhalten ein Etikett.
fill ~3 ~ ~-2 ~21 ~10 ~-19 minecraft:air replace
tag @e[dx=20,dy=20,dz=-20,type=minecraft:item,nbt={Item:{id:"minecraft:light_weighted_pressure_plate"} }] add EtiKontPS.3Alle

# Falls Gegenstände mit entsprechender Eigenschaft auf dem Boden liegen erhalten sie ein Etikett und alle Objekte mit diesem werden gelöscht.
tag @e[type=minecraft:item,nbt={Item:{tag:{kontrollpunkt-system:"v3gegenstand"} } }] add EtiKontPS.3Alle
kill @e[tag=EtiKontPS.3Alle]

Variante 4[]

Kontrollpunkt-System (Befehle) Bild 4.1 Kontrollpunkt-System (Befehle) Bild 4.2

Dieses Kontrollpunkt-System gibt Spielern in zwei Teams die Möglichkeit, diese zu erobern oder zu verlieren. Kontrollpunkte können eingenommen werden durch das bloße anwesend sein. Solange sich kein Spieler des Gegnerischen Teams dort aufhalten wird der Kontrollpunkt erobert. Man kann als Spieler des gleichen Teams zu einem Kontrollpunkt gehen und man erhält die Möglichkeit, zwischen den Kontrollpunkten zu wählen. Dazu erhält man im Chat die Option sich zum nächsten Kontrollpunkt zu teleportieren.

Einschalten
  • Befehl 4.1 Wenn der Hebel umgelegt wird, wird die Start-Funktion gestartet.
Wiederholen
  • Befehl 4.2 Beim Einschalten wird auch der Wiederhol-Befehlsblock gestartet, der jeden Tick die Zyklus-Funktion lädt.
Ausschalten
  • Befehl 4.3 Wenn der Hebel wieder in Ausgangsstellung zurück gelegt wird, wird die Stopp-Funktion ausgelöst und schaltet alles wieder ab.

Befehlsblöcke mit Befehlen:


Variante 4: Start-Funktion
Die Start-Funktion gibt den Spielern Kontrollpunkte in die Hand, erstellt zwei Teams und vier Punktestand-Ziele.

Editor Icon kontrollpunkt-system:v4start.mcfunction
# Spielern im Umkreis von 15 Metern werden 16 Rüstungsständer ins Inventar gelegt. Diese können platziert werden um Kontrollpunkte zu erstellen.
give @a[distance=..15] minecraft:armor_stand{kontrollpunkt-system:"v4gegenstand",Enchantments:[{id:-1}],display:{Name:'{"text":"Kontrollpunkt","bold":true}',Lore:['"Platziere den Rüstungsständer"','"um einen Kontrollpunkt zu bauen"','"und um zwischen"','"diesen zu wechseln"']},EntityTag:{Small:true,Invisible:true,NoGravity:true,CustomNameVisible:true,CustomName:'{"text":"Kontrollpunkt","bold":true}',Tags:["EtiKontPS.4Alle","EtiKontPS.4Kontrollpunkt","EtiKontPS.4Plattform"],Passengers:[{id:"minecraft:armor_stand",Small:true,Invisible:true,NoGravity:true,Tags:["EtiKontPS.4Alle","EtiKontPS.4TeamROT"]},{id:"minecraft:armor_stand",Small:true,Invisible:true,NoGravity:true,Tags:["EtiKontPS.4Alle","EtiKontPS.4TeamBLAU"] } ] } } 16

# Zwei Teams werden erstellt. Für rot und blau.
team add TMKontPS.4ROT ["Kontrollpunkt-System.4: ",{"text":"Team Rot","bold":true}]
team add TMKontPS.4BLAU ["Kontrollpunkt-System.4: ",{"text":"Team Blau","bold":true}]

# Die Teams bekommen ihre entsprechende Farbe.
team modify TMKontPS.4ROT color red
team modify TMKontPS.4BLAU color blue

# Vier Punktestand-Ziele für den Auslöser, die Drehung und die Spieleranzahl der Teams.
scoreboard objectives add PZKontPS.4Wert trigger ["Kontrollpunkt-System.4: ",{"text":"Werte der Variablen","bold":true}]
scoreboard objectives add PZKontPS.4Dreh dummy ["Kontrollpunkt-System.4: ",{"text":"Drehung","bold":true}]

scoreboard objectives add PZKontPS.4ROT dummy ["Kontrollpunkt-System.4: ",{"text":"Spieler Team Rot","bold":true}]
scoreboard objectives add PZKontPS.4BLAU dummy ["Kontrollpunkt-System.4: ",{"text":"Spieler Team Blau","bold":true}]

Variante 4: Zyklus-Funktion
Die Zyklus-Funktion steckt Spieler in eines der beiden Teams, ruft die Nummern-Funktion auf, wenn sie Nummern der Kontrollpunkte neu gesetzt werden müssen, ruft die Erobern-Funktion auf, ruft die Rauben-Funktion auf und gibt den Spielern die Möglichkeit zwischen den Kontrollpunkten zu teleportieren.

Editor Icon kontrollpunkt-system:v4zyklus.mcfunction
# An der Position aller Kontrollpunkte wird nach Spielern gesucht, die in keinen der beiden Teams sind. Diese Spieler erhalten ein Etikett.
execute at @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] as @p[distance=..5,tag=!EtiKontPS.4KeinTeam,team=!TMKontPS.4ROT,team=!TMKontPS.4BLAU] run tag @s add EtiKontPS.4KeinTeam

# Die aktuelle Anzahl der Spieler in den beiden Teams wird ausgelesen und in entsprechende Variablen gespeichert.
execute if entity @p[tag=EtiKontPS.4KeinTeam] store result score VarKontPS.4ROT PZKontPS.4Wert run team list TMKontPS.4ROT
execute if entity @p[tag=EtiKontPS.4KeinTeam] store result score VarKontPS.4BLAU PZKontPS.4Wert run team list TMKontPS.4BLAU

# Der Spieler kommt ins Team rot, falls dieses weniger oder gleich viel Mitglieder hat wie blau. Ansonsten kommt er in das blaue Team.
execute as @p[tag=EtiKontPS.4KeinTeam] if score VarKontPS.4ROT PZKontPS.4Wert <= VarKontPS.4BLAU PZKontPS.4Wert run team join TMKontPS.4ROT @s
execute as @p[tag=EtiKontPS.4KeinTeam] if score VarKontPS.4ROT PZKontPS.4Wert > VarKontPS.4BLAU PZKontPS.4Wert run team join TMKontPS.4BLAU @s

# Anschließend wird das Etikett wieder entfernt.
tag @p[tag=EtiKontPS.4KeinTeam] remove EtiKontPS.4KeinTeam

# Wenn ein Kontrollpunkt in Form eines Rüstunggständers platziert wurde, wird ihm ein Etikett gegeben und dadurch wird die Plattform durch einen Konstruktionsblock geladen. Er erhält zusätzlich den Wert null für die Drehung.
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Plattform] at @s if block ~ ~ ~ minecraft:air run tag @s remove EtiKontPS.4Plattform
scoreboard players set @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,tag=!EtiKontPS.4Plattform] PZKontPS.4Dreh 0
execute at @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,tag=!EtiKontPS.4Plattform] run setblock ~ ~ ~ minecraft:structure_block{mode:"LOAD",rotation:"NONE",posX:-4,posY:0,posZ:-4,name:"kontrollpunkt-system:v4kontrollpunkt"} replace
execute at @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,tag=!EtiKontPS.4Plattform] run setblock ~1 ~ ~ minecraft:redstone_block replace
tag @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,tag=!EtiKontPS.4Plattform] add EtiKontPS.4Plattform

# Die aktuelle Anzahl der Kontrollpunkte des Teams rot wird ausgelesen und in eine Variable gespeichert. Davor wird dieser Wert in eine Vergleichs-Variable gesteckt um einen Unterschied feststellen zu können. Wenn die Anzahl der Kontrollpunkte sich verändert hat, wird die Nummern-Funktion aufgerufen um allen Kontrollpunkten wieder neue Nummern zu vergeben.
scoreboard players operation #VarKontPS.4Vergleich PZKontPS.4Wert = #VarKontPS.4Anzahl PZKontPS.4ROT
execute store result score #VarKontPS.4Anzahl PZKontPS.4Wert store result score #VarKontPS.4Anzahl PZKontPS.4ROT if entity @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,team=TMKontPS.4ROT]
execute unless score #VarKontPS.4Vergleich PZKontPS.4Wert = #VarKontPS.4Anzahl PZKontPS.4ROT as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,team=TMKontPS.4ROT,sort=nearest,limit=1] run function kontrollpunkt-system:v4nummern

# Die aktuelle Anzahl der Kontrollpunkte des Teams blau wird ausgelesen und in eine Variable gespeichert. Davor wird dieser Wert in eine Vergleichs-Variable gesteckt um einen Unterschied feststellen zu können. Wenn die Anzahl der Kontrollpunkte sich verändert hat, wird die Nummern-Funktion aufgerufen um allen Kontrollpunkten wieder neue Nummern zu vergeben.
scoreboard players operation #VarKontPS.4Vergleich PZKontPS.4Wert = #VarKontPS.4Anzahl PZKontPS.4BLAU
execute store result score #VarKontPS.4Anzahl PZKontPS.4Wert store result score #VarKontPS.4Anzahl PZKontPS.4BLAU if entity @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,team=TMKontPS.4BLAU]
execute unless score #VarKontPS.4Vergleich PZKontPS.4Wert = #VarKontPS.4Anzahl PZKontPS.4BLAU as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,team=TMKontPS.4BLAU,sort=nearest,limit=1] run function kontrollpunkt-system:v4nummern

# Von allen Kontrollpunkten aus, wird die aktuelle Anzahl der Spieler die im Teeam rot und balu sind ausgelesen und in einen Punktestand gespeichert.
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] at @s store result score @s PZKontPS.4ROT if entity @a[distance=..5,gamemode=!spectator,team=TMKontPS.4ROT]
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] at @s store result score @s PZKontPS.4BLAU if entity @a[distance=..5,gamemode=!spectator,team=TMKontPS.4BLAU]

# Wenn die Kontrollpunkte keine Drehung mehr besitzen, also den Wert null tragen, wird ihen das Etikett des jeweiligen Teams entfernt, falls sie dieses besaßen.
tag @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,tag=EtiKontPS.4ROT,scores={PZKontPS.4Dreh=0}] remove EtiKontPS.4ROT
tag @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,tag=EtiKontPS.4BLAU,scores={PZKontPS.4Dreh=0}] remove EtiKontPS.4BLAU

# Wenn sich Spieler nur eines Teams bei einem unbesetzten Kontrollpunkt befunden haben, wird diesen das entsprechende Etikett des Teams verliehen und gleichzeitig erhalten sie den Wert eins als Erfolg davon für die Drahung, damit die weitere Erfassung erfolgen kann.
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,tag=!EtiKontPS.4ROT,scores={PZKontPS.4ROT=1..,PZKontPS.4BLAU=0,PZKontPS.4Dreh=0}] store success score @s PZKontPS.4Dreh run tag @s add EtiKontPS.4ROT
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,tag=!EtiKontPS.4BLAU,scores={PZKontPS.4ROT=0,PZKontPS.4BLAU=1..,PZKontPS.4Dreh=0}] store success score @s PZKontPS.4Dreh run tag @s add EtiKontPS.4BLAU

# Wenn das entsprechende Team dabei ist den Kontrollpunkt zu erobern, wird die Erobern-Funktion aufgerufen. Dies geschieht allerdings nur wenn kein Spieler des gegnerischen Teams anwesend ist.
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,tag=EtiKontPS.4ROT,scores={PZKontPS.4ROT=1..,PZKontPS.4BLAU=0,PZKontPS.4Dreh=1..359}] at @s run function kontrollpunkt-system:v4erobern
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,tag=EtiKontPS.4BLAU,scores={PZKontPS.4ROT=0,PZKontPS.4BLAU=1..,PZKontPS.4Dreh=1..359}] at @s run function kontrollpunkt-system:v4erobern

# Wenn gegenerische Spieler bei einem Kontrollpunkt sind, wird die Rauben-Funktion aufgeruden.
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,tag=EtiKontPS.4ROT,scores={PZKontPS.4ROT=0,PZKontPS.4BLAU=1..,PZKontPS.4Dreh=1..360}] at @s run function kontrollpunkt-system:v4rauben
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,tag=EtiKontPS.4BLAU,scores={PZKontPS.4ROT=1..,PZKontPS.4BLAU=0,PZKontPS.4Dreh=1..360}] at @s run function kontrollpunkt-system:v4rauben

# Spieler die am gewünschten Ort sind, klicken auf den Auslöser um den Kontrollpunkt zu verlassen und dadurch erhält der Spieler den Punkt -99
execute at @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] run gamemode adventure @a[distance=..3,gamemode=spectator,scores={PZKontPS.4Wert=-99}]
execute as @a[tag=EtiKontPS.4Nachricht] at @s unless entity @e[distance=..3,type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] run tag @s remove EtiKontPS.4Nachricht
execute as @a[scores={PZKontPS.4Wert=-99}] at @s unless entity @e[distance=..3,type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] run scoreboard players reset @s PZKontPS.4Wert

# Spieler mit dem Punkt -2 möchten zum nächsten Kontrollpunkt teleportiert werden. Daraufhin wird der aktuelle Wert des Kontrollpunktes dem Spieler übergeben. Anschließend wird der Wert um eins erhöht, damit er den Wert des nächsten Kontrollpunkt besitzt.
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] at @s run scoreboard players operation @a[distance=..2,gamemode=spectator,scores={PZKontPS.4Wert=-2}] PZKontPS.4Wert = @s PZKontPS.4Wert
scoreboard players add @a[gamemode=spectator,scores={PZKontPS.4Wert=1..}] PZKontPS.4Wert 1

# Falls der Spieler jedoch einen Wert besitzt der höher ist, als es aktuell rote Kontrollpunkte gibt, wird der Wert wieder auf eins zurückgesetzt.
execute as @a[gamemode=spectator,team=TMKontPS.4ROT,scores={PZKontPS.4Wert=1..}] if score @s PZKontPS.4Wert > #VarKontPS.4Anzahl PZKontPS.4ROT run scoreboard players set @s PZKontPS.4Wert 1
execute as @a[gamemode=spectator,team=TMKontPS.4ROT,scores={PZKontPS.4Wert=1..}] at @s as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,team=TMKontPS.4ROT] if score @s PZKontPS.4Wert = @p PZKontPS.4Wert run teleport @p @s

# Falls der Spieler jedoch einen Wert besitzt der höher ist, als es aktuell blaue Kontrollpunkte gibt, wird der Wert wieder auf eins zurückgesetzt.
execute as @a[gamemode=spectator,team=TMKontPS.4BLAU,scores={PZKontPS.4Wert=1..}] if score @s PZKontPS.4Wert > #VarKontPS.4Anzahl PZKontPS.4BLAU run scoreboard players set @s PZKontPS.4Wert 1
execute as @a[gamemode=spectator,team=TMKontPS.4BLAU,scores={PZKontPS.4Wert=1..}] at @s as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,team=TMKontPS.4BLAU] if score @s PZKontPS.4Wert = @p PZKontPS.4Wert run teleport @p @s

# Der Auslöse-Punktestand wird für alle Spieler die noch im Zuschauermodus sind auf null zurückgesetzt, falls sie den Auslöser bereits ausgelöst hatten
execute at @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] run scoreboard players set @a[distance=..2,gamemode=spectator,scores={PZKontPS.4Wert=1..}] PZKontPS.4Wert 0

# Wenn sich ein Spieler dem Kontrollpunkt nähert ohne dass er zuvor durch einen anderen Kontrollpunkt im Zuschauermodus dort hingelangte, so wird er in den Zuschauermodus gesetzt und rotiert. Dies jedoch nur wenn der Spieler im gleichen Team wie der Kontrollpunkt ist.
execute at @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,team=TMKontPS.4ROT] as @a[distance=..2,gamemode=!spectator,team=TMKontPS.4ROT] unless score @s PZKontPS.4Wert matches -99 run gamemode spectator @s
execute at @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,team=TMKontPS.4BLAU] as @a[distance=..2,gamemode=!spectator,team=TMKontPS.4BLAU] unless score @s PZKontPS.4Wert matches -99 run gamemode spectator @s
execute as @a[gamemode=spectator] at @s positioned as @e[distance=..2,type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,sort=nearest,limit=1] run teleport @s ~ ~1 ~ ~1 ~

# Alle Spieler die sich im Zuschauermodus in der Nähe des Kontrollpunktes befinden erhalten die Auslöser-Möglichkeit und die Auswahl-Nachricht
execute at @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] run scoreboard players enable @a[distance=..2,gamemode=spectator,tag=!EtiKontPS.4Nachricht] PZKontPS.4Wert
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] at @s run tellraw @a[distance=..2,gamemode=spectator,tag=!EtiKontPS.4Nachricht] ["Kontrollpunkt.4:\n",{"text":"Drücke 'T' um in die Chatleiste zu gelangen\n","bold":true},{"text":" [x]","color":"red","hoverEvent":{"action":"show_text","value":{"text":"Klicke hier um hier zu bleiben"} },"clickEvent":{"action":"run_command","value":"/trigger PZKontPS.4Wert set -99"} },{"text":" Kontrollpunkt-Auswahl ","color":"gold","bold":true},{"score":{"name":"@s","objective":"PZKontPS.4Wert"},"color":"dark_purple","bold":true},{"text":" [→]","color":"green","hoverEvent":{"action":"show_text","value":{"text":"Klicke für den nächsten Kontrollpunkt"} },"clickEvent":{"action":"run_command","value":"/trigger PZKontPS.4Wert set -1"} }]

# Jeder der die Auswahl-Nachricht erhalten hat, erhält auch ein Etikett und dieses wird entfernt, wenn er sich zu einem anderen Kontrollpunkt teleportiert hat, damit er wieder eine erhält
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] at @s run tag @a[distance=..2,gamemode=spectator,tag=!EtiKontPS.4Nachricht] add EtiKontPS.4Nachricht
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] at @s run tag @a[distance=..2,gamemode=spectator,tag=EtiKontPS.4Nachricht,scores={PZKontPS.4Wert=-1}] remove EtiKontPS.4Nachricht
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] at @s run scoreboard players set @a[distance=..2,gamemode=spectator,tag=!EtiKontPS.4Nachricht,scores={PZKontPS.4Wert=-1}] PZKontPS.4Wert -2

# Um den Kontrollpunkt zu entfernen wirft man einen Kontrollpunkt in Form eines Rüstungsständer in die Nähe des Kontrollpunktes, so verschwindet er und man erhält ihn in dem Drop
execute at @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] run data merge entity @e[distance=..3,type=minecraft:item,nbt={Item:{id:"minecraft:armor_stand",Count:1b,tag:{kontrollpunkt-system:"v4gegenstand"} } },sort=nearest,limit=1] {Item:{Count:2b},Tags:["EtiKontPS.4Gegenstand"]}
execute at @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] if entity @e[distance=..3,type=minecraft:item,tag=EtiKontPS.4Gegenstand] run fill ~-4 ~ ~-4 ~4 ~ ~4 minecraft:air replace
execute as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] at @s if entity @e[distance=..3,type=minecraft:item,tag=EtiKontPS.4Gegenstand] run kill @s

Variante 4: Nummern-Funktion
Die Nummern-Funktion gibt jedem Kontrollpunkt eines Teams eine Nummer ab eins aufwärts. Dabei wird diese Funktion selbst aufgerufen, bis die aktuelle Nummer die der maximalen Anzahl erreicht hat.

Editor Icon kontrollpunkt-system:v4nummern.mcfunction
# Der Rüstungsständer erhält eine Nummer von der Nummern-Variable die jedesmal um eins erhöht wird. Anschließend erhält der Rüstungsständer ein Etikett um zu markieren, dass er die Nummer besitzt.
execute store result score @s PZKontPS.4Wert run scoreboard players add #VarKontPS.4AktuelleNummer PZKontPS.4Wert 1
tag @s add EtiKontPS.4KontrollpunktNummer

# Wenn der Rüstungsständer im roten Team ist, wird die Nummern-Funktion durch einen roten Kontrollpunkt selbst aufgerufen, wenn der aktuelle Nummernwert kleiner als die Gesamtanzahl der vorhandenen Kontrollpunkte ist.
execute if entity @s[team=TMKontPS.4ROT] if score #VarKontPS.4AktuelleNummer PZKontPS.4Wert < #VarKontPS.4Anzahl PZKontPS.4Wert as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,team=TMKontPS.4ROT,tag=!EtiKontPS.4KontrollpunktNummer,sort=nearest,limit=1] run function kontrollpunkt-system:v4nummern

# Wenn der Rüstungsständer im blauen Team ist, wird die Nummern-Funktion durch einen blauen Kontrollpunkt selbst aufgerufen, wenn der aktuelle Nummernwert kleiner als die Gesamtanzahl der vorhandenen Kontrollpunkte ist.
execute if entity @s[team=TMKontPS.4BLAU] if score #VarKontPS.4AktuelleNummer PZKontPS.4Wert < #VarKontPS.4Anzahl PZKontPS.4Wert as @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt,team=TMKontPS.4BLAU,tag=!EtiKontPS.4KontrollpunktNummer,sort=nearest,limit=1] run function kontrollpunkt-system:v4nummern

# Wenn der aktuelle Nummernwert doch größer als die maximale Anzahl ist, werden die Etiketten wieder entfernt und die aktuelle Nummer wieder auf null gesetzt.
execute if score #VarKontPS.4AktuelleNummer PZKontPS.4Wert >= #VarKontPS.4Anzahl PZKontPS.4Wert run tag @e[type=minecraft:armor_stand,tag=EtiKontPS.4KontrollpunktNummer] remove EtiKontPS.4KontrollpunktNummer
execute if score #VarKontPS.4AktuelleNummer PZKontPS.4Wert >= #VarKontPS.4Anzahl PZKontPS.4Wert run scoreboard players set #VarKontPS.4AktuelleNummer PZKontPS.4Wert 0

Variante 4: Erobern-Funktion
Die Erobern-Funktoin lässt den Kontrollpunkt kreisen und dabei wird der Boden in die Farbe des entsprechenden Teams gefärbt.

Editor Icon kontrollpunkt-system:v4erobern.mcfunction
# Der Kontrollpunkt wird nach rechts rotiert.
teleport @s ~ ~ ~ ~1 ~

# Wenn der Kontrollpunkt rot ist, wird roter Beton platziert, sonst blauer Beton.
execute if entity @s[tag=EtiKontPS.4ROT] run fill ^1 ^ ^ ^4 ^ ^ minecraft:red_concrete replace
execute if entity @s[tag=EtiKontPS.4BLAU] run fill ^1 ^ ^ ^4 ^ ^ minecraft:blue_concrete replace

# Der Wert der Drehung wird um eins erhöht.
scoreboard players add @s PZKontPS.4Dreh 1

# Wenn die Drehung 360° erreicht hat, wird der Kontrollpunkt in das entsprechende Team gesteckt.
execute if entity @s[tag=EtiKontPS.4ROT,scores={PZKontPS.4Dreh=360}] run team join TMKontPS.4ROT @s
execute if entity @s[tag=EtiKontPS.4BLAU,scores={PZKontPS.4Dreh=360}] run team join TMKontPS.4BLAU @s

Variante 4: Rauben-Funktion
Die Rauben-Funktion lässt den Kontrollpunkt wieder zurück kreisen und dabei wird die Farbe des Bodens vom Teams wieder neutralisiert.

Editor Icon kontrollpunkt-system:v4rauben.mcfunction
# Der Kontrollpunkt wird nach links gedreht.
teleport @s ~ ~ ~ ~-1 ~

# Es werden graue Betonblöcke platziert um die Teamfarbe zu beseitigen.
fill ^1 ^ ^ ^4 ^ ^ minecraft:light_gray_concrete replace

# Die Drehung wird um eins reduziert.
scoreboard players remove @s PZKontPS.4Dreh 1

# Wenn der Kontrollpunkt den Wert null für die Drehung erreicht hat, wird er aus dem Team geschmissen.
execute if entity @s[scores={PZKontPS.4Dreh=0}] run team leave @s

Variante 4: Stopp-Funktion
Die Stopp-Funktion entfernt die zwei Teams und die vier Punktestand-Ziel und entfernt alle Kontrollpunkte und damit verbundene Objekte.

Editor Icon kontrollpunkt-system:v4stopp.mcfunction
# Die beiden Teams werden entfernt.
team remove TMKontPS.4ROT
team remove TMKontPS.4BLAU

# Die vier Punktestand-Ziele werden entfernt.
scoreboard objectives remove PZKontPS.4Wert
scoreboard objectives remove PZKontPS.4Dreh

scoreboard objectives remove PZKontPS.4ROT
scoreboard objectives remove PZKontPS.4BLAU

# Die Rüstungsständer mit entsprechenden Eigenschaft werden aus dem Inventar gelöscht.
clear @a minecraft:armor_stand{kontrollpunkt-system:"v4gegenstand"}

# Die Kontrollpunkte werden durch Luft ersetzt.
execute at @e[type=minecraft:armor_stand,tag=EtiKontPS.4Kontrollpunkt] run fill ~-4 ~ ~-4 ~4 ~ ~4 minecraft:air replace

# Gegenstände die auf dem Boden geworfen wurden, erhalten ein Etikett und alle Objekte mit diesem Etikett werden entfernt.
tag @e[type=minecraft:item,nbt={Item:{id:"minecraft:armor_stand",tag:{kontrollpunkt-system:"v4gegenstand"} } }] add EtiKontPS.4Alle
kill @e[tag=EtiKontPS.4Alle]
Advertisement