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 :
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 :
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.
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).
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 :
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 :
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.
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).