Why doesnt my cast work? (trigger box to actor)

I have a trigger box that activates on overlap. Then I try to get hold of the dudette blueprint that has a skeletal mesh and the custom event drop dead in it. I get cast failed. Pretty sure the “Get Owner” is the problem but that’s where Im stuck.

18763-trigger.jpg

“Get Owner” would be either the “PlayerController” or “AIController”.

I’m pretty sure you don’t want either of those especially since the target is “Self” so it would be the Player or AI Controller from the trigger box.

I think what you’re looking for is “Get Player Character”.

However since you’re already using the “Event Begin Overlap” you could also use the “Other Actor” pin provided. This will give you whatever actor did begin to overlap. Cast that directly and you should be fine.

Thanks, but I try to get hold of the skeletal mesh within the dudette blueprint and not my character. Isn’t that what I have to specify as Object?

Well would you mind telling us then what your dudette BP is and how it is connected?

Right now I have these facts:

  • You cast to dudette1 from “Get Owner”.
  • The result calls a function which after delay X sets “Simulate Physics”.
  • It does not work how you would like it to work.

I assumed dudette1 would be your character which apparently turned out to be wrong so what is it?

How is it connected to your trigger box?

Well is it a reference or an empty variable or the type dudette1?

Also there is no reason to cast something to it’s own type. That shouldn’t work.

Casting works now, I used get all actors by class and then took the first from the array. I guess this isnt the best solution though because if there are multiple instances of dudette I would have to loop through the array to trigger the custom event each time.

Now the simulate physics part for the dudette bp isnt working. Again it seems I have the wrong target… :X

Would you mind telling me the purpose of this script?

I have no idea what Dudette is, what it’s supposed to do or how exactly it is interacting with this script.

This means I have no idea how to help you. There are several ways to pass something on.

For example the player like I mentioned earlier.

If your dudette is already in the level you could use a variable of the type dudette1 and make it editable allowing you to place your trigger box and then selecting one instance of your dudette which it is linked to from a dropdown list.

If you would be so kind as to tell me what exactly you are trying to do I could tell you more specific a direct way of doing so for your case.

As of now this is all I can possibly do.

Thanks a lot. Sorry if I didnt provide enough information.

The trigger box is just a box the player pawn walks into. Then the girl which is a skeletal mesh with an animation within the dudette blueprint should go ragdoll.

So I have two different blueprints. One is triggerbox and one dudette.

The character / player pawn is not involved besides triggering the on overlap event in the trigger box blueprint.

Just reposting what I posted below that people who read this later get the references.

The trigger box is just a box the player pawn walks into. Then the girl which is a skeletal mesh with an animation within the dudette blueprint should go ragdoll.

So I have two different blueprints. One is triggerbox and one dudette.

The character / player pawn is not involved besides triggering the on overlap event in the trigger box blueprint.

In this case what I just tried to explain should work perfectly.

Create your Variable (inside of that trigger box) of the type dudette and select in the details of that variable “Editable”.

After you placed it in the level you have in the details there a dropdown box from which you can select the dudette you want connected.