Sometimes when I get stuck especially if it’s because of my own logic, one of the things I do is go over my logic again, try and come up with the easiest solution again even if it’s longer, can always shorten it afterwards.
Granted, this doesn’t always work
In this case, here’s what I would do.
Have the player pawn/character or whatever should contain the stun logic as in, how it, itself, deals with colliding with the stun collision, so all the boss arm provides is a collision box for stun collision and what ever else that just the boss arm needs.
I would also, just have a single custom collision object channel for the stun with the default set to ignore. (So you don’t have to go around setting everything to ignore, just enable what you need)
Also in the boss arm, Id have logic so that if the arm isn’t colliding with the ground then the collision detection for the stun mesh is disabled, and stun collision box object type set to stun. (You could also check to see if it collides with the player, so you don’t get false positives by touching the arm unless you want it so you get stunned by touching the arm as well)
Then in the player have a separate collision box for stun detection, everything set to ignore except stun, that set to overlap (imo this will make figuring out what it collided with easier), then from the component begin overlap node for the stun collision detection box go through stun logic, check if can be stunned (if you’re currently stunned or what ever), if so then find out how long to stun for and stun, if not, ignore.
This way, you wouldn’t need to check if your character is on the ground because the stun collision will only be enabled if it’s touching the ground, and if it’s thin enough, you’ll only get shocked on the ground, otherwise, your golden.
Then to find out how long, well it depends on various other factors for how I would do it, but if it’s just the boss, then a single stun length variable in the player bleuprint would be fine.
This is what I would do. I hope it makes sense.
So instead of trying to fix what you’ve already got, attack it from a different angle.