Download

Owning Pawn node?

hi,

I am attempting to create a tracked vehicle like the one Alan made in the recent stream but it’s been a while since I used BP’s and I’ve hit a snag

https://youtube.com/watch?v=Oh7pDL8RFaI

I got my vehicle moving ok doing what he shows in the beginning of the video but I want to use the scriptable BP components like he does later on however when he opens(19:40) the “Tank Motor” as he called it there is an “Owning Pawn” node and I cant for the life of me work out how to create it, I managed to create a variable that looked right but when I hit play nothing happens and when I stop playing I get a warning saying (Accessed None ‘Owning Pawn’ from node “Add actor local offset” in blueprint “RC Rover Motor”).

so does anyone know how to create the “Owning Pawn” node?

thanks

Well, I believe it could recreated with multiple ways.
For example, set variable in construction script with GetOwner node -> CastToPawn(pass object at success, null if failure)

What I think he is saying, you can make them a bunch of times, and just pull them into to any graph. Never knew that.

I like them

Plugin component, make a BP and search component

edit might of read question wrong

Narg

if’s just the owner of this component , in Initilize Component event : GetOwner->Set it to a variable

that all looks like coder speak to me:(

I cant remember how to cast, although why would you cast to pawn?

–edit–

nevermind, I decided to try working around it without the scriptable component so I don’t need to work out how to cast now:).

GetOwner will give you any **actor ** that own this component. It could be some Static Mesh Actor or ParticleSystem Actor. However with Cast node you will pass object to variable only if it really pawn and nothing else won’t get here.

To get cast nodes - drag out return value of GetOwner node and type “Cast” with Context Sensetive on, otherwise you won’t see Cast nodes!