Hallo
Ich habe wieder mal ein Problem
Ich habe ein Jump and run gemacht ungefähr wie super mario bros
die rechts rennen animation funzt im spiel aber die links rennen animation nicht
Code Step Event
Alles anzeigen
Ich habe wieder mal ein Problem
Ich habe ein Jump and run gemacht ungefähr wie super mario bros
die rechts rennen animation funzt im spiel aber die links rennen animation nicht
Code Step Event
Quellcode
- if place_free(x,y+1) {gravity=0.5;jump = 1} else {gravity=0;jump = 0} gravity_direction = 270
- if vspeed > 10 {vspeed = 10}
- if keyboard_check_pressed(vk_up) && !place_free(x,y+1){vspeed-=7.8;jump = 1}
- if keyboard_check(vk_left) && place_free(x-4,y) {x-=4;right = 0;walk = 1} else {walk = 0}
- if keyboard_check(vk_right) && place_free(x+4,y) {x+=4;right = 1;walk = 1} else {walk = 0}
- if right = 1 and walk = 0 and jump = 0 {sprite_index = spr_player_right}
- if right = 0 and walk = 0 and jump = 0 {sprite_index = spr_player_links}
- if right = 1 and walk = 1 and jump = 0 {sprite_index = spr_player_run_right; image_speed = 0.3}
- if right = 0 and walk = 1 and jump = 0 {sprite_index = spr_player_run_links; image_speed = 0.3}
- if right = 1 and jump = 1 {sprite_index = spr_player_jump_right}
- if right = 0 and jump = 1 {sprite_index = spr_player_jump_links}