Ich hab ein Problem mit ghost fighter. Mein Player bleibt während man läuft an einer Wand hängen. Hier die Step-Event codes:
Alles anzeigen
und hier collision with wall:
GML-Quellcode
- //Anziehungskraft
- if place_free(x,y+1)
- {
- gravity_direction=270
- gravity=0.7
- }
- else
- {
- gravity_direction=270
- gravity=0
- }
- //Springen
- if keyboard_check_pressed(vk_up) && not place_free(x,y+1)
- {
- vspeed=-10
- }
- //Spritewechsel bei Pfeiltasten
- if keyboard_check(vk_right)
- {
- image_index=2
- hspeed=4
- }
- if keyboard_check(vk_left)
- {
- image_index=3
- hspeed=-4
- }
- if keyboard_check_released(vk_left)
- {
- hspeed=0
- image_index=1
- }
- if keyboard_check_released(vk_right)
- {
- hspeed=0
- image_index=0
- }
- //Objectwechsel Boxen
- if keyboard_check_pressed(vk_space)
- {
- instance_change(obj_playerstay_box_right,true)
- }
und hier collision with wall:
