Help with problem with event spawning

I have a large enemy that when I kill it I want it to break down into smaller enemies

I have the enemy spawned in using galv event spawner plugin

so i assumed when it dies and the selfswitch page activates from chrono engine

that I could just galv.spawn (x,x,x)

but seems i can only spawn by regionid or coordinates and not spawn on the event itself

how could i get say a big monster when killed to do a galv.spawn at its location upon death?
Please note the section guidelines for Plugin Support (where this belongs) ask you to provide links for the plugins you're using so that it's simple for someone who's willing to help you to see the instructions and code.

but seems i can only spawn by regionid or coordinates and not spawn on the event itself
I don't understand the contradiction here. If you have an event, you can use the regular Control Variables commands to set two variables equal to its coordinates. Therefore, if you can spawn by coordinates, you have them.

The code for using a value from a variable in a script call is $gameVariables.value(ID) (with no leading zeros in front of the ID).

If you still can't figure it out, please provide links and examples of the syntax that you have to follow.
You want to spawn it in a particular way of the map and a dead monster is in the way? Or you want it on the spot of the monster, no matter where it is?

In the first case, it is pretty easy to solve. Either remove the event completely, or move it to an unreachable tile on the map, when the enemy is defeated. Now the spot is free for future spawns.

If you want to respawn it in the same spit, you shouldn't use spawn, but instead find a way to reset the event already there after some time. There are various ways to make that happen.
Galv's spawner which the OP is using lets you spawn overlap so that's not an issue. The OP also has to spawn new events if they want one event to "split" into multiple.
Oh oops. I am confused with yanflys spawn plugin.
Thanks for the replies but I found my answer... I don't think I was initializing the variables correctly but I'll leave the solution below for anyone else that may run into this problem.

Spawns 3 of event id 79 on the events position when condition is met
I have the enemy spawned in using galv event spawner plugin

so i assumed when it dies and the selfswitch page activates from chrono engine
Just a heads up OP, Galv Spawn and Chrono Engine don't play nice with each other because Chrono Engine itself is an event spawner (the tool map is an event template map, and whenever you use an item/spell/tool you are spawning that event on the current active map). What will happen sometimes is if you Galv spawn right before or after Chrono spawn/unspawn wires get crossed and your spawned Galv event will try to reference a Chrono Engine tool event, leading to "cannot find property" or other reference errors.

I recommend you either use either Ritter's spawner which will section off Chrono Engine spawned events to higher event IDs or Yanfly event spawner with Restart's fix (Yanfly's spawner may not carry over spawned event notetags though while Galv's (and Ritter's) spawners do).
any idea why sometimes when using chrono tools in succession I lose the ability to attack with my sword? It happens randomly and I haven't narrowed down what exactly causes it but for instance if I get hit shortly or before or after the hookshot anim i cant sword attack.. seems to be what happens but could be unrelated.

edit

oops sorry thought this was a reply to my other thread in plugins
If you're getting hit you could be getting knocked back which will prevent the player from acting for a few frames. Same with the hookshot
hmm the ability will come back sometimes but most of the times it stays gone even between maps and i have to restart the playtest to be able to attack again I don't know its weird and situational but annoyingly game breaking if an actual player were to encounter it
Are you able to use skills and items? Can the player move?
player can move but thats it
That's going to require some more advanced troubleshooting. Basically next time that happens, open up the console log (press F8 then click the console tab) and type in $gameMap.events() and see if there is any Tool Event listed, then click it and bring up its properties. You also might want to type in $gamePlayer and look at the player's properties.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-problem-with-event-spawning.170134/