Creare Videogiochi - Game Developer
problemi platform - Versione stampabile

+- Creare Videogiochi - Game Developer (https://www.making-videogames.net/giochi)
+-- Forum: Altri Programmi per la Creazione di Videogames (https://www.making-videogames.net/giochi/Forum-Altri-Programmi-per-la-Creazione-di-Videogames)
+--- Forum: Game Maker (https://www.making-videogames.net/giochi/Forum-Game-Maker)
+--- Discussione: problemi platform (/thread-problemi-platform)



problemi platform - spriters2000 - 28-10-2011

Ho dei problemi:
1) Se premo spazio per saltare ripetutamente il giocatore salta anche se in aria.
2) Se mentre sono in aria e vicino ad un blocco premo nella direzione del blocco il giocatore rimane attaccato.
3) Non riesco ad aumentare la velocità del salto, ho provato modificando gravità,vspeed e hspeed ma non accelera la velocità.
4) Non so come modificare l'altezza del salto.

Se sapete almeno una risposta perfavore scrivetela.
Ecco il codice:
Codice:
Sprite: player idle
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

Step Event:

if position (0,5) is collision free for Only solid objects
      set the gravity to 0 in direction 270
else
      set the gravity to 0.2 in direction 270
if vspeed is larger than 8
      set the vertical speed to 8
Collision Event with object block:

set the vertical speed to 0
if gravity is equal to 0
Key Press Event for Key:

if position (0,5) is not collision free for Only solid objects
      set the vertical speed to -3
Key Press Event for Key:

set the sprite to player left with subimage 0 and speed 0.25
set the horizontal speed to -3
Key Press Event for Key:

set the sprite to player right with subimage 0 and speed 0.25
set the horizontal speed to 3
Key Release Event for Key:

set the sprite to player idle with subimage 0 and speed 0
Key Release Event for Key:

set the horizontal speed to 0
set the sprite to player idle with subimage 0 and speed 0
Key Release Event for Key:

set the horizontal speed to 0
set the sprite to player idle with subimage 0 and speed 0