Stamos22
Member
Hello,
I recently have been following along with Heartbeasts' action rpg course. I've been working my through it and feel like I have learned a fair amount though I have recently encountered an error that I have been unable to fix.
I assumed since in the video he does not get an error that missed something in a previous lesson but I have now gone through the course twice trying to find my mistake to no avail.
The error message I get is from when a projectile collides with the player. I want the projectile to be destroyed on collision but when I put the collision event and the instance_destroy(); command, it causes a fatal error.
This is the error report.
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step Evento_stinger
for object o_player:
Unable to find any instance for object index '100070' name '<undefined>'
at gml_Script_hurtbox_entity_can_be_hit_by (line 3) - var _is_target = is_target(object_index, _hitbox.targets_);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_hurtbox_entity_can_be_hit_by (line 3)
called from - gml_Object_o_player_Collision_35004c3d_dfdc_4329_9b70_6631acd0b11f (line 3) - if hurtbox_entity_can_be_hit_by(other)
If I am reading this correctly then the object is getting destroyed before the code can finish?
Also, it only crashes when I try to destroy the object. I can have the projectile hit the player, do damage and keep going, but when I try to run the instance_destroy this error comes up, though it does not come up in the tutorial video.
Any help would be greatly appreciated.
I recently have been following along with Heartbeasts' action rpg course. I've been working my through it and feel like I have learned a fair amount though I have recently encountered an error that I have been unable to fix.
I assumed since in the video he does not get an error that missed something in a previous lesson but I have now gone through the course twice trying to find my mistake to no avail.
The error message I get is from when a projectile collides with the player. I want the projectile to be destroyed on collision but when I put the collision event and the instance_destroy(); command, it causes a fatal error.
This is the error report.
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step Evento_stinger
for object o_player:
Unable to find any instance for object index '100070' name '<undefined>'
at gml_Script_hurtbox_entity_can_be_hit_by (line 3) - var _is_target = is_target(object_index, _hitbox.targets_);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_hurtbox_entity_can_be_hit_by (line 3)
called from - gml_Object_o_player_Collision_35004c3d_dfdc_4329_9b70_6631acd0b11f (line 3) - if hurtbox_entity_can_be_hit_by(other)
If I am reading this correctly then the object is getting destroyed before the code can finish?
Also, it only crashes when I try to destroy the object. I can have the projectile hit the player, do damage and keep going, but when I try to run the instance_destroy this error comes up, though it does not come up in the tutorial video.
Any help would be greatly appreciated.