x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

*Bump* Overridden Parent event called without a call from child. Bug? Only happens once

I'm new to Blueprints. I've got a parent class (AI_Enemy with Events: Wander, Idle_Wait, BeginPlay) and a child class(AI_Minion with Event: Wander). When I place breakpoints on entry to Wander, Idle_Wait, and BeginPlay, I hit the Wander Event of the child first of all. It executes on the child until it hits the AIMoveTo function and then execution jumps to the parent BeginPlay event. It executes there and calls into the parent's Wander function(why?) and runs until it hits the AIMoveTo function there. The next step into command I give will kick me out of debugging and give me the error "Infinite Loop Detected. Blueprint: AI_Enemy Function: Wander". First Question: Why does the Wander of the child get called even before BeginPlay of the parent? BeginPlay of the parent is the first place the Wander Event even gets called. Second: Why does the Wander event of the parent ever get called if it's overridden in the child class and doesn't have a call to the parent anywhere? Thanks for the help. I've been banging my head on this for a while. alt text

alt text

And the Wander Event of the Child Class: alt text

Product Version: UE 4.20
Tags:
more ▼

asked Aug 11 '18 at 11:47 PM in Blueprint Scripting

avatar image

Johnnymoha
11 1 3

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

As i ynderstand it, a child class executes the functions it overrides, in its own class, and then if you specifically nake a call to the parent class' version of the function, then that one will run too. I am guessing that maybe the behavior trees or something natively calls that parent version of the overridden function.

more ▼

answered Aug 12 '18 at 12:46 AM

avatar image

mightyenigma
3.7k 18 18 15

avatar image Johnnymoha Aug 12 '18 at 12:39 PM

That's even more confusing because I actually don't have a behavior tree.

avatar image mightyenigma Aug 12 '18 at 01:59 PM

oh. sorry, i assumed you had one because it was an AI. Hm, so nothing that is calli g the Wandering event is getting called by something else that gets called by the Wandering event?

avatar image Johnnymoha Aug 13 '18 at 06:14 AM

Ok I was seeing two different actors in the level that were both children of AI_Enemy. So the first had an override for Wander and the other didn't, that made me think it was executing in a weird order. I may have to change my original question text now. I've still got the original problem, however with the infinite loop. I hit the infinite loop once both world actors have been given the AIMoveTo command and I give the next "step into".

avatar image mightyenigma Dec 13 '18 at 01:04 AM

Hmm I wish I had more knowledge and experience to help you.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question