Fala pessoal! Nosso projeto de Remake da 1ª Dungeon de "The Legend of Zelda" está quaaaaaaaase pronto! Eu diria que se uma pessoa passasse pela sala sem prestar muita atenção e o gameplay abaixo estivesse rolando na TV, ela poderia até confundir com o jogo original:
O que foi incluso neste último update?
*Inimigo: Keese;
*Inimigo: Gel;
*Inimigo: Goriya;
*Item: Rúpia (Coletável com 5 unidades);
*Item: Recarga de Coração;
*Item: Chave Pequena;
*Item: Bumerangue;
*Item: Bomba;
*Item: Bússola;
*Item: Mapa;
*Portas Trancadas;
*Paredes Quebráveis (com bomba);
*NPC: Velho Sábio;
*Suporte para controle de XBOX.
O que falta ser feito?
*Inimigo: Wallmaster;
*Inimigo: Aquamentus;
*Item: Arco;
*Item: Fragmento da Triforce.
Itens que iam ser feitos, mas decidi descartá-los, pois acredito que fogem do escopo deste projeto:
*Fada;
*Relógio.
Códigos utilizados:
OBJETO "PLAYER START" (obj_player_start)
OBJETO "PLAYER" (obj_player)
OBJETO "HUD" (obj_HUD)
OBJETO "KEESE" (obj_keese)
OBJETO "CONTROLES" (obj_controls)
Obs.: maioria dos inimigos compartilham o mesmo algoritmo, com leves alterações. Por conta disso, apenas o código fonte do inimigo "keese" (morcego) foi compartilhado, pois é o que mais difere dos demais.
Por enquanto é só isso... Até a próxima atualização, que provavelmente já incluirá o jogo pronto com link para download do executável ^^
O que foi incluso neste último update?
*Inimigo: Keese;
*Inimigo: Gel;
*Inimigo: Goriya;
*Item: Rúpia (Coletável com 5 unidades);
*Item: Recarga de Coração;
*Item: Chave Pequena;
*Item: Bumerangue;
*Item: Bomba;
*Item: Bússola;
*Item: Mapa;
*Portas Trancadas;
*Paredes Quebráveis (com bomba);
*NPC: Velho Sábio;
*Suporte para controle de XBOX.
O que falta ser feito?
*Inimigo: Wallmaster;
*Inimigo: Aquamentus;
*Item: Arco;
*Item: Fragmento da Triforce.
Itens que iam ser feitos, mas decidi descartá-los, pois acredito que fogem do escopo deste projeto:
*Fada;
*Relógio.
Códigos utilizados:
Código:
///CREATE
//*******************************************
vspeed=-1.5;
image_speed=0.1;
alarm[0]=30;
//___________________________________________
///ALARM0
//*******************************************
instance_create(x,y,obj_player);
instance_destroy();
//___________________________________________
///DRAW
//*******************************************
//desenhar a si mesmo
draw_self();
//desenhar HUD
draw_set_font(FONT);
draw_set_color(c_black);
draw_rectangle(view_xview,view_yview,view_xview+256,view_yview+64,false);
draw_sprite(spr_HUD,0,view_xview,view_yview);
draw_set_color(c_white);
for(i=0;i<global.player_max_HP/2;i++)//corações (valor máximo de HP)
draw_sprite(spr_empty_heart,0,view_xview+176+(i*8),view_yview+48);
for(i=0;i<global.player_HP;i++)//corações (exibir HP atual)
{
if i mod 2==0
SPR=spr_heart_A;
else
SPR=spr_heart_B;
draw_sprite(SPR,0,view_xview+176+(i*4),view_yview+48);
}
//exibir quantidade de chaves
draw_set_color(c_white);
draw_text(view_xview+96,view_yview+39,"X"+string(global.keys));
//exibir quantidade de rúpias
draw_set_color(c_white);
draw_text(view_xview+96,view_yview+39-16,"X"+string(global.rupies));
//exibir quantidade de bombas
draw_set_color(c_white);
draw_text(view_xview+96,view_yview+39+9,"X"+string(global.bombs));
//exibir slot equipado do inventário
draw_set_color(c_white);
if global.inv_slot_selected!=1
draw_text(view_xview+128,view_yview+48,string(global.inv_slot_selected));
else
draw_text(view_xview+129,view_yview+48,string(global.inv_slot_selected));
if global.inv_slot[global.inv_slot_selected]=="boomerang"
draw_sprite(spr_boomerang_atk,0,view_xview+124,view_yview+32);
if global.inv_slot[global.inv_slot_selected]=="bomb"
draw_sprite(spr_bomb_item,0,view_xview+124,view_yview+32);
//___________________________________________
Código:
///CREATE
//*******************************************
ATK=false;
CAN_ATK=true;
CAN_USE_ITEM=true;
WALK_SPD=0;
WALK_MAX_SPD=1.5;
kb_dir=-1;
instance_create(x,y,obj_HUD);
global.player_HP=6;
global.player_max_HP=6;
global.keys=0;
global.rupies=0;
global.rupies_buffer=0;
global.bombs=0;
image_speed=0;
hurt=false;
X_SPD=0;
Y_SPD=0;
can_walk=true;
alarm[1]=7;
//___________________________________________
///ALARM0
//*******************************************
visible=true;
hurt=false;
//___________________________________________
///ALARM1
//*******************************************
if hurt==true
{
if visible==false
visible=true;
else
visible=false;
}
alarm[1]=7;
//___________________________________________
///ALARM2
//*******************************************
X_SPD=0;
Y_SPD=0;
can_walk=true;
gamepad_set_vibration(0,0,0);
//___________________________________________
///ALARM3
//*******************************************
//disparar projétil quando estiver com HP cheio
if sprite_index==spr_player_atk_up
{
if global.player_HP==global.player_max_HP
{
if !instance_exists(obj_sword_proj)
and !instance_exists(obj_sword_proj_part)
{
PROJ=instance_create(x+6,y+8,obj_sword_proj);
PROJ.direction=90;
}
}
}
if sprite_index==spr_player_atk_down
{
if global.player_HP==global.player_max_HP
{
if !instance_exists(obj_sword_proj)
{
PROJ=instance_create(x+9,y+8,obj_sword_proj);
PROJ.direction=270;
}
}
}
if sprite_index==spr_player_atk_left
{
if global.player_HP==global.player_max_HP
{
if !instance_exists(obj_sword_proj)
{
PROJ=instance_create(x+8,y+10,obj_sword_proj);
PROJ.direction=180;
}
}
}
if sprite_index==spr_player_atk_right
{
if global.player_HP==global.player_max_HP
{
if !instance_exists(obj_sword_proj)
{
PROJ=instance_create(x+8,y+9,obj_sword_proj);
PROJ.direction=0;
}
}
}
//___________________________________________
///ALARM4
//*******************************************
audio_resume_sound(bg_theme);
//___________________________________________
///ALARM5
//*******************************************
if global.rupies_buffer>0
{
audio_stop_sound(sfx_rupy);
audio_play_sound(sfx_rupy,3,false);
global.rupies_buffer-=1;
global.rupies+=1;
alarm[5]=3;
}
//___________________________________________
///ALARM6
//*******************************************
BOOMERANG=false;
//___________________________________________
///STEP
//*******************************************
//movimento e colisão com paredes
if can_walk==true
{
if !instance_exists(obj_intro)
{
if ATK==false
{
if BT_UP
{
if WALK_SPD<WALK_MAX_SPD
WALK_SPD+=0.25;
sprite_index=spr_player_up;
image_speed=0.1;
if !place_meeting(x,y-2,obj_collision)
y-=WALK_SPD;
}
else if BT_DOWN
{
if WALK_SPD<WALK_MAX_SPD
WALK_SPD+=0.25;
sprite_index=spr_player_down;
image_speed=0.1;
if !place_meeting(x,y+2,obj_collision)
y+=WALK_SPD;
}
else if BT_LEFT
{
if WALK_SPD<WALK_MAX_SPD
WALK_SPD+=0.25;
sprite_index=spr_player_left;
image_speed=0.1;
if !place_meeting(x-2,y,obj_collision)
x-=WALK_SPD;
}
else if BT_RIGHT
{
if WALK_SPD<WALK_MAX_SPD
WALK_SPD+=0.25;
sprite_index=spr_player_right;
image_speed=0.1;
if !place_meeting(x+2,y,obj_collision)
x+=WALK_SPD;
}
else if ATK==false
{
image_speed=0;
WALK_SPD=0;
}
}
}
}
//alternar tela cheia
if keyboard_check_pressed(ord("F"))
{
if !window_get_fullscreen()
{
window_set_fullscreen(true);
window_set_cursor(cr_none);
}
else
{
window_set_fullscreen(false);
window_set_cursor(cr_arrow);
}
}
else if can_walk==false
{
x=xprevious;
y=yprevious;
}
//colisão com inimigos
if place_meeting(x,y,obj_enemy)
{
if hurt==false
{
gamepad_set_vibration(0,1,1);
can_walk=false;
image_speed=0;
audio_play_sound(sfx_player_dmg,3,false);
global.player_HP-=1;
ENEMY=instance_nearest(x,y,obj_enemy);
kb_dir=round((point_direction(x,y,ENEMY.x,ENEMY.y)/90))*90;
if kb_dir==0
or kb_dir==360
X_SPD=-2;
if kb_dir==180
X_SPD=2;
if kb_dir==90
Y_SPD=2;
if kb_dir==270
Y_SPD=-2;
alarm[0]=room_speed;
alarm[1]=7;
alarm[2]=7;
hurt=true;
}
}
if place_meeting(x,y,obj_goriya)
{
if hurt==false
{
gamepad_set_vibration(0,1,1);
can_walk=false;
image_speed=0;
audio_play_sound(sfx_player_dmg,3,false);
global.player_HP-=2;
ENEMY=instance_nearest(x,y,obj_enemy);
kb_dir=round((point_direction(x,y,ENEMY.x,ENEMY.y)/90))*90;
if kb_dir==0
or kb_dir==360
X_SPD=-2;
if kb_dir==180
X_SPD=2;
if kb_dir==90
Y_SPD=2;
if kb_dir==270
Y_SPD=-2;
alarm[0]=room_speed;
alarm[1]=7;
alarm[2]=7;
hurt=true;
}
}
if !place_meeting(x+X_SPD,y,obj_collision)
x+=X_SPD;
if !place_meeting(x,y+Y_SPD,obj_collision)
y+=Y_SPD;
//som de baixo HP
if global.player_HP<=2
{
if !audio_is_playing(sfx_low_health)
audio_play_sound(sfx_low_health,3,true);
}
else
audio_stop_sound(sfx_low_health);
//atacar
if BT_A_pressed
{
if ATK==false
and CAN_ATK==true
and !instance_exists(obj_p_boomerang)
{
alarm[3]=15;
X1=x div 256*256;
Y1=y div 176*176;
X2=X1+256;
Y2=Y1+176;
if collision_rectangle(X1,Y1,X2,Y2,obj_NPC_message,false,false)
{
if obj_NPC_message.txt==obj_NPC_message.TXT
audio_play_sound(sfx_sword,3,false);
}
else
audio_play_sound(sfx_sword,3,false);
ATK=true;
}
}
if ATK==true
{
image_speed=0.18;
if sprite_index==spr_player_up
{
sprite_index=spr_player_atk_up;
instance_create(x,y,obj_atk_mask_up);
}
if sprite_index==spr_player_down
{
sprite_index=spr_player_atk_down;
instance_create(x,y,obj_atk_mask_down);
}
if sprite_index==spr_player_left
{
sprite_index=spr_player_atk_left;
instance_create(x,y,obj_atk_mask_left);
}
if sprite_index==spr_player_right
{
sprite_index=spr_player_atk_right;
instance_create(x,y,obj_atk_mask_right);
}
}
//usar item equipado
if BT_B_pressed
and CAN_USE_ITEM==true
{
if ATK==false
{
if global.inv_slot[global.inv_slot_selected]=="boomerang"
and !instance_exists(obj_p_boomerang)
{
alarm[6]=15;
boomerang=instance_create(x,y,obj_p_boomerang);
boomerang.FATHER=id;
if sprite_index==spr_player_left
boomerang.direction=180;
if sprite_index==spr_player_right
boomerang.direction=0;
if sprite_index==spr_player_up
boomerang.direction=90;
if sprite_index==spr_player_down
boomerang.direction=270;
boomerang.speed=4;
}
if global.inv_slot[global.inv_slot_selected]=="bomb"
and !instance_exists(obj_bomb)
and global.bombs>0
{
global.bombs-=1;
if sprite_index==spr_player_left
instance_create(x-8,y,obj_bomb);
if sprite_index==spr_player_right
instance_create(x+8,y,obj_bomb);
if sprite_index==spr_player_up
instance_create(x,y-8,obj_bomb);
if sprite_index==spr_player_down
instance_create(x,y+8,obj_bomb);
}
}
}
//morrer
if global.player_HP<=0
{
audio_stop_sound(sfx_low_health);
DEATH=instance_create(x,y,obj_player_death_A);
DEATH.sprite_index=sprite_index;
DEATH.image_index=image_index;
instance_destroy();
}
//___________________________________________
///END STEP
//*******************************************
//câmera
if round(view_xview)==round(view_xview/256)*256
and round(view_yview+64)==round(view_yview/176)*176
//checar se a câmera está alinhada com a sala
{
X1=xstart div 256*256;
Y1=ystart div 176*176;
X2=X1+256;
Y2=Y1+176;
if collision_rectangle(X1,Y1,X2,Y2,obj_NPC_message,false,false)
{
if obj_NPC_message.txt!=obj_NPC_message.TXT
{
can_walk=false;
CAN_ATK=false;
sprite_index=spr_player_left;
}
else
{
can_walk=true;
CAN_ATK=true;
}
}
else
{
can_walk=true;
CAN_ATK=true;
}
}
else
{
if ATK==true
ATK=false;
image_speed=0.1;
if sprite_index==spr_player_left
x-=0.42;
if sprite_index==spr_player_right
x+=0.2;
if sprite_index==spr_player_up
y-=0.42;
if sprite_index==spr_player_down
y+=0.2;
can_walk=false;
CAN_ATK=false;
}
view_xview=lerp(view_xview,obj_player.x div 256*256,0.08);
view_yview=lerp(view_yview,obj_player.y div 176*176 - 64,0.08);
//desativar teclado ao perder o foco da janela
if !window_has_focus()
io_clear();
//limite de rúpias
clamp(global.rupies,0,255);
//___________________________________________
///ANIMATION END
*********************************************
if ATK==true
ATK=false;
if sprite_index==spr_player_atk_up
sprite_index=spr_player_up;
if sprite_index==spr_player_atk_down
sprite_index=spr_player_down;
if sprite_index==spr_player_atk_left
sprite_index=spr_player_left;
if sprite_index==spr_player_atk_right
sprite_index=spr_player_right;
//___________________________________________
Código:
///CREATE
//*******************************************
globalvar FONT;
FONT=font_add_sprite_ext(spr_font,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ,'.?!&-",true,1);
SPR=-1;
IMG=0;
alarm[0]=15;
//___________________________________________
///ALARM0
//*******************************************
if IMG==1
IMG=0;
else
IMG=1;
alarm[0]=15;
//___________________________________________
///DRAW
//*******************************************
//desenhar HUD
draw_set_font(FONT);
draw_set_color(c_black);
draw_rectangle(view_xview,view_yview,view_xview+256,view_yview+64,false);
draw_sprite(spr_HUD,0,view_xview,view_yview);
draw_set_color(c_white);
draw_text(view_xview+16,view_yview+4+8,"LEVEL-1");
for(i=0;i<global.player_max_HP/2;i++)//corações (valor máximo de HP)
draw_sprite(spr_empty_heart,0,view_xview+176+(i*8),view_yview+48);
for(i=0;i<global.player_HP;i++)//corações (exibir HP atual)
{
if i mod 2==0
SPR=spr_heart_A;
else
SPR=spr_heart_B;
draw_sprite(SPR,0,view_xview+176+(i*4),view_yview+48);
}
//exibir quantidade de chaves
draw_set_color(c_white);
draw_text(view_xview+96,view_yview+39,"X"+string(global.keys));
//exibir quantidade de rúpias
draw_set_color(c_white);
draw_text(view_xview+96,view_yview+39-16,"X"+string(global.rupies));
//exibir quantidade de bombas
draw_set_color(c_white);
draw_text(view_xview+96,view_yview+39+9,"X"+string(global.bombs));
//exibir mapa
if global.MAP==true
draw_sprite(spr_map,0,view_xview+24,view_yview+24+8);
if global.COMP==true
draw_sprite(spr_map_tri_pos,IMG,view_xview+24+(5*8),view_yview+24+8+(4));
if instance_exists(obj_player)
{
XX=obj_player.x div 256;
YY=obj_player.y div 176;
}
draw_sprite(spr_map_player_pos,0,view_xview+24+(XX*8),view_yview+24+8+(YY*4));
//exibir slot equipado do inventário
draw_set_color(c_white);
if global.inv_slot_selected!=1
draw_text(view_xview+128,view_yview+48,string(global.inv_slot_selected));
else
draw_text(view_xview+129,view_yview+48,string(global.inv_slot_selected));
if global.inv_slot[global.inv_slot_selected]=="boomerang"
draw_sprite(spr_boomerang_atk,0,view_xview+124,view_yview+32);
if global.inv_slot[global.inv_slot_selected]=="bomb"
draw_sprite(spr_bomb_item,0,view_xview+124,view_yview+32);
//___________________________________________
Código:
///CREATE
//*******************************************
image_speed=0;
image_index=irandom_range(0,1);
HP=0.5;
hurt=false;
DIR_PLUS=choose(true,false);
direction=irandom(360);
SPD=0;
max_speed=1;
min_speed=0;
direction=0;
MOVE=false;
alarm[0]=room_speed;
alarm[1]=room_speed*2;
//___________________________________________
///ALARM0
//*******************************************
if MOVE==false
{
MOVE=true;
direction=irandom(360);
}
else
MOVE=false;
if x>view_xview
and x<view_xview+256
and y>view_yview+64
and y<view_yview+240 //checar se está dentro da tela
{
if MOVE==true
alarm[0]=room_speed*10;
else
alarm[0]=room_speed*5;
}
else
alarm[0]=room_speed;
//___________________________________________
///ALARM1
//*******************************************
if DIR_PLUS==true
DIR_PLUS=false;
else
DIR_PLUS=true;
alarm[1]=room_speed*2;
//___________________________________________
///STEP
//*******************************************
if x>view_xview
and x<view_xview+256
and y>view_yview+64
and y<view_yview+240 //checar se está dentro da tela
{
if round(view_xview)==round(view_xview/256)*256
and round(view_yview+64)==round(view_yview/176)*176
//checar se a câmera está alinhada com a sala
{
if MOVE==true
if SPD<max_speed
SPD+=0.025;
if MOVE==false
if SPD>min_speed
SPD-=0.025;
image_speed=lerp(image_speed,SPD/2,0.05);
if image_speed>0.25
image_speed=0.25;
if DIR_PLUS==true
direction+=SPD;
else
direction-=SPD;
if x-8<view_xview
{
x=xprevious;
direction=choose(45,0,315);
}
if x+8>view_xview+256
{
x=xprevious;
direction=choose(135,180,225);
}
if y+8>view_yview+240
{
y=yprevious;
direction=choose(45,90,135);
}
if y-8<view_yview+64
{
y=yprevious;
direction=choose(315,270,135);
}
x+=lengthdir_x(SPD,direction);
y+=lengthdir_y(SPD,direction);
}
else
{
instance_create(xstart,ystart,obj_keese);
instance_destroy();
}
}
else
{
SPD=0;
x=xstart;
y=ystart;
image_index=0;
image_speed=0;
alarm[0]=room_speed;
}
//receber dano
if collision_rectangle(x-8,y-8,x+8,y+8,obj_atk_mask_parent,false,false)
and round(view_xview)==round(view_xview/256)*256
and round(view_yview+64)==round(view_yview/176)*176
//checar se a câmera está alinhada com a sala
{
audio_stop_sound(sfx_enemy_dmg);
audio_play_sound(sfx_enemy_dmg,3,false);
image_speed=0;
HP-=1;
DMG=instance_nearest(x,y,obj_atk_mask_parent);
with DMG
instance_destroy();
}
if collision_rectangle(x-8,y-8,x+8,y+8,obj_sword_proj,false,false)
and !collision_rectangle(x-8,y-8,x+8,y+8,obj_atk_mask_parent,false,false)
and round(view_xview)==round(view_xview/256)*256
and round(view_yview+64)==round(view_yview/176)*176
//checar se a câmera está alinhada com a sala
{
audio_stop_sound(sfx_enemy_dmg);
audio_play_sound(sfx_enemy_dmg,3,false);
image_speed=0;
HP-=1;
DMG=instance_nearest(x,y,obj_sword_proj);
TL=instance_create(x,y,obj_sword_proj_part);
TR=instance_create(x,y,obj_sword_proj_part);
BL=instance_create(x,y,obj_sword_proj_part);
BR=instance_create(x,y,obj_sword_proj_part);
TL.sprite_index=spr_sword_proj_part_TL;
TR.sprite_index=spr_sword_proj_part_TR;
BL.sprite_index=spr_sword_proj_part_BL;
BR.sprite_index=spr_sword_proj_part_BR;
TL.direction=135;
TR.direction=45;
BL.direction=225;
BR.direction=315;
with DMG
instance_destroy();
}
//morrer
if HP<=0
{
instance_create(x-8,y-8,obj_enemy_death);
if global.player_HP<global.player_max_HP
{
RAND=irandom_range(1,5);
if RAND==1
instance_create(x,y,obj_heart_refill);
}
else
{
RAND=irandom_range(1,10);
if RAND==1
instance_create(x-8,y-8,obj_5_rupies);
}
instance_destroy();
}
//___________________________________________
///END STEP
//*******************************************
if !(x>view_xview
and x<view_xview+256
and y>view_yview+64
and y<view_yview+240) //checar se está fora da tela
alarm[0]=room_speed;
//___________________________________________
///COLLISION WITH "obj_p_boomerand"
//*******************************************
audio_stop_sound(sfx_enemy_dmg);
audio_play_sound(sfx_enemy_dmg,3,false);
HP-=1;
other.speed=-4;
//___________________________________________
///COLLISION WITH "obj_explosion"
//*******************************************
audio_stop_sound(sfx_enemy_dmg);
audio_play_sound(sfx_enemy_dmg,3,false);
HP=0;
//___________________________________________
///OUTSIDE VIEW 0
//*******************************************
instance_create(xstart,ystart,obj_keese);
instance_destroy();
//___________________________________________
///DRAW
//*******************************************
if round(view_xview)==round(view_xview/256)*256
and round(view_yview+64)==round(view_yview/176)*176
//checar se a câmera está alinhada com a sala
draw_sprite(sprite_index,image_index,x,y);
else
{
draw_sprite_ext(spr_enemy_spawn,0,x-8,y-8,1,1,0,c_white,random_range(0,1));
alarm[0]=room_speed;
}
//___________________________________________
Código:
///CREATE
//*******************************************
globalvar BT_UP, BT_DOWN, BT_LEFT, BT_RIGHT, BT_A_pressed, BT_B_pressed, SWITCH_pressed;
BT_UP=false;
BT_DOWN=false;
BT_LEFT=false;
BT_RIGHT=false;
BT_A_pressed=false;
BT_B_pressed=false;
SWITCH_pressed=false;
global.can_SWITCH=true;
//___________________________________________
///STEP
//*******************************************
if keyboard_check(vk_up)
or keyboard_check(ord("W"))
or gamepad_button_check(0,gp_padu)
BT_UP=true;
else
BT_UP=false;
if keyboard_check(vk_down)
or keyboard_check(ord("S"))
or gamepad_button_check(0,gp_padd)
BT_DOWN=true;
else
BT_DOWN=false;
if keyboard_check(vk_left)
or keyboard_check(ord("A"))
or gamepad_button_check(0,gp_padl)
BT_LEFT=true;
else
BT_LEFT=false;
if keyboard_check(vk_right)
or keyboard_check(ord("D"))
or gamepad_button_check(0,gp_padr)
BT_RIGHT=true;
else
BT_RIGHT=false;
if keyboard_check_pressed(ord("X"))
or keyboard_check_pressed(ord("L"))
or gamepad_button_check_pressed(0,gp_face2)
BT_A_pressed=true;
else
BT_A_pressed=false;
if keyboard_check_pressed(ord("Z"))
or keyboard_check_pressed(ord("K"))
or gamepad_button_check_pressed(0,gp_face1)
BT_B_pressed=true;
else
BT_B_pressed=false;
if keyboard_check_pressed(vk_tab)
or keyboard_check_pressed(vk_lshift)
or gamepad_button_check_pressed(0,gp_shoulderr)
SWITCH_pressed=true;
else
SWITCH_pressed=false;
//trocar slot equipado do inventário
if SWITCH_pressed
and global.can_SWITCH==true
{
audio_play_sound(sfx_text,3,false);
if global.inv_slot_selected==1
global.inv_slot_selected=2;
else if global.inv_slot_selected==2
global.inv_slot_selected=3;
else if global.inv_slot_selected==3
global.inv_slot_selected=1;
//___________________________________________
Obs.: maioria dos inimigos compartilham o mesmo algoritmo, com leves alterações. Por conta disso, apenas o código fonte do inimigo "keese" (morcego) foi compartilhado, pois é o que mais difere dos demais.
Por enquanto é só isso... Até a próxima atualização, que provavelmente já incluirá o jogo pronto com link para download do executável ^^
Última edição: