In diesem Code ist ein Fehler. Man wählt vorher aus welches Objekt man erstellen will und wie viele. In diesem Code soll das Objekt erstellt, und eine Variable verringert werden, aber es passiert nichts. Woran kann das liegen
Alles anzeigen
GML-Quellcode
- if (global.anzahl1 > 0)
- {switch(global.Spieler1base)
- {
- case 1:
- instance_create(mouse_x,mouse_y,s1base1);
- global.anzahl1 -= 1;
- break;
- case 2:
- instance_create(mouse_x,mouse_y,s1base2);
- global.anzahl1 -= 1;
- break;
- case 3:
- instance_create(mouse_x,mouse_y,s1base3);
- global.anzahl1 -= 1;
- break;
- case 4:
- instance_create(mouse_x,mouse_y,s1base4);
- global.anzahl1 -= 1;
- break;
- case 5:
- instance_create(mouse_x,mouse_y,s1base5);
- global.anzahl1 -= 1;
- break;
- }}
- else
- {if (global.anzahl2 > 0)
- {switch(global.Spieler2base)
- {
- case 1:
- instance_create(mouse_x,mouse_y,s2base1);
- global.anzahl2 -= 1;
- break;
- case 2:
- instance_create(mouse_x,mouse_y,s2base2);
- global.anzahl2 -= 1;
- break;
- case 3:
- instance_create(mouse_x,mouse_y,s2base3);
- global.anzahl2 -= 1;
- break;
- case 4:
- instance_create(mouse_x,mouse_y,s2base4);
- global.anzahl2 -= 1;
- break;
- case 5:
- instance_create(mouse_x,mouse_y,s2base5);
- global.anzahl2 -= 1;
- break;
- }}
- else
- instance_change(schlacht,1);
- }
"Is this one sloshing?"
Four words you don't want to hear when you pick up a coffin...
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von wolff ()