Enemies can break into windows and doors

Hi,
I'm starting the prep work on a new horror game. The basic premise of the game is you are trapped in a house with a monster or monsters and you are trying to sneak around and collect the items you need to get you out of the house.

What I'm wanting is that the monsters when they see the player they chase them (easy enough I can do that).
however if a player runs through a door and closes the door (door does not teleport play to a new map just opens to another room on same map), the monsters will start to attack the door and it will eventually break. letting the monsters into the room.

I'm not fussed on how it is determine that the door will break - this could be either be determent by hit points of the door or a set timer, say if monsters stand next to door for 60 sec (or a random amount between 60 and 90 seconds) the door then breaks.

I have seen some item durability scripts out there which I'm not sure if I could tweak to work for a door.

Thanks for the help
Ray
Sorry but I must be missing something: if your concern is not about how to break the door then what do you want to know? Are you concerned about how to let enemies attack the door or about how to let them pass through it?
Sorry but I must be missing something: if your concern is not about how to break the door then what do you want to know? Are you concerned about how to let enemies attack the door or about how to let them pass through it?

I'm not concerned about what condition is used to trigger the door breaking (whether its a timed thing or they actually have to attack the door) , I just need a way that it looks like the monsters are attacking the door and then after awhile the door will break so the monsters can run into the other room.
I use the blend mode feature under the movement route tab. Set blend to additive, wait 7 frames, blend mode normal, wait 7 frames. it makes the event like your door flash as if getting damaged. If you look at my profile page, I have a lava flow vid that shows the lava touch a rock barricade and do like you are saying. it damages the rock via a parallel event and when the rock reaches 0 it blows up and the lava gets by.
Here is example pulled from my game:

◆Set Movement Route:Barricade 3 Lava (Wait)
:Set Movement Route:◇SE:Absorb1 (90, 80, 0)
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
I use the blend mode feature under the movement route tab. Set blend to additive, wait 7 frames, blend mode normal, wait 7 frames. it makes the event like your door flash as if getting damaged. If you look at my profile page, I have a lava flow vid that shows the lava touch a rock barricade and do like you are saying. it damages the rock via a parallel event and when the rock reaches 0 it blows up and the lava gets by.
Here is example pulled from my game:

◆Set Movement Route:Barricade 3 Lava (Wait)
:Set Movement Route:◇SE:Absorb1 (90, 80, 0)
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal

That's perfect, that is exactly what I was after,
thank you so much.
Ray
Glad to help! I like the mechanic of flashing objects. I know it isn't realistic but when a person is playing a game, something has to draw attention to what matters. That could be flashing or an arrow of sorts. I also use the flash feature when I have characters in a cutscene talking so you know who is doing the speaking. I precede the text box with the actor or event NPC flashing. ( Not all the time but when who is speaking can be confusing I like to qualify the text)
Glad to help! I like the mechanic of flashing objects. I know it isn't realistic but when a person is playing a game, something has to draw attention to what matters. That could be flashing or an arrow of sorts. I also use the flash feature when I have characters in a cutscene talking so you know who is doing the speaking. I precede the text box with the actor or event NPC flashing. ( Not all the time but when who is speaking can be confusing I like to qualify the text)

Sorry just want to check, how do you specify how much health is on the bolder (or in my case a door) and have the lava (in my case zombies) deal the damage to it?
So this is the Parallel event that switches on when the lava reached the boulder walls:

Bean counter is name of variable used to add up "hits" against the boulder
◆Control Variables:#0004 Bean Counter += 1
These are the damage animations against the boulders ( They flash)
◆Set Movement Route:Barricade 1 Lava
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
◆Set Movement Route:Barricade 2 Lava
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
◆Set Movement Route:Barricade 3 Lava (Wait)
:Set Movement Route:◇SE:Absorb1 (90, 80, 0)
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
:Set Movement Route:◇Blend Mode:Additive
:Set Movement Route:◇Wait:5 frames
:Set Movement Route:◇Blend Mode:Normal
Slight pause so animations don't overlap into what may come next...
◆Wait:120 frames
So 10 ins my HP limit for boulders, if it goes to 10 or over then the next thing happens, other wise it repeats from start...
◆If:Bean Counter ≥ 10
◆Show Animation:Barricade 1 Lava, On Fire Ashes
◆Show Animation:Barricade 2 Lava, Cannonshot
I am using an outer self switch plugin. This just activates self switches remotely - all this did was change the boulders into lava tiles. You could use a normal switch to do the same thing...
◆Plugin Command:OuterSelfSwitch on 37 B
◆Plugin Command:OuterSelfSwitch on 43 A
◆Plugin Command:OuterSelfSwitch on 45 B
◆Plugin Command:OuterSelfSwitch on 44 A
◆Control Variables:#0004 Bean Counter = 0
This shuts down the parallel event page once the boulders are gone...
◆Control Self Switch:A = ON
◆
:End

You will have to set your event up in some way slightly different, but the principle will be somewhat the same. I'm sure there are other ways to approach this idea as well other than mine.
Awesome, thanks again.
I'm doing this for my game as well, though you've already received several very good answers. I just use the same move route as opening the door, change the graphic to look broken, and make it so the player can no longer interact with it.

Good luck with your game! If you'd like any help with the editor, feel free to PM me; I'm usually available to help when I'm not at college. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/enemies-can-break-into-windows-and-doors.97178/