Mog Chrono engine stun/paralysis

I´m using Chrono engine, an real time battle system. When i create a state that should inmovilize the player, like a stun or paralysis, it just don´t work. There is a way to create a status ailment that stuns the player for a few seconds? I have this idea for a spider enemy that shoots a spider web at you, and if connects, don´t let the player move for a few seconds.
There's not a great way to do this because ChronoEngine changes the collision for tool map events and you can't just make them trigger on player touch or event touch, and the player needs a special script to stop the player from moving. So here's a workaround: Whenever this attack is used, it will turn on a switch. The switch triggers a parallel event that will wait 60 frames/1 second (so the attack has 1 second to hit the player), then check if the player is affected by the stun state (id 14 in this example). If yes, the player can't move until the state wears off, and the switch is toggled off.

The alternative is you have this parallel event running all the time checking every second if the player is affected by the state, but you generally want to minimize the number of parallel events you have running at any given time.
There's not a great way to do this because ChronoEngine changes the collision for tool map events and you can't just make them trigger on player touch or event touch, and the player needs a special script to stop the player from moving. So here's a workaround: Whenever this attack is used, it will turn on a switch. The switch triggers a parallel event that will wait 60 frames/1 second (so the attack has 1 second to hit the player), then check if the player is affected by the stun state (id 14 in this example). If yes, the player can't move until the state wears off, and the switch is toggled off.

The alternative is you have this parallel event running all the time checking every second if the player is affected by the state, but you generally want to minimize the number of parallel events you have running at any given time.
I think i´m doing what are you saying, but i get this error when i try to use that method.
imagen_2023-09-25_132408978.png


My RPG Maker is in spanish, but i think i did it right, no?

Captura de pantalla 2023-09-25 131742.png
It looks like you've added plugins that are not part of ChronoEngine. Turn them off and see you if you still get the error.
It looks like you've added plugins that are not part of ChronoEngine. Turn them off and see you if you still get the error.
Now i just get an error that says: "SysntaxError Unexpected token %" Also, now, for some reason, enemy attacks don´t apply status ailments.
Near the bottom you put %gamePlayer instead of $
Near the bottom you put %gamePlayer instead of $
You know? I kinda get what i wanted in a pretty much regular way. I just put this in the map where the enemy is.
imagen_2023-09-25_150924043.png


Anna is the name of the character. basically i created another new skill that it works with a 100% chance of stun. If connects, the event activates and the player can´t move for 180 frames (3 seconds).
Ok, but if you do it that way you will have to put that event on every map, and it has the problem I was specifically trying to avoid, running a parallel process all the time to check if the player has one state. If you have multiple parallel processes it will start to lag your game.

It also only works on Anna, so if the player character is anyone else it won't work.
Ok, but if you do it that way you will have to put that event on every map, and it has the problem I was specifically trying to avoid, running a parallel process all the time to check if the player has one state. If you have multiple parallel processes it will start to lag your game.

It also only works on Anna, so if the player character is anyone else it won't work.
Nah, that is not a problem. The stun capacity is something i only want to give to very few enemies in the game, especially bosses. (The spider i mentioned in the beggining is a boss i want to make) And Anna is the only playable character, so that is not a problem too.

Original thread: https://forums.rpgmakerweb.com/threads/mog-chrono-engine-stun-paralysis.161452/