I have two actor components on a chest. One is a dialogue component, the other is an inventory component (that’s what they handle). They trigger when the character interact with the chest. I have it so my controller first launches the dialogue component.
But I would like that, after speaking to my chest, if the character interact with it one again, it is my inventory component that is triggered and not my dialogue component.
I think the easiest way to do this would be to “disable” the actor component.
I tried it with “Destroy component” and “Deactivate” but I can’t make them work.
Hi man,
i am not sure to know what you mean with these components,
But the simplest thing to do should be add a variable or a gate to choose which component trigget or what interaction trigger.
Both are triggered in my controller with an “on clicked”. I would like to manage this only in this blueprint and I think I would have to make this gate in my controller (which I don’t really want to touch because I’m afraid it would mess things up).
On click we check if the chest has been interacted with ( Initialized[true] ). If so, we check if the dialogue process has been completed ( Dialogue[true] )… if so, Do Inventory Stuff.
Otherwise, we set “Initialized” to true, Do some Dialogue stuff, Delay, then set “Dialogue” to true
The delay ensures that spam clicking has no effect (skipping dialogue). The delay value is for you to decide.
Your Button/interface should call an event in the Chest BP (represented by “R” in the above example).