Vladar458

Regular
Regular
Joined
Oct 13, 2020
Messages
143
Reaction score
19
First Language
Spanish
Primarily Uses
RMMV
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.
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,264
Reaction score
1,694
First Language
English
Primarily Uses
RMMV
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.
 

Attachments

  • 1695615907064.png
    1695615907064.png
    364.6 KB · Views: 4
  • 1695616058129.png
    1695616058129.png
    266.1 KB · Views: 4
  • 1695616536359.png
    1695616536359.png
    239.2 KB · Views: 4
Last edited:

Vladar458

Regular
Regular
Joined
Oct 13, 2020
Messages
143
Reaction score
19
First Language
Spanish
Primarily Uses
RMMV
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
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,264
Reaction score
1,694
First Language
English
Primarily Uses
RMMV
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.
 

Vladar458

Regular
Regular
Joined
Oct 13, 2020
Messages
143
Reaction score
19
First Language
Spanish
Primarily Uses
RMMV
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.
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,264
Reaction score
1,694
First Language
English
Primarily Uses
RMMV
Near the bottom you put %gamePlayer instead of $
 

Vladar458

Regular
Regular
Joined
Oct 13, 2020
Messages
143
Reaction score
19
First Language
Spanish
Primarily Uses
RMMV
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).
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,264
Reaction score
1,694
First Language
English
Primarily Uses
RMMV
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.
 

Vladar458

Regular
Regular
Joined
Oct 13, 2020
Messages
143
Reaction score
19
First Language
Spanish
Primarily Uses
RMMV
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Yknow what? Im seriously considering recruiting a manager to oversee my games development.
Because I cannot focus or complete these tasks by myself. I need someone to give me orders, without having them be my boss.
yp_4vS.png

Remember my latest plugin for rpg maker mz:

Acknowledgement Window is now available!

Take a look here:

Got my focus back, 9/59 maps have the door fix in place now.
Making a small RMMV project has made me realize that I've never actually made a credits sequence for a game.

Forum statistics

Threads
136,803
Messages
1,270,175
Members
180,557
Latest member
nlee
Top