Hello~
So I’m working on ‘skill’ doing damage to ‘enemies’.
My goal is ‘skill(object) dealing damage when it is in collision with enemies’.
Not a single enemy but all the enemies it touches.
This is how I did.
However, because of ‘trigger once’, skill only deals 3 damage to 1 enemy and pass through.
If I remove ‘trigger once’, skill not only damage enemies but also kills them.
Enemies have 8 health.
I’m guessing that it’s because collision is happening every frame and it deals 3, 3, 3 and then kill em.
So I did this.
3 damage should happen once so i used ‘trigger once’
and collision shouldn’t have ‘trigger once’ because skill needs to damage all the enemies that it touches.
But if I run this, skill deals damage to a single enemy and than pass through the others.
hmmm I’m lost. I thought I did it right?? Could you guys help me please.
If you only need that 3 damage point per enemy you can always add an Object variable to the enmey so if Enemy.Variable(WasDamaged) == false do damage and change the variable to true this way only 3 damage to that enemy and when the skill collides to other enemy because of the WasDamaged is false is going to take 3 damage too, and remove the trigger once.
1 Like
Oh my GOD! It works!!
woow you are a genius! 

Thank you so so much!!!

This is what I did.