Events triggered by specific collisions

Hello, I wanted to know if I could trigger events based on specific collisions within a blueprint colliding .

For example, let’s say I have 5 collisions (C1 to C5),
can I make it so that if C1 collides with C3, it adds 50 health
If C4 collides with C5, subtracts 100 health, and so on?

Help would be much appreciated, thank you.

Yes thats totally possible you just need to test the other actor pin . This can be done wihh a cast or with the equal node . The equal node is really east to implenent if your in the level blueprint aince you can drag references into the graph

All the collision elements and health are in a single blueprint, do I still need to do it in the level bp?

Nope i just mentioned that since many questions are asked by people who are new and dont much about building their own blueprints yet. I also didnt expect all the items to be in one blueprint haha

Oh ok, any way I could get a link to someone demonstrating using the method you speak of? Or a screenshot if possible, so I don’t go groping in the dark.

yea i was just making something real quick.

this is the most basic way to do things. theres probably many other ways to do this as well, but this shows the basics. pretty much you get a overlap event of a component then you do a series of tests to see which other component its overlapping. just substitute the print strings for the behavior you want like adding health.

Thanks so much, will give it a crack when I get home and will get back to you

Ok, so I tried it and it worked but not in the way I was hoping.
It works if the two objects colliding are the same, enabling me to use the false in the event that they aren’t .

however in my scenario, i don’t have to equal objects colliding, I have two different objects with the same collision, so it registers everything as false.

Lol sorry, let me give you the basic idea of what I’m doing.

Let’s say there are 4 elemental walls and 4 projectlies . (Fire, Water, Wind, Earth)

The projectiles fire at these walls. Now the fire wall and the fire projectlie both have a “fire” collision. I want to trigger certain events when the water projectile (with a “water collision” hits the fire wall)

…did I just make things worse? Sorry, English isn’t my first language. Lol.

i think your going to have to elaborate a bit more on what you aim to accomplish and what exactly you tried. what youve written doesnt really make any sense.

so i would think that the walls and the projectiles would be separate actors yes? you were saying that they were all in the same blueprint earlier so i guess there was a misunderstanding.

if they are two separate actors then you want something more like the following picture where theres a few different ways to accomplish the task. method one is similar to the method described before where on collision the wall tests the projectile to see if it matches a certain class and if it does match then it does a particular thing. in the picture i made a fire wall so when its hit by a projectile of the waterProjectile class the wall takes damage, but if its hit by a fireProjectile then the wall gains health. the second method is similar but it uses only one projectile class and just gets a variable from the projectile class (element) and compares that to a variable in the wall (wall element) and uses this information to decide if the wall should take damage to be healed.

let me know if im on the right track.

I tried method 1 and it’s working perfectly so far. Thank you so much for your time and help.