Announcement

Collapse
No announcement yet.

Trying to call parent function from override of same function in child?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Trying to call parent function from override of same function in child?

    I have a function that checks if your character can interact with an object. It is originally declared on a c++ class, then I have a BP (BP_A) derived from that c++ class, then finally a child BP of that BP (BP_B).
    Inside BP_B I override the function and try to do a call on the parent for the function. UE4 throws back a compile error saying "Function Parent: Can Interact can modify state and cannot be called on 'self' because it is a read-only Target in this context".

    What am I doing wrong here? Thanks for any help.

    #2
    Cswic

    I've only seen the Parent calls used for UE4 BP Base Classes. Try to override Function in BP Function Menu.

    Click image for larger version

Name:	function-list.PNG
Views:	431
Size:	19.3 KB
ID:	1657867
    HeadlessStudios.com - S P A G H E T T I: Ninja Swords, Guns & Monsters & Other S**t! - Join Our Discord

    Comment


      #3
      Originally posted by TechLord View Post
      Cswic

      I've only seen the Parent calls used for UE4 BP Base Classes. Try to override Function in BP Function Menu.

      Click image for larger version

Name:	function-list.PNG
Views:	431
Size:	19.3 KB
ID:	1657867
      I am overriding function A. The "call Function A on Parent" is inside the override of Function A on the child.

      Comment

      Working...
      X