Open up the object window and click on Show information at the bottom. Copy and paste all the data provided there. If there's anything causing the issue, we should be able to see it
View attachment 2271
Information about object: obj_enemy_parent
Sprite:
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children
obj_enemy_basic
Mask:
No Physics Object
Create Event:
execute code:
direction = irandom(8) * 45;
alarm[0]=room_speed*3;
speed=2;
Alarm Event for alarm 0:
execute code:
direction = irandom(8) * 45;
if irandom(100)=1 then{
speed= 0;
}else{
speed = 2;
}
image_angle=direction;
alarm[0] = room_speed*3;
Step Event:
execute code:
if alarm[0] = -1{ alarm[0] = room_speed*3;}
Information about object: obj_arrow
Sprite: spr_arrow
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Step Event:
execute code:
hit = instance_place (x,y, obj_enemy_parent);
if (hit != noone)
{
hit.hp -= global.atk;
instance_destroy();
}
Other Event: Outside Room:
execute code:
instance_destroy();
Information about object: obj_player
Sprite: spr_player
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
execute code:
hp = 10;
spd= 1
ammo = 10
Step Event:
execute code:
//variables
var up, down, left, right, arrow;
up = keyboard_check (ord('W'));
down = keyboard_check (ord('S'));
left = keyboard_check (ord('A'));
right = keyboard_check (ord('D'));
//player movemnt
image_angle = point_direction(x, y, mouse_x, mouse_y);
if right {
speed = spd; direction = 0;
}
if up {
speed = spd; direction = 90;
}
if left {
speed = spd; direction = 180;
}
if down {
speed = spd; direction = 270;
}
if up and right {
speed = spd; direction = 45;
}
if up and left {
speed = spd; direction = 135;
}
if down and left {
speed = spd; direction = 225;
}
if down and right {
speed = spd; direction = 315;
}
if! up and !down and !left and !right {speed=0};
//collision
if instance_place (x,y,obj_enemy_parent) {hp -= global.enatk;}
//ranged attack
if( mouse_check_button_pressed( mb_right))
{ if ammo >= 1{
var arrow = instance_create( x, y, obj_arrow);
arrow.direction = point_direction(x, y, mouse_x, mouse_y);
arrow.speed = 10;
arrow.image_angle = point_direction(x, y, mouse_x, mouse_y);
ammo+= -1;}}
//audio_play_sound (snd_fire_ammo, 10, false)
//ammo += -1
//else (snd_no_ammo, 10, false);}
// player damage and death
//if hp <= 0 instance_destroy();
//if keyboard_check_pressed(ord("R")) game_restart();
//if hp >= 0 game_restart();
Information about object: obj_globals
Sprite:
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
execute code:
global.enatk = 1;
global. atk = 1;