I have a npc that I can dismember. I added collision sphere components to my mesh so i could use the begin and end overlap events to trigger the dismemberment. A collision box attached to my sword triggers the overlap events.
The begin overlap event sets my dismember variable to true and end overlap set the dismember variable to false.
It seems like the game crashes whenever i overlap too many spheres too quickly.
[2018.05.31-17.16.33:642][240]LogOutputDevice: Warning:
Script Stack:
LPP_NPC_BP_C.ExecuteUbergraph_LPP_NPC_BP
LPP_NPC_BP_C.BndEvt__ElbowRSphere_K2Node_ComponentBoundEvent_2_ComponentBeginOverlapSignature__DelegateSignature
LPP_NPC_BP_C.ExecuteUbergraph_LPP_NPC_BP
LPP_NPC_BP_C.BndEvt__Diag_TL_BR_Sphere_K2Node_ComponentBoundEvent_0_ComponentBeginOverlapSignature__DelegateSignature
[2018.05.31-17.16.33:642][240]LogWindows: Windows GetLastError: The operation completed successfully. (0)
I am currently using 19 spheres and each one has a begin and end overlap. I intend to use even more.
What is Script Stack? I haven’t been able to find documentation on it.
Is there a better way to trigger my dismemberment without using collision spheres?
A script stack is basically a all the functions that were called in order to get you where you are now. e.g. MyMethod() calls ThisMethod() which calls AnotherMethod() which calls ThisMethodThatCrashed(). When you get an error, if you you want to debug you can instpect the stack to see what happened and how you ended up there.
It’s more commonly called a Call Stack: Call stack - Wikipedia
You’d be more familiar with it if you were using C++, but if you’re working with Blueprints then it can still be useful as you can see that the error appears to occur in the BeginOverlap event.
I can’t really say why this crashes without seeing what’s happening, but perhaps you’re on an infinite loop where there are constantly overlap begin and end events occurring? Are the collision volumes on your mesh set to ignore each other? If not then maybe set them up so they do, and they only listen for overlaps from your sword object.
Thanks for the explanation of the script stack. I really dont know any C++, my programming experience is limited to the visual scripting in ue4.
The collision volumes ignore everything that isn’t my “swordbox” however, even with only one collision sphere, multiple begin overlaps are triggered even though my sword only passed through it once. I fixed it somewhat by using a DoOnce node. It seems like the “begin overlap event” is more like an “is overlapping” tick that updates every few frames.
Anyway I appreciate the help, I’m definitely going to have to start looking into ue4’s debugging tools
Actually, it’s quite the opposite of a C++ stack trace, which has the latest called method on top.
With blueprint script call stack, you have the first called event/function on top. If it is an event, then it’s followed another line that ends in ExecuteUbergraph_My_Blueprint
in place of the event/function name.
At the bottom is the last function/event called. Like this:
Script call stack:
Function /Game/Content_Folder_Path/My_Blueprint_C:MyFirstCalledFunction
...
Function /Game/Content_Folder_Path/My_Blueprint_C:MyLastCalledFunction