I have a spell set up that should give a multi sphere trace when it begin overlap. Result is, I get a green box when I cast the spell (reads myself) and I don’t get the ai.
In this picture you can see the blueprint
Hey there @TheSceriffo! Welcome to the community! If I’m understanding correctly, you’re trying to make an explosion on yourself as the player, and get the out hit of the enemy right?
Is this script on another object or on the player itself?
Is the AI on the pawn trace channel?
To ignore the self all you have to do is check off Ignore Self in the sphere trace.
Also to save you some effort, if you’re on windows to take a screenshot you can use the Snipping tool or the Print Screen key on your keyboard if you have it!
What I’m trying to do is throw a fireball from my character that will damage any ai in its way. By checking or unchecking the ignore self button nothing changes, I still get a green box around my character as soon as I fire the fireball
This script is on the fireball actor itself right?
I think that ignoring self is not the problem because your fireball seems to be an entirely different object from your player, this means it’s ignoring itself but not the player that threw the fireball. You’ll need to ignore the player (which means you should add the playerref to that ignore actor array you made).
May I see how your playerref variable is set? When the player instantiates the fireball is it passing it in then? I’m guessing the playerref is invalid on the fireball thus it’s making contact with the player with the collision sphere as well as the trace.
Another question is may I see how your collision profiles on your player and AI are set?
Can you also print out all objects the sphere trace hits? Should clear some things up.
No worries! So one thing I see missing is where you declare the Playerref variable. When you create a new fireball, how does that variable get set? The default I can see there has nothing in it initially so you’d have to set it when the projectile spawns.
So a good way to print what it hits would just be to do this for the sphere trace.
A bunch? It should only be kicking back your player or the enemy. The player should be being ignored if the playerref is set correctly on the projectile, and from what I could tell your enemy was called MasterEnemy. Were you checking it’s parent class or just outputting the hit actors name like my BP?