Hi everyone.
I'm creating a 2d adventure game with the following elements:
- A virtual time. This is not automatic, but time passes in tokens/days only if player does some actions.
Ex. making a research uses a day. Training at the box uses one day. Etc.
Specific actions make a day pass.
So I have an integer value from 0 to 10.
I want that a specific cutscene starts in a specific day (ex. day 2).
So I need this:
- if day == x
-> then play cutscene.
How can I do that?
I think the solution could be easy, but I'm not getting it.
If I need to code it down, please could you give me some specifics / suggestion as pseudocode?
Comments
This'll run every time a Variable changes, so you want to make sure it doesn't block any other gameplay when running - so from the Cutscene's Inspector, change it's When running field to Run In Background. A single Variable: Check Action can then be used to determine if the "day" integer is 2, and run the appropriate Cutscene if so.
Hello. I am interested in launch a cutscene when three of my global variables are true. But I don´t find the option in scene manager for asign a cutscene run "on variable change".
Can anyone help me please?
Thanks!
In each of the ActionLists which change each of the global variables to True, run another Action at the end to check if the other 2 variables are also True. If they are True, then run a final Action of ActionList: Run and choose the Cutscene to run.
It worked! Thank you!