Hi
Sadly, after several hours of debugging what I surely thought was a AC bug, it turned out to be my own (in hindsight) silly mistake.
Suggestion: Add a better warning, ideally at build time, when someone makes the same mistake (assumption) I did regarding Set Interaction Parameters component..
Scenario:
I have a prefab with a hotspot. The hotspot has a Use : Use interaction that requires component variables.
I set this all up correctly along with the Set Interaction Parameters component. Tested, and worked.
I then added a second Use interaction that used the same component variables.
I switched the Interaction drop down in Set Interaction Parameter to the new variation of Use matching the new hotspot type I just added. Assigned the component Variables in Set Interaction Parameters. Tested and worked.
At some point later, I used a HotSpot -> Run Interaction on the first Use type. It fails at runtime with "The 'Variable: Check' Action halted the ActionList because it cannot find the Component Variable with an ID of 0". (I had made many changes since this, so it wasnt at all obvious what had changed.)
My assumption was that Set Interaction Parameters component allows you to set the parameters for all the hot spot types, when really its for one only.
The main reason I assumed this is when you switch the Interaction dropdown the list of assigned parameters does not change (if they can be casted/match the number for the newly selected interaction). To further complicate it, that interaction now works . Maybe this is intentional for workflow, but I think in this case setting them all to null is better to make it obvious.
A editor time check would be nice here - If the action list assigned to the hotspot uses component parameters, but there is no Set Interaction parameters component for that type, could there be a warning? I suspect its not as simple as this as they might be set another way.
Mostly just summarizing an issue that took way to long to track down, all because I didnt real the manual
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Thanks for the details. I'm all for improved debug messages, though there's no requirement for Component Variables parameters to be set via a Set Interaction Parameters component. All parameter values can be set within an ActionList's own Actions - the use of external scripts to read/write them are optional.