Hi,
I'm using Set Interaction Parameters to inject a Hotspot's GameObject into an ActionList Asset so I can read/write Component Variables on it. This works fine when the ActionList only needs to access one variable.
The issue is when the ActionList needs to access two different Component Variables on the same Hotspot — for example, a Variable: Check on one variable and a Variable: Set on another. Each node requires its own Component parameter, but the Hotspot interaction button only has a single "Hotspot parameter" slot to inject the reference.
Is there a way to pass the same Hotspot reference to multiple Component Variable parameters within one ActionList? Or is the only solution to split the logic into separate ActionLists?
Thanks!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
If the variables are on the same Variables component, then you should only need a single GameObject parameter. The specific variable on that component is then referenced by its ID number.
Can you share screenshots of the logic flow? I'm not quite sure I'm understanding the issue.
In summary, I have an ActionList Asset that needs to access two different Component Variables on the same Hotspot (a Variable: Check and a Variable: Set). I've set both up as Parameters in the ActionList, but the Hotspot interaction button only has one "Hotspot parameter" slot to inject the reference at runtime — so I can only reach one variable, not both.
Set Interaction Parameters replaces the need for the lone Hotspot parameter, but its Interaction type is set to Use, not Inventory. The UsaLupa and CintaRecogida parameters look correctly assigned, but won't be transferred because its referring to the wrong Interaction.
You can add multiple Set Interaction Parameters components to the same Hotspot if you want multiple Interactions to use parameters.
Yes, that was the problem.
I don't quite understand the Hotspot parameter yet. Could you put give me a quick example, please?
The Hotspot parameter simply assigns itself to a single GameObject parameter in the ActionList.
It can essentially be ignored now, because the Set Interaction Parameters component - which was introduced later - can achieve the same behaviour. However, it remains for compatibility with older projects.
Oh, got it! That totally makes sense now. I was actually thinking the same thing — isn't Set Interaction Parameter supposed to do that and more? Anyway, makes sense. Thanks!