Announcement

Collapse
No announcement yet.

How do I identify which instance of a 'car' overlapped my 'power-up' for use in the HUD widget?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Is the "BP Base Car" possessed by the player controller? In your widget, you could use a "Get Owning Player" to get the player controller and "Get Possessed Pawn" to get the car. Then cast that to BP Base Car.

    Leave a comment:


  • How do I identify which instance of a 'car' overlapped my 'power-up' for use in the HUD widget?

    Hi guys,

    Wondering if anyone can help me there must be something obvious i'm missing here. I have created a 'power up' that destroys itself successfully when overlapped by my car BP. however I am trying to alter a variable in the car BP, and use that variable to change the colour of a box on the HUD. This will be the basis of a Mario Kart style power up/inventory system whereby the power up is stored and can be used at the press of a button. My issue is I have no idea how to reference the correct car in the wildcard slot of the cast in the HUD widget. I should also add I got this system to work fine by replicating it using the third person BP (I am using a GTA style template where the player starts in third person and may enter or exit the car) and simply walking over it. The difference is, there I was able to use 'get player character' as the wildcard object. Sadly, leaving this as it is set up for the third person and just driving over it instead of walking does not work either. I've watched numerous videos on casting but I still can't get it to work, any help would be greatly appreciated.
Working...
X