GothicLogic
Member
Hello, I need some help with this little issue as I feel I've done everything I can.
I have a player object who is able to attack, and I have a door object, which the player can use to move rooms.
This is code in the players End Step Event that interacts with the door object, when pressing Up creates the DoorHamachi object (The object that plays an animation of the character going through and thus deac. the main player obj)
This works, however whenever the player presses 'X' he attacks by playing an animation and creating an attack hitbox for his weapon. So when doing this over a door object and pressing Up, the game crashes thus giving this error.
I dont necessarily care for the crash, I'd rather have a delay between interactions like, preventing the player from going through the door whilst attacking. Maybe this is a simple fix but I'm very lost on how to achieve that between the two objects. Any help please?
I have a player object who is able to attack, and I have a door object, which the player can use to move rooms.
This is code in the players End Step Event that interacts with the door object, when pressing Up creates the DoorHamachi object (The object that plays an animation of the character going through and thus deac. the main player obj)
Code:
with (obj_door)
{
if (place_meeting(x,y,objPlayer1)
and objPlayer1.state != 2
and visible = 1)
{
if (kUp)
{
//Deactivate Hamachi
with (objPlayer1) event_user(0);
instance_destroy(objPlayer1, 0);
//Create a door player object
doorHamachi = instance_create(x+8,y-16,objDoorHamachi)
I dont necessarily care for the crash, I'd rather have a delay between interactions like, preventing the player from going through the door whilst attacking. Maybe this is a simple fix but I'm very lost on how to achieve that between the two objects. Any help please?
Last edited: