Feel
Member
Hi developers !
Before anything else, sorry i'm a bit bad with english, so i will try to do my best to explain what i try to do.. !
Some context to begin :
- I have multiple projectiles that cannot be destroyed. (permanent in the room)
- These projectiles belong to the player.
- The number of projectiles is unknow. (can be 1, 2, 3... or a way more 20+)
- They can (and must !) damage enemies.
This is where the trouble begins ...
Imagine we have 2 projectiles A and B, and 2 enemies Y and Z.
When projectile A hit enemy Y.
Y become invincible to projectile A for a short duration, but enemy Y still can be damaged by projectile B.
And projectile A still can hit enemy Z. (B can also hit Z).
If my reflexion is right (doubt is allowed )
The idee it's to have a timer related to an id projectile.
If an enemy is hit by a projectile, he keep the projectile id, create timer related to it, and become imune to this id, until the timer ends.
But i rly don't know how to do that ...
I hope it's clear, i won't lie i've tried so many dumb things since ... more than 6hours now ... rofl, i just want to go take a nap right now.
Thank you if you had the courage to read so far ..
Before anything else, sorry i'm a bit bad with english, so i will try to do my best to explain what i try to do.. !
Some context to begin :
- I have multiple projectiles that cannot be destroyed. (permanent in the room)
- These projectiles belong to the player.
- The number of projectiles is unknow. (can be 1, 2, 3... or a way more 20+)
- They can (and must !) damage enemies.
This is where the trouble begins ...
Imagine we have 2 projectiles A and B, and 2 enemies Y and Z.
When projectile A hit enemy Y.
Y become invincible to projectile A for a short duration, but enemy Y still can be damaged by projectile B.
And projectile A still can hit enemy Z. (B can also hit Z).
If my reflexion is right (doubt is allowed )
The idee it's to have a timer related to an id projectile.
If an enemy is hit by a projectile, he keep the projectile id, create timer related to it, and become imune to this id, until the timer ends.
But i rly don't know how to do that ...
I hope it's clear, i won't lie i've tried so many dumb things since ... more than 6hours now ... rofl, i just want to go take a nap right now.
Thank you if you had the courage to read so far ..