Hello!
Thanks again for help with my last problem.
Today I started to learn how to work with Actions and ActionLists. I have never worked with any visual scripting or something like that, so I was a bit confused. But eventually I manage to make something work! I already have some stuff working, but now I'm trying to use Parameters in ActionList Editor. What I want to achieve is to have stored string variable, that would tell me which of 3 UI windows (menus) was last closed. I have: Inventory, Glossary and Lore. Every time I close one of those it would save the string of name of that menu to parameter and then next time I press "tab" it would open the one that was closed last. Default value is Inventory, because that is what should open first. After that there are buttons to change UI to Glossary or Lore. So I did some if else check for the windows that are open and setting of that parameter. At the end on the right I check if it was Glossary or not for testing purpose and that works. It says in console that last open was or was not Glossary. But next time I press Tab it opens Inventory and if I check the parameter it is Inventory and not Glossary. It is probably something with how I set it up, but I can't discover it Not sure why that parameter is not what it was when it ended last time it Tab was pressed.
Thanks for any help!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
ActionList parameters aren't designed to be persistent - only to change values of Action fields at the time that they're run.
To keep track of data in a way that is persistent, you'll want to instead use Variables.
If you have a situation where ActionList assets are dealing with a variable that can be one of three values (Inventory, Glossary, Lore), I suggest a Global PopUp variable.
Global variables can be accessed from anywhere in your game, and PopUp variables are like strings that can only have certain values.
If you go to your Variables Manager's Global tab, create a new PopUp variable with three values: Inventory, Glossary, and Lore.
Then, rather than using Parameters to keep track of what menu was last closed, read/set this variable value instead. This can be done with the Variable: Check and Variable: Set Actions.
Thanks
I did it as you suggested and it works perfectly!