Hallo,
Ich habe ein Problem mit dem laufen und Springenin meinem
2D Shooter und zwar klappt z.b das laufen grundsätzlich ganz gut, aber wenn ich erst
in eine Richtung laufe, dann die Pheiltaste in die entgegengesetzte Richtung dazu noch drück und sie dann loslasse, geht mein Spieler plötzlich rückwerts.
Und auch beim Springen habe ich ein kleines Problem und zwar, dass ich
seltsamerweise manchmal manchmal 2mal springen (Pfeil oben drüken muss bis er wirklich springt)
Da ich mit Drag und Drop gearbeitet habe kann ich hier nicht den Quellcode hosten
Aber hier mal ein Ausschnitt aus der Information des Spielers
Information about object: Spieler
Sprite: spieler still
Solid: true
Visible: true
Depth: -1000
Persistent: false
Parent: <no parent>
Mask: <same as sprite>
Create Event:
set the gravity to 2 in direction 270
set variable can_shoot to 1
set variable global.ri to 0
set variable global.waf to 1
Alarm Event for alarm 0:
set variable can_shoot to 1
Step Event:
if y is smaller than 250
set the gravity to 1 in direction 270
if y is larger than 304
set the vertical speed to 0
set the gravity to 0 in direction 270
set the health to global.pistole
Collision Event with object ground:
set the gravity to 4 in direction 270
Collision Event with object gegner1:
play sound tot; looping: false
destroy the instance
create instance of object spieler tot at relative position (0,0)
Collision Event with object gegner1_tot:
bounce not precisely against solid objects
Collision Event with object waffe2 power up:
play sound power up; looping: false
destroy the instance
for other object: destroy the instance
create instance of object spieler_waffe2 at relative position (0,0)
set variable global.w2 to 100
Collision Event with object Münze:
set variable global.money relative to 2
for other object: destroy the instance
play sound Münze; looping: false
In anhang mal die Komplette Gm datei hoffe mir jemand helfen.
Ich habe ein Problem mit dem laufen und Springenin meinem
2D Shooter und zwar klappt z.b das laufen grundsätzlich ganz gut, aber wenn ich erst
in eine Richtung laufe, dann die Pheiltaste in die entgegengesetzte Richtung dazu noch drück und sie dann loslasse, geht mein Spieler plötzlich rückwerts.
Und auch beim Springen habe ich ein kleines Problem und zwar, dass ich
seltsamerweise manchmal manchmal 2mal springen (Pfeil oben drüken muss bis er wirklich springt)
Da ich mit Drag und Drop gearbeitet habe kann ich hier nicht den Quellcode hosten
Aber hier mal ein Ausschnitt aus der Information des Spielers
Information about object: Spieler
Sprite: spieler still
Solid: true
Visible: true
Depth: -1000
Persistent: false
Parent: <no parent>
Mask: <same as sprite>
Create Event:
set the gravity to 2 in direction 270
set variable can_shoot to 1
set variable global.ri to 0
set variable global.waf to 1
Alarm Event for alarm 0:
set variable can_shoot to 1
Step Event:
if y is smaller than 250
set the gravity to 1 in direction 270
if y is larger than 304
set the vertical speed to 0
set the gravity to 0 in direction 270
set the health to global.pistole
Collision Event with object ground:
set the gravity to 4 in direction 270
Collision Event with object gegner1:
play sound tot; looping: false
destroy the instance
create instance of object spieler tot at relative position (0,0)
Collision Event with object gegner1_tot:
bounce not precisely against solid objects
Collision Event with object waffe2 power up:
play sound power up; looping: false
destroy the instance
for other object: destroy the instance
create instance of object spieler_waffe2 at relative position (0,0)
set variable global.w2 to 100
Collision Event with object Münze:
set variable global.money relative to 2
for other object: destroy the instance
play sound Münze; looping: false
In anhang mal die Komplette Gm datei hoffe mir jemand helfen.
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von meav33 ()