Let’s say I have 2 public variables on my blueprint:
- Target (can be Door, Light, Gun, for simplicity)
- Interaction (should depends on the Target)
So let’s say, you choose “Door” as the Target, so then the Interaction should have selectable values as “open”, “close”, “toggle”.
If you choose “Light”, you should have “on”,“off”,“toggle”
if you choose “Gun”, you should have “apply”,“buy”.
Right now, I’m just using an enum with all the interactions, and use a switch inside the blueprint to differentiate on what to do with the targets (meaning you can see all the interactions (on, off, toggle, apply, buy, open, close) even if you just select “gun”, where you should only see apply and buy).
Mainly, I wanted to make it, so instead of this you pass in a map, so the first part of the set is the Target, and the second part is the Interaction, but AFAIK, you can’t loop through said map.
Is there a way to change the values of the “Interaction” variable, depending on what target you choose?
The goal is to call the “interaction” on the “target” (with the map idea, to have multiple targets and call the corresponding interaction on them).