Download

Action only effecting last placed actor

Hi again guys/gals My problem should be quite simple however i am kinda dumb so here goes.I have a treasure chest actor that pops open and throws out coins . when top face button is pressed. This works fine .UNLESS their is more than on chest in the level .Then no matter which chest you activate the final chest that was placed opens up. Leaving it impossible to open the other chests. I cannot figure this out although i have come across the same issue in the past i cannot remember what i did wrong or what i did to fix it .

Can you provide some screenshots of your nodes?

Select your action node and uncheck ‘consume input’ in the details panel.


Unchecking consume input opened all chests at once.I was sure that was the issue but apparently not

Looks like OPEN boolean is set to true when any chest is open making all chest appear open.
Maybe add “open” bollean to every chest.

It was the problem, now there’s another one in your code :wink:

( I will look in a minute… )

This should be the OnChest variable, it’s how to stop them all responding:

Screenshot_1

Thank you.I cant believe this problem is causing me such a headache. it seems so simple .This does not solve the problem .My setup is as follows…

Ok no need to explain my setup.Just writing it out made me realize my error .I had the on_chest bool in the player charcter rather than the chest…So simple when i look back and now understand what dejan33 meant …Thanks guys you have been a massive help

1 Like

You should move the “enable input” to the trigger enter and add a disable input when exiting the trigger and when the chest is opened.
The last one was opened because you have put “enable input” in begin play so all the chests are added to the Input Stack and when you activate the event the last added chest was the first one of the Input Stack.

Enabling the input helped me solved mine. The comment above is really useful.

1 Like