-
Drachentöter
Power Patch, DynRPG mit Tastatur-&Maus-Plugin, Power Mode 2003
@Animation: Ich würde es so machen:
Am Anfang alle Animationsframes gleichzeitig anzeigen, mit Transparenz 100%.
Bei jedem Frame (= in einem Loop mit Wait 0.0 bzw. in einem Parallel Process ohne Wait 0.0, weil ein PP einen impliziten 1-Frame-Wait am Ende hat):
Eine Variable ("Framecounter") jeden Frame um 1 erhöhen.
Framecounter in eine andere Variable ("Animationsframenummer") kopieren
Animationsframenummer durch Geschwindigkeit der Animation dividieren (in (Spiel)Frames, z.B. 6 für 6/60=0,1 Sekunde pro Animationsframe)
Animationsframenummer modulo Anzahl der Animationsframes rechnen
Alle Animationsframebilder mit Move Picture an die aktuelle Mausposition verschieben (ohne Wartezeit), dabei aber für jedes Animationsframe einen Branch machen ob Animationsframenummer 0 (fürs erste Frame), 1 (fürs zweite Frame), etc. ist - wenn ja, Transparenz 0% verwenden, sonst Transparent 100%.
Pseudocode:
ANZEIGEN DER BILDER (bei Spielstart/Mapwechsel):
Show Picture #1, AniFrame1, 100% Trans
Show Picture #2, AniFrame2, 100% Trans
Show Picture #3, AniFrame3, 100% Trans
AKTUALISIEREN DER BILDER (in einem Loop mit Wait 0.0, oder in einem PP ohne Wait 0.0):
Change Var Framecounter += 1
Branch If Framecounter == 9999999 <<<< Das ist nur ein Überlaufschutz, ansonsten würde der Mauszeiger nach ~46 Stunden Spielzeit nicht mehr animieren
..Change Var Framecounter = 0
End Case
Change Var Animationsframenummer = Framecounter
Change Var Animationsframenummer /= 9 (Geschwindigkeit = 9/60=0,15 Sekunden pro Animationsframe)
Change Var Animationsframenummer Mod= 3 (Anzahl Animationsframes)
Branch If Animationsframenummer == 0
..Move Picture #1, MausX/MausY, 0% Trans
Else Case
..Move Picture #1, MausX/MausY, 100% Trans
End Case
Branch If Animationsframenummer == 1
..Move Picture #2, MausX/MausY, 0% Trans
Else Case
..Move Picture #2, MausX/MausY, 100% Trans
End Case
Branch If Animationsframenummer == 2
..Move Picture #3, MausX/MausY, 0% Trans
Else Case
..Move Picture #3, MausX/MausY, 100% Trans
End Case
--
Mir war nichtmal bewusst dass ich nominiert wurde, aber: Cool! Hälfte des Lobes muss aber unbedingt an Archeia!
Geändert von Cherry (19.02.2013 um 12:37 Uhr)
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
-
Foren-Regeln