i got a Blueprint of the Actor* Class, wich contains some functions wich should affect _self lets say a own form of Set Actor Location. After that i created a second blueprint and choosed first bp as parent class. when i now place the second bp class in my scene but when i try to call the function (the new location is passed succesfully) and SetActorLocation its result is false and the actor is not moveing… what am i missing or doing wrong? i just want to clean up my code and make one parent class from wich i want to make some child classes with altered logics
If you have a function used in your parent and your child you need to call the parent function to have them both activating (right click on the event call to find “call parent event” )
i just use the parent class to hold the common and shared functions of all its children. (Function Lib doesnt work for me because i use variables in my functions). when i do a PrintString on the stuff i pass to the function i have results… the ref to self also returns the correct name of the childclass … the Set Actor Location just doesnt work
The Box is inside my Character Controller and called every tick. I do a linetrace and just check where i hit the ground… the object is a reference to my Child Blueprint spawned on Begin Play.
Casting it into the Child BLueprint Class instead of the Parent class wont work either
everything is passed fine and when i do a debug print out of the function ReactOnTrace i get my values… the problem is if i use Set Actor Location nothing happens it just returns false
I don’t know, maybe an overlap effect which makes move fail ? (i had this trouble on move recently…)
if that was me, i would first try the function with parent itself (even by doing function in another bp without parenting effect) to see if it works, then knowing if parenting is involved or not and then check function itself…
Stupid me!!! I simply had to switch the Mobility option of my Static Mesh Component in my parent Blueprint to movable from static… well i feel stupid now