Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| gf2:projekte:minecraft:2d1gruppe1 [2023/02/05 16:42] – emmeneggerm | gf2:projekte:minecraft:2d1gruppe1 [2023/02/26 07:31] (aktuell) – marroc | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | <code python> | + | <code python |
| X=0 | X=0 | ||
| Y=0 | Y=0 | ||
| Zeile 10: | Zeile 10: | ||
| Hind3=False | Hind3=False | ||
| Hind4=False | Hind4=False | ||
| - | Hind5=False | + | Hind5=False |
| Hind6=False | Hind6=False | ||
| zaehler2=1 | zaehler2=1 | ||
| Zeile 38: | Zeile 38: | ||
| blocks.place(AIR, | blocks.place(AIR, | ||
| blocks.place(AIR, | blocks.place(AIR, | ||
| - | | + | |
| def dialog1(): # Text an Spieler einige Zeilen angenehmer zum Lesen | def dialog1(): # Text an Spieler einige Zeilen angenehmer zum Lesen | ||
| player.say(" | player.say(" | ||
| Zeile 56: | Zeile 56: | ||
| if (zaehler==4): | if (zaehler==4): | ||
| player.say(" | player.say(" | ||
| + | |||
| if (zaehler==5): | if (zaehler==5): | ||
| player.say(" | player.say(" | ||
| Zeile 68: | Zeile 68: | ||
| - | def on_travelled_walk(): | + | def on_travelled_walk(): |
| - | x = player.position().get_value(Axis.X) | + | x = player.position().get_value(Axis.X) |
| z = player.position().get_value(Axis.Y) | z = player.position().get_value(Axis.Y) | ||
| y = player.position().get_value(Axis.Z) | y = player.position().get_value(Axis.Z) | ||
| Zeile 79: | Zeile 79: | ||
| global Teil2 | global Teil2 | ||
| Teil2 = True | Teil2 = True | ||
| - | if (x==X+10) and (z>Z-1): | + | if (x==X+10) and (z>Z-1):# Raum 2 schweben |
| mobs.apply_effect(LEVITATION, | mobs.apply_effect(LEVITATION, | ||
| - | if (x==X+13) and (Z+14==z): | + | if (x==X+13) and (Z+14==z): |
| player.execute(" | player.execute(" | ||
| - | if ((X+21==x) or (x==X+22)) and ((Y+5==y) or (Y+6==y)) and (z==Z+14): | + | if ((X+21==x) or (x==X+22)) and ((Y+5==y) or (Y+6==y)) and (z==Z+14):# Ab hier, die bewegenden |
| - | global Hind1 | + | global Hind1 |
| - | Hind1=False | + | Hind1=False |
| - | global Hind2 | + | global Hind2 |
| - | Hind2= True | + | Hind2= True # die neue Funktion wird aktiviert |
| - | player.execute(" | + | player.execute(" |
| if (z==Z+10) and (X+23==x) or (X+24==x) and (y==Y+20) or (y==Y+21): | if (z==Z+10) and (X+23==x) or (X+24==x) and (y==Y+20) or (y==Y+21): | ||
| global Hind2 | global Hind2 | ||
| Zeile 95: | Zeile 95: | ||
| Hind3= True | Hind3= True | ||
| player.execute(" | player.execute(" | ||
| - | if (zaehler2==1): | + | if (zaehler2==1): |
| global zaehler2 | global zaehler2 | ||
| zaehler2= zaehler2 +2 | zaehler2= zaehler2 +2 | ||
| Zeile 131: | Zeile 131: | ||
| | | ||
| - | def blöckebewegen (M, | + | def blöckebewegen (M, |
| running = True | running = True | ||
| intervall=1 | intervall=1 | ||
| Zeile 148: | Zeile 148: | ||
| intervall= intervall + 1 | intervall= intervall + 1 | ||
| - | def blöckebewegen2 (M, | + | def blöckebewegen2 (M, |
| running = True | running = True | ||
| intervall=1 | intervall=1 | ||
| Zeile 164: | Zeile 164: | ||
| z2=z2+richz | z2=z2+richz | ||
| intervall= intervall + 1 | intervall= intervall + 1 | ||
| + | |||
| def blöckebewegen3 (M, | def blöckebewegen3 (M, | ||
| running = True | running = True | ||
| Zeile 189: | Zeile 189: | ||
| blocks.fill(STONE, | blocks.fill(STONE, | ||
| blocks.place(OBSIDIAN, | blocks.place(OBSIDIAN, | ||
| - | while Hind1: | + | while Hind1: |
| blöckebewegen(STONE_BRICKS, | blöckebewegen(STONE_BRICKS, | ||
| while Hind2: | while Hind2: | ||
| Zeile 209: | Zeile 209: | ||
| player.say(" | player.say(" | ||
| player.say(" | player.say(" | ||
| - | player.say(" | + | player.say(" |
| player.say(" | player.say(" | ||
| - | player.say(" | + | player.say(" |
| - | + | ||
| - | def antworttod(): | + | def antworttod(): |
| player.teleport(world(X+11, | player.teleport(world(X+11, | ||
| player.execute(" | player.execute(" | ||
| player.say(" | player.say(" | ||
| player.say(" | player.say(" | ||
| - | player.say(" | + | player.say(" |
| - | player.say(" | + | player.say(" |
| mobs.apply_effect(HUNGER, | mobs.apply_effect(HUNGER, | ||
| mobs.apply_effect(FIRE_DAMAGE, | mobs.apply_effect(FIRE_DAMAGE, | ||
| Zeile 227: | Zeile 227: | ||
| mobs.give(mobs.target(NEAREST_PLAYER), | mobs.give(mobs.target(NEAREST_PLAYER), | ||
| n=n+1 | n=n+1 | ||
| - | | + | |
| - | def antwortend(): | + | def antwortend(): |
| - | player.say(" | + | player.say(" |
| player.teleport(positions.ground_position(pos(0, | player.teleport(positions.ground_position(pos(0, | ||
| - | | + | |
| spielbediungen() | spielbediungen() | ||
| raum1() | raum1() | ||
| Zeile 287: | Zeile 287: | ||
| Wir haben den Code kopiert und in verschiedenen Welten ausgeführt. Es zeigte sich, dass die Spawnpoints, | Wir haben den Code kopiert und in verschiedenen Welten ausgeführt. Es zeigte sich, dass die Spawnpoints, | ||
| + | |||
| + | ===== Presentation ===== | ||
| + | https:// | ||
| + | |||