Something incredibly strange is happening and I, for the life of me, can't figure out why.
Long story short, I'm checking an enemy hitbox against the player and using the following code:
ENEMY_HITBOX STEP EVENT
This code works great. If I leave the room, and then re-enter and get hit again, I get the following code error:
Variable <unknown_object>.hit_player(105728,-214748648) not set before reading it.
However, if I do a "show_message(phit OR id);" right under the with(phit), it shows the id of my player....
Any ideas?
Long story short, I'm checking an enemy hitbox against the player and using the following code:
ENEMY_HITBOX STEP EVENT
GML:
var phit = instance_place(x,y,o_player);
var blocked = false;
var parried = false;
if phit != noone && !blocked && !parried {
with(phit){
hit_player(other.dmg);
}
}
Variable <unknown_object>.hit_player(105728,-214748648) not set before reading it.
However, if I do a "show_message(phit OR id);" right under the with(phit), it shows the id of my player....
Any ideas?
Last edited: