Basicaly I have this problem:
I want an item to be putted in the fridge and to be remembered that is in the fridge across scenes.
At the moment when the item is in the fridge, it runs an external action list with an Engine Wait Action and a variable to change its state.If the player changes scenes the item will never freeze in the fridge.
Also the same when the item will freeze and the player picks it up (the frozen item) runs a background action list with an Engine Wait Action and a variable to change its state back to unfrozen again.When the player changes scene the item it will remain forever frozen in the player's inventory.
I tried to put the same Action Lists to all the scenes with the same Constant ID
ItemInTheFridge - Action list
ItemOutOfTheFridge - Action list
...but it doesn't work.
I even tried to put a variable to check if the item is frozen/unfrozen in each scene to resume the Action lists and also nothing there.
What am I doing wrong?
Is is possible to have a background action list to run across scenes without stopping?
Thank you
Comments
ActionLists cannot be paused mid-Action, so having a timer via a single Engine: Wait Action wouldn't be appropriate. Instead, you should store the "time left" as an Integer variable, and reduce it's value by 1 every 1 second. Each time, check if it's reached zero yet - and run whatever change you're after. If you precede all this with an initial value check of >0, you can determine if it needs to run at all.
Something like this:
If you then run this at the start of each scene, it should only run if the timer is non-zero.
Of course, you need to also create the "Timer" integer variable. As it was more of an example, I'd suggest playing with it in a separate scene to learn the principle of how it works before trying to implement it properly in the game.