ERLEDIGT
NEIN
NEIN
ANTWORTEN
1
1
ZUGRIFFE
464
464
EMPFEHLEN
-
Hallo liebe Leute !
Unsere kleine Gruppe programmiert für eine Animationsnote ein Pacman-Spiel. Nun sind wir doch recht weit gekommen. Jedoch hapert es noch an ein paar Kleinigkeiten.
Könnte sich das vielleicht mal jemand von euch ansehen ? Wir sitzen nun schon ziemlich lange an dem Problem und der Abgabetermin rückt immer näher.
Es geht darum, dass der Punktestand ermittelt wird aus Zeitpunkten und Sammelpunkten im Level. Die Zeit zählt er anständig nach jedem Level dazu, jedoch funktioniert das mit den Sammelpuntken ab Level 2 nicht mehr.... intern (trace) gibt er jeweils 10 Punkte für einen Sammelpunkt her, es erscheint aber nicht am aktuellen Gesamtstand im Spiel und auch nicht nach dem Level.
So siehts aus...
LEVEL1:
im AS: _root.punkte = 0;
_root.buchpunkte = _root.punkte;
im Labyrinth: //Kollision mit "Futterpunkten"
if(hitTest(_root["buch"+1]) && _root["buch"+1]._visible==true){
_root.buchsound.Start();
_root["buch"+1]._visible=false;
_root.punkte+=10;
_root.buchpunkte=_root.punkte;
_root.buch2._visible=true;
}
if(hitTest(_root["buch"+2]) && _root["buch"+2]._visible==true){
_root.buchsound.Start();
_root["buch"+2]._visible=false;
_root.punkte+=10;
_root.buchpunkte=_root.punkte;
_root.pfeil._visible=true;
}
im LEVEL2:
im AS: _root.anfangspunkte2 = _root.zeit1 + _root.buchpunkte;
_root.punktestand2 = _root.anfangspunkte2 + _root.buchpunkte2;
_root.gesamtbuch2 = _root.punktestand2;
im Labyrinth: //Kollision mit "Futterpunkten"
if(hitTest(_root["buch"+1]) && _root["buch"+1]._visible==true){
_root.buchsound.Start();
_root["buch"+1]._visible=false;
_root.punkte+=10;
_root.buchpunkte2=_root.punkte;
_root.buch2._visible=true;
}
if(hitTest(_root["buch"+2]) && _root["buch"+2]._visible==true){
_root.buchsound.Start();
_root["buch"+2]._visible=false;
_root.punkte+=10;
_root.buchpunkte2 = _root.punkte;
_root.buch3._visible=true;
}
if(hitTest(_root["buch"+3]) && _root["buch"+3]._visible==true){
_root.buchsound.Start();
_root["buch"+3]._visible=false;
_root.punkte+=10;
_root.buchpunkte2 = _root.punkte;
_root.pfeil._visible=true;
}
Im LEVEL 3:
im AS: _root.anfangspunkte3 = _root.zeit2 + _root.gesamtbuch2;
_root.punktestand3 = _root.anfangspunkte3 + _root.buchpunkte3;
_root.gesamtbuch3 = _root.punktestand3;
im Labyrinth: //Kollision mit "Futterpunkten"
if(hitTest(_root["buch"+1]) && _root["buch"+1]._visible==true){
_root.buchsound.Start();
_root["buch"+1]._visible=false;
_root.punkte+=10;
_root.buchpunkte3=_root.punkte;
_root.buch2._visible=true;
}
if(hitTest(_root["buch"+2]) && _root["buch"+2]._visible==true){
_root.buchsound.Start();
_root["buch"+2]._visible=false;
_root.punkte+=10;
_root.buchpunkte3=_root.punkte;
_root.buch3._visible=true;
}
if(hitTest(_root["buch"+3]) && _root["buch"+3]._visible==true){
_root.buchsound.Start();
_root["buch"+3]._visible=false;
_root.punkte+=10;
_root.buchpunkte3=_root.punkte;
_root.buch4._visible=true;
}
if(hitTest(_root["buch"+4]) && _root["buch"+4]._visible==true){
_root.buchsound.Start();
_root["buch"+4]._visible=false;
_root.punkt+=10;
_root.buchpunkte3=_root.punkte;
_root.pfeil._visible=true;
Übergabewert Gesamtstand:
_root.gesamt = gesamtbuch3 + zeit3;
-
Hi,
1. Bitte editiere Deinen Beitrag noch einmal und setze das Script in PHP- oder Code-Tags. So ist das ja kaum lesbar.
2. Hänge möglichst auch die Datei an, denn es ist (meiner Erfahrung nach) fast unmöglich, einen Film zu debuggen, von dem man nur einen Scriptausschnitt sieht, ohne über die Struktur der Objekte, Zeitleisten o.ä. bescheid zu wissen.
3. hast Du es schonmal mit einer globalen Variable für die Punkte versucht?
Gruß
.
Ähnliche Themen
-
Probleme mit Pacman
Von Rexinator im Forum Swing, Java2D/3D, SWT, JFaceAntworten: 6Letzter Beitrag: 03.02.11, 16:19 -
Ein paar Problemchen mit Javascript Prototype
Von grünes-huhn im Forum Javascript & AjaxAntworten: 3Letzter Beitrag: 24.09.10, 11:52 -
Ein Paar Modelle für ein spiel
Von Mummuh im Forum Stellenangebote (unentgeltlich)Antworten: 0Letzter Beitrag: 30.05.08, 23:56 -
Pacman-Spiel in Falsh !
Von problem im Forum Flash PlattformAntworten: 3Letzter Beitrag: 13.05.05, 12:40 -
Künstliche Intelligenz in PacMan
Von Goy im Forum Delphi, Kylix, PascalAntworten: 7Letzter Beitrag: 20.07.03, 14:46





Zitieren
Login





