Strange (impossible?) Error

Long story short, I have a(n npc) character using AI MoveTo which is meant to extinguish a flame (a particle system emitter) attached to a pawn for ease of node logic (because I’m a dumb-dumb who only has the most basic concepts of programming down), and then proceed to MoveTo the player.

Somehow the logic for extinguishing the flame broke and as I was trying to fix it the Destroy Actor node SOMEHOW backfired and started destroying the event triggering character (???), likely due to my node system held together by duct tape. So I disconnected as many of the destroy nodes and even the overlap events that could feasibly be triggering the uncalled for destruction but it just keeps happening and I am at a loss.

When doing some digging in the Output Log for some sort of explanation I’m getting a “LogCharacterMovement: Warning: GetSimulationTimeStep() - Max iterations 8 hit” warning but every thing else seems somewhat spiffy. The silver lining is that I was able to clean up some code and warnings while desperately trying to track down the issue, but all debugging screens and tools that I can even sort of comprehend all seem to be returning everything as normal. My NPC just disappears with no explanation or reasoning from the editor.

…sooo… da hek?

Video Proofs of Stupid


EDIT: After migrating EVERYTHING to a new UE4 Editor file, I have confirmed that it’s either the nodes themselves that are the issue… or the corrupted data migrates with everything else. -_-’

please post screenshots of the code/graph where you are trying to extinguish the flame


The destroy nodes aren’t technically there because of a work around I was trying. The SET nodes at the end are where they were. .-.

First of all, that is one messy graph! :smiley:

I made what you’ve been trying to achieve to show you how you can utilise Event Dispatchers for this cause. I hope this helps:

  1. Create an event dispatcher on your character blueprint:
    image

  2. On the details tab of the event dispatcher, add an Actor obj reference, name it whatever:
    image

  3. Bind the event dispatcher on begin play (just drag and drop the event dispatcher and select Bind from the menu):

  4. On the torch blueprint, call the event dispatcher from whichever event you’d like:

  5. On you AI blueprint, create a variable of the Actor obj reference type and set it to “Instance Editable” and “Expose on Spawn” (I’ve named my variable “ActiveTorch”):
    image

  6. For the sake of this simple explanation, my AI will start moving to the “ActiveTorch” whenever its spawned:

  7. Back in your character blueprint, on the event dispatcher binding, come out of the red event pin and “Create Custom Event”, call it whatever you’d like. You should notice that it automatically will add the actor object reference:
    image

  8. Promote the pin to a variable:
    image

  9. Then, spawn your AI actor, feeding in the “Active Torch”:

  10. Voila! This way of coding is a lot cleaner. It will also ensure that you do not get lost in your code and work in a bit more modular way:

Hope this was helpful! :slight_smile:
Best of luck.