Cast failed

Hi guys I keep this nice and short, my cast is not working, and I dont know why, here are the screenshots you need,
240766-

these cast fail to move past the cast node, im certain it has something to do with the get owner section, but ive tried countles of things and none have worked, pls help!!.

i dont think that type of setup would ever work. is the blueprint your showing a actor component of the stairs_bp? if not it will fail everytime.

what you need to be plugging into the object pin is a reference to an actor that is the stairs_bp if you want the cast to pass.

if you explain what your looking to accomplish a bit more maybe i can help you get the reference you need and rewrite your code so that it works for you.

Yea that is in a level BP, i can see the cut off at the bottom…that won’t work, level BPs don’t “own” anything. BUT it is very straightforward to make a reference to whatever you want in the level blueprint by selecting it in the viewport, right clicking in the level and say create reference to selected object/s

good catch i didnt even notice it was the level bp. yea your right it is super easy to get references in the level bp.

so all i have to do is get a refrence from the level as to which actor the level_bp belongs to?

No, the level doesn’t “belong” to actor. What I’m saying is make a reference in the level BP to your stair BP and then you can call your function inside the stair BP from the level.

Right so what i did, was grabbed the actor off the world and created a refrence in the level blueprint, that fixed that issue, now the other issue at hand, in the character blueprint i cant do the same thing so what can i do for this?

the door is the actor which is the levels_bp, now thats just a name right so dont worry too much about it.

240786-door.png

what im trying to do what cast to this actor blueprint through both my character and the current level blueprint.

I fixed the issue of casting from the level blueprint like this:
sorry caps.

Now the next issue is the characters blueprint which in this case is 2dSideScrollerCharacter.

now i cant do the same here because i cant make a reference from the world so easy like i did in the level blueprint so, here im stuck.

lol yea im getting level confused with stair_bp, sorry but i understand what your saying

Use the collision capsule of the player and have it check for overlap events. On overlap, cast to stair BP and there you will have the reference to the stair BP from the player character

I see what you mean, However I have tried that and well nothing happens again, it doesnt go past the casting stage.

Does it fail or does it not overlap?

I don’t see, if you print it off the fail node does it print?

fails you see

yes its printing off when it fails

if its failing then that means you are overlapping something that doesnt inherit from the stairs bp class. i personally wouldnt be using the capsule for overlaps in this case since the capsule is set to block most things, like stationary scene objects as in stairs. if both are set to block then they will never overlap. if your trying to use a overlap with the stairs to open a door then i would have this script in the stairs blueprint. this way theres no need to cast to the stairs and it keeps the character bp cleaner and free of clutter. of course this is all dependent on whats in your stairs bp and what your looking to accomplish. im assuming that the door here that your trying to open is part of the stairs bp. if the door is not part of the stairs be then you will still need to reference the door from the stairs. so this whole situation could benefit from a bit of clarification on your end goal aim is, instead of us basing this on what we are guessing you want to do.

Right, so lets start from the beginning. The stairs_bp is an actor which when called upon, I want to allow the player to press e and then open the door, which you see in the world. and then will throw the player into a new level, sort of liuke a level complete in mario.

Open door event will play the opening animation or flipbook in this case and then it will open a new map.

The issue is that I want to cast to the stairs_bp I need to rename this, its too confusing from the characters blueprint, however when I do try anything It doesnt work. as we have stablished.

is ok guys, thanks but I fixed it now, thanks for the ideas though, really helped