Making a respawn for my vehicle?

AHA! Just had a light bulb moment :slight_smile:

So… this gets a little tricksy. Since you are dealing with the Sedan BP as your Player Pawn (not a character based class, but pawn based), you need to cast to it’s parent first to be able to talk to it directly. If you look up to the top-right corner of your Sedan BP, you will notice it says “Parent class: Wheeled Vehicle”. This means that it not only is the Sedan, but it is derived from the Wheeled Vehicle class as well (which gives it physics and such). In order to go from the Game Mode to the Sedan, we need to get the pawn, cast it to the Wheeled Vehicle class, then recast to the Sedan.

Also, something fun to play around with during casting, is the “Cast Failed” pin. This lets us do something else if the cast ever fails on us. I added a “Print String” node, and typed in some information to see how far the casting was actually getting for quick & dirty debugging (there are much more elegant ways to debug, I’m just not there yet LOL).

The only issue I’ve run into so far, is that whenever I make it respawn the car, it will only do it completely one time. I’m not 100% sure why this is the case, but don’t have much time to really look into it now, sorry. If you need further help though, I am willing to help and learn when/where I can. :slight_smile: