DESCARGA LOS SPRITE EN MEDIAFILE
OBJETO PLAYER
mov=2 //movimiento
image_speed=0.5
if place_free(x,y+1){
gravity=1
}
else{
gravity=0
}
if keyboard_check(ord("A")) and place_free(x-1,y)
{
x-=mov; //2
image_xscale=-1
image_speed=0.5
}
else{
image_speed=0
}
if keyboard_check(ord("D")) and place_free(x+1,y)
{
x+=mov; //2
image_xscale=1
image_speed=0.5
}
if keyboard_check_pressed(ord("W")) and !place_free(x,y+1){
vspeed=-salto; // 10
}
if image_speed=0 {
image_index=1
}
if y>=240{
instance_create(x,y,ob_explo)
instance_destroy()
}
vspeed=0
move_contact_solid(270,8)
instance_create(x,y,ob_explo)
instance_destroy()
room_goto_next()
👌-FIN DEL OBJETO PLAYER---------------------
OBJETO SOLIDO
👌-FIN DEL OBJETO SOLIDO---------------------
image_speed=0.5
if image_index>=5{
if room=nivel1{
instance_create(10,10,ob_player)
}
instance_destroy()
}
👌-FIN DEL OBJETO EXPLOSION--------------------
OBJETO TEXTO
if room=r_intro{
draw_text(x,y,"20 segundos"+chr(13)+ " presione enter")
if keyboard_check_pressed(vk_enter){
room_goto(nivel1)
}
}
if room=r_perdiste{
draw_text(x,y,"perdiste"+chr(13)+ " presione enter")
if keyboard_check_pressed(vk_enter){
room_goto(r_intro)
}
}
👌-FIN DEL OBJETO TEXTO---------------------
OBJETO TIEMPO
tiempo=20
tiempo--
if alarm[0]=-1{
alarm[0]=30
}
if tiempo<=0{
persistent=false
room_goto(r_perdiste)
}
draw_text(x,y,tiempo)
👌-FIN DEL OBJETO TIEMPO---------------------
2 comentarios
Click here for comentariossa
Replygracias
ReplyConversionConversion EmoticonEmoticon