Character Item Drop System Only Works On Last Sequence

I was creating an item drop system (not the most efficient way) and for some reason, “Uncommon Drop” (or the first “Then” Statement) does not drop even though I used the same exact code for each “Then” besides the chance to drop (I change this using, "Random Boolean By Weight.) Does anybody know why this is or can someone give me a more efficient way of doing this?

To make this less confusing:
Uncommon Drop isn’t dropping even though the code is exactly the same besides the chance to drop. Why?

I should also mention that “Uncommon Drop” will actually appear on the screen, it’s just the item that isn’t working. I’ve tested some of my suspicions and nothing seems to be working…

You add a Component to self. And then Destroy self. What is there to not understand? After you call Destroy dont expect any Code that follows to work. Your then2 should never execute since you Destroy your Actor regardless if the bool is true or false including the Component you added.

Cant be working as it should. You literally Destroy the Actor that holds that Component. And I said Then 1/2 should not execute since its unsafe once you flagging the Actor for Destruction (consider it gone). It still can Execute and you probably managed to Bug your Code. Since it can´t attach to your Actor anymore it probably attaches itself to World. And indeed it does :stuck_out_tongue_winking_eye:

Asside from that you use Actors World Transform as Relative input. Should be simply 0,0,0 Location since its relative.

Spawn a Actor and add a Mesh Component to the Spawned Actor. Should be a Item class you created with functionality in place resolving around Items. A Mesh alone won´t do anything.

Destroy your Actor if you are done with everything. Should be the very last thing you do (can be on multiple places). Instead of Sequence use the False output of the Branch node if you dont want to drop Multiple Items.

Thank you for the quick replies. I will test this when I get back home. I’ll check this as the answer because now I understand what you mean. For those who want to know what the code looks like in blueprint, I will be updating.

Figured it out thanks!

Like I stated already, Then2 does in fact execute… I specifically said that Then1 works and everything else is functional.

I probably should’ve stated that I am very new to UE4. I did suspect it had something to do with DestroyActor but didn’t know what it was attaching to. Thanks for clarifying, so to fix this I do what you did in that picture? And for future reference, any advice for bug fixing or how to find them?

It works!!! The only thing that I still don’t know how to do is spawning the items where the actor died. First of all, it’s spawning too high, and second, not even at the actors location. Otherwise it works, do you know how to fix the actor spawn issue?

Somewhat working code:

Issue I would like to fix:

uhh wrong screen shot for first image… oh and I forgot to mention that the character does not die all the time.

I tried creating an ArrowComponent and giving a location directly under the character and instead of spawning at the ActorTransform, I told the items to spawn at the ArrowComponent. This approach for some reason does not seem to work either…