Hey all!
I have a weird issue going on with my project that I’m hoping someone could shed some light on.
In my project, I have a RibbonTrail ActorComponent class that has the ability to add instances of a RibbonPoint class to an array of RibbonPoints. This is the snippet of the function for adding a new ribbon point where I am getting odd results:
As you can see, after spawning each RibbonPoint, I call this Set RibbonTrail function so that each Ribbonpoint knows which trail it is a part of:
In the RibbonPoint class’s event graph, I have an execution path for an overlap event with another RibbonPoint, that calls a method of its RibbonTrail reference:
The problem seems to be that the overlap event is interrupting the Add Ribbon Point function’s execution path between spawning the RibbonPoint and setting its Ribbon Trail reference variable. I am inferring this from the order in which my debug strings are generated:
The highlighted part of the debug strings says to me that the overlap event is triggering upon spawning a RibbonPoint, printing “not valid!!!” as the Ribbon Trail reference is not yet set, and then printing “ribbon trail has been set” as it successfully sets the ribbon point AFTER the overlap event has triggered (the “hello” and “-1” strings are from the function the overlap event calls).
So in short, my problem seems to be that my overlap event is interrupting an execution path (hopefully I am using correct terms). Is this what is happening / possible? If not, am I missing something silly with my nodes? If so, is there a good workaround that will let me set the Ribbon Trail variable before the event triggers (I have not been able to find any information on overwriting the spawn actor function or making custom constructors in blueprints)?
Any help is appreciated, you guys rock!