How to kill NPCs in the open world?

Hi! I recently had a game idea involving a feature where i could interact with NPCs in the open world, and they would react accordingly to my actions (example : npcs run away when the player is holding a dangerous object too close to them). I'm not a fan of battle systems and i'm still new to RPG Maker. I've tried making it myself multiple times for hours but i could never reach the result i'm trying to achieve, I'm always running into bugs and stuff. I thought about changing the player's image to add a knife in their design when they pick it up, and also for npcs when they're lying dead on the ground or when they are scared (set movement route -- change image).

For now, I've made it so when I use the knife (item) in my inventory, it sets 1 to a variable. When that variable is set to 1 or above, the NPCs on the map will run away from the player. However i'm kind of stuck beyond that point. I've tried using different event pages for the npcs but i still run into bugs.

I drew what I had in mind so you can understand better, the files are attached below.
Anyone can help me out? I'll gladly accept any help i can receive!
(Btw sorry if i wasn't clear enough, English is not my first language)
Conditional branch if variable x = > 1 => Turn on self switch with dead npc graphic (Action button)
else
"Hello stranger" Or whatever else the npc is supposed to do.
you don't have NPCs on the map, you have events pretending to be NPCs on the map - and you are in full control of these events, so you can have them pretend to be or do anything.

and to implement your idea (without going full ABS) you should basically have each event with multiple pages for different states like friendly, angry, dead, sleeping or whatever.

and then simply define conditions for each page that would activate them and so on.


But it has to be implemented from the event, you cannot simply impose the function externally to an existing event. Mostly because changing the sprite does not change the event behaviour.
so if the shopkkeeper has no code for "being dead", then it would continue selling things as a zombie after changing the sprite to a dead one.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-kill-npcs-in-the-open-world.177470/