The skill attack is weird

I’m a little late in responding. Sorry, I kept checking the cause of the error yesterday, and I finally solved it! First, as Greg said, I found the cause by clicking left/right.

I told you yesterday that there was TakeDamage in the Base class. When I left-clicked the base, I had to call the hit actor’s TakeDamage in the base. But the problem here was that when calling TakeDamage, the TakeDamage declared by ai was also called.
I was confused by the fact that the function declared in ai was called even though it didn’t inherit Base. So I set up Deligate with OnTakeAnyDamage to create a new function. I thought this wouldn’t call the new function. But it was also called.

In conclusion, we used DamageType for the solution. Of course, I’m not sure if this is the right way. I’m also new to DamageType, so this might not be the answer.
I simply created a DamageType class, with the skill name. And when I right-click on the ai class, I made sure that it was the corresponding Damage Type. If it was the corresponding Damage Type, I made it so that the skill would be activated.

It just kept me talking. :sweat_smile: Thank you very much for answering Greg. It gave me the courage to fix the error, and I didn’t give up.
(The sentence might be awkward because it’s written with a translator…! Please understand.)

1 Like