Codice: Seleziona tutto
//Create Event
image_speed = 0
image_index = 0
attacca = 0
//Step Event
if(place_meeting(x,y+1,obj_wall)){
grounded = true
}else{
grounded = false
}
if(grounded){
sprite_index = spr_walk
} else {
if(vspeed<0){
sprite_index = spr_jump
}else{
sprite_index = spr_jump
}
}
if attacca = 1
if grounded = true
{
sprite_index = spr_attack
image_speed = .2
}
else if grounded = false
{
sprite_index = spr_attack_jump
image_speed = .2
}
//Press <Space>
attacca = 1
//Animation End
if sprite_index = spr_attack
{
attacca = 0
image_speed = 0
}
else if sprite_index = spr_attack_jump
{
attacca = 0
image_speed = 0
}