hi
i have a problem, i want my character to be teleported on my “horse” but it’s saying an error : cast to BP_horse was pruned because it s exec pin …etc
what do i do?!
hi
i have a problem, i want my character to be teleported on my “horse” but it’s saying an error : cast to BP_horse was pruned because it s exec pin …etc
what do i do?!
Yes, this won’t work. You need to know WHICH object to cast to BP_Horse.
Which class is this code running inside?
Do you know which object is the BP_Horse actor? Is it the object that has this code in it?
If this blueprint is the horse blueprint, you need no cast, just use “get reference to self.”
If the horse is some other object, then you need to somehow get ahold of it.
If the player controller knows which object is its horse, you can get the player controller, perhaps cast it to your player controller subclass, and then read the horse property from there. If this blueprint is inside the player controller already, just read the property.
If there’s nothing in your current setup that tells you “what is the players horse?” then you have to build that somehow.
If there’s only one horse in the entire game, and that’s the player’s horse, then you can use “get all objects of type” and pass in BP_Horse as the type, and then take the first object of the array that comes back.
thanks for your time i will try that and yes this blueprint is in my horse
ok so it work
cast to BP_horse is now get player character
Getplayercharacter is now self
but there is a problem the object is spawning in my head even if he is at the other side of the map and i don 't know why, if i leave the object and go in his collision box i’m tp but at the start the box is in my head !
(this is maybe a really dumb question but i m new to blueprint … : ) )
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.