The skill attack is weird

Hi everyone. I’m building a skill right now, but I’m having trouble..
I made the skill work when I right mouse click. But when I put the effect and sound in it, the skill attack became possible even when I left mouse click. Why..?

I set up an anime notify through a skill montage. I detected a collision with ai in the player character and let them apply the skill. But the left mouse button attack is a combo attack that has nothing to do with the skill. But the skill gets triggered. What should I do…

Hi can you send a screenshot of your set up?

Yes thank you for your answer first, let me show you the things I set up, should I send it like this..?

First of all, my code is long, so I’ll explain it in words. I’ll send it to you if you need it!
There is a class called CharacterBase. Ai and player inherited that class. We’ll shorten CharacterBase to Base. There are TakeDamage functions in Base and ai. I privateized TakeDamage in Base because I didn’t want TakeDamage in the base to be affected by TakeDamage in the base. It was redefined in the ai.

The picture below is InputMappingContext.


The picture below is Effect. There are two Effects in total, one attached to the ai body. Sound is set the same as the effect first picture.

The picture below is notify setting of combo attack montage

The picture below is notify setting of skill montage

it would be useful to see what you call from your left/right click, literally the blueprint nodes after IA_Attack and IA_LightningSkill

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