Stun Event not working properly working

Niloc

Veteran
Veteran
Joined
Jul 27, 2020
Messages
71
Reaction score
12
First Language
French
Primarily Uses
Other
Hello. I've been trying to create a map ability in my game that will shoot a projectile and stun an ennemy.
I managed to make most of it work, however the duration of the stun is a bit special. I don't want a duration in time but idealy in steps.

However if I store the steps in a variable it will be a global variable, meaning that if the player want to stun 2 ennemies they will share the same stun time. Is it possible to make some "independant" variable without having to create one for each ennemy ?

My B plan is to just have unlimited duration of stun on an ennemy, however player can only stun 1 ennemy at a time.
I managed to make it work, however some bugs still happen sometimes where I can stun two ennemies and I don't really understand why that is happening.

Here's a showcase of what is happening :
Stun480.gif
As you can see here, it worked fine the first 2 times but bugged on the third, and it's quite random.


Here are screens of the events I use :

1596563136507.png
This is basically the projectile and when my player fires the projectile (I use YEP_CommonEvents to activate the common event) the switch 08 : Stun turns off.

1596563244924.png
And the ennemy once the B self switch is on (I use Galv's map projectile and when a projectile touch an event, their self switch B turn ON).
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,920
Reaction score
7,450
First Language
German
Primarily Uses
RMMV
look for a plugin that creates event-based self-variables.

I think there are a few, but the only one I know to exist is from Yanfly, and I don't know if it is one of his free plugins or if it has to be paid for.
 

Niloc

Veteran
Veteran
Joined
Jul 27, 2020
Messages
71
Reaction score
12
First Language
French
Primarily Uses
Other
Oh great, I do have all of Yanfly's plugins, could you give me the name of the plugin ?
 

Niloc

Veteran
Veteran
Joined
Jul 27, 2020
Messages
71
Reaction score
12
First Language
French
Primarily Uses
Other
Awesome, I'll look into it :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Say, does anyone know any other indie game development forums? Progress on my uni survey has been a little slow, so I wanna look into posting it around a bit more.
Due to the bullies' resurgence on Facebook and Twitter against my friend (and I since I defend), we've decided to move over to tumblr to try to obscure our presence, where we might finally be at peace working on games. If anyone wants my/our game's tumblrs to follow lmk. :kaojoy:
Is there anyone need help with anything except art and music?
is Gotcha Gotcha Games Inc. = KADOKAWA CORPORATION? I haven't found this topic yet, Want to know for credits on my game. Thanks.

Forum statistics

Threads
104,300
Messages
1,005,392
Members
135,825
Latest member
uniteditcare
Top