How to cast Actor In Widget Blueprint

Hi, I have an actor in my scene (Bowling_pin) that when the top of it touches another actor (Fall_Collision) after being hit by the player character it needs to score a point on HUD.

Both actors are in the scene (Fall_Collision + Pin)

  1. I set up the function to +1 score in the (Fall_Collision actor BP)

  1. I referenced Z function in the (Pin)

  1. When I try referencing the (Fall_Collision actor BP) in my HUD I have no object reference. It is just a wildcard. How do I cast to an in scene actor with a widget?

Thank you

I think its a good idea to leave your “Score” variable in a PlayerController blueprint or GameMode blueprint, so you can get it by any other blueprint with GetGameMode or GamePlayerController functions.

Otherwise you could use a GetAllActorsOfClass (assuming you only have one Fall_collision actor in your level) which is totally NOT recommended, as you’d be scanning all actors in your scene every tick. This would hinder your game’s performance.