Flip car as different possessed pawn?

hey guys so i have this script for my AVS Vehicle to flip the car, it works great and looks like this

but i also want to be able to flip the car whilst in my first person character, i tried throwing the script in the first person bp but i cant seem to remember how to reference the other bp and all ive been able to get is a bunch of errors or nothing at all, hopefully this is easier than my last thread haha, thanks for any help or pointers i receive!

Hey, I think you can solve this with “cast to your Vehicle”

yea i just cant figure out what its object is, i have been trying for a while now

Hey @Leafies121!

Here are a few non-Epic affiliated videos as well as an Unreal Engine live training on Blueprint communication that should go over all you need to make flipping your car work (and any other communication between objects as well):

Blueprint Communications | Live Training | Unreal Engine

Blueprint Communication - UE4 Tutorial

HTF do I? Blueprint to Blueprint Communication

I hope the above provides the solution you need!

well watched the videos on interfaces and it still didnt work

Hey @Leafies121,

Would you mind sharing what you tried after looking over the videos? At the moment, it is impossible to tell what could be going wrong without seeing how you implemented the blueprints across your blueprints (interface/character/etc).

Any additional information and specifics you can provide will go a very long way in solving your problem.

okay so

i made a blueprint interface and a function inside it named CarFlipper

, added the interface to my AVS Vehicle Blueprint

then created an event named Car Flipper and attached it to my Car Flipper code that works when driving the car

then in the first person player I added an actor variable named Flipped,

Created a button press, linked that to the message to the interface and linked its target to Flipped

still havent figured this out

Both the Character class and Vehicle class need to implement the interface.

When possessing the character it needs a reference to the vehicle. Best course is to line trace to the vehicle. Get the reference that way.

Then you take hit actor → does implement interface → Call BPI event.

For multiplayer you’ll need the server to do the trace and call.