Forum rules - please read before posting.

Variable and Scene cutscenes

Hello team, hope you all are doing great,

Unity version: 2017.3.1f1
Adventure creator version: 1.75.2

I have a global boolean variable that is set on a trigger in my scene. The variables name is "Talked to robert." The variable takes place at an ActionList as one of my "Dialogue: Start conversation" options.

After choosing any of the dialogue options, it is hinted that they player should go to scene two.

If the player chooses the second dialogue option, everything runs fine.

The problem lies with the first dialogue option. "Yeah everything is okay." This is because the character is to head to scene two. The variable "Talked to robert" is to stay false until they leave scene two and re-enter scene one.

My "Onstart cutscene" is already in use in relation to another scene and have therefore used "On variable change."

My goal is to leave scene two and re-entering scene one, the cutscene that should play is "Cutscene lisa on computer". At the start of this cutscene, the player starts at "Marker gaming chair." This is where the global variable "Talked to robert" needs to be true. Yet, unfortunately this isn't playing out as it should. Instead, the "Onstart cutscene" plays.

Below are things that I have tested and was unsuccessful with:
Created a global variable for the "Onstart cutscene" and have a variable check in its ActionList. Will send photos.

I have messed with the cutscene properties to "Run in background."

Ran "ActionList: Comment" and will send photo.

I am unaware if maybe my "Settings manager" or "Menu" has anything to do with the problem. I will send photographs just in case.

What would be the best course of action to take in order to successfully reach the goal?

Link to photos: https://imgur.com/a/mNsRF7w

Very respectfully,
Asuna

Comments

  • Have you tried reserving your 'Onstart cutscene' spot for a small cutscene that checks the various variables, and then plays a different cutscene depending on those variables? So the scene that you're currently using as your 'Onstart cutscene' would no longer automatically play at the start, but be called by your small, variable-checking new 'Onstart cutscene', which would alternatively call your 'Cutscene lisa on computer' if the right conditions are met. So your new Onstart Cutscene might look something like this:

    Check: Is 'talked to Robert' true?
    --> If so, play cutscene 'Cutscene lisa on computer'
    --> If not, play [whatever it is you've currently got as your Onstart Cutscene]

  • I'd second @Blackbird's suggestion in that you should view the "OnStart" cutscene as a more of a gateway to running any logic you may want to run at the moment a scene begins.

    You can create a separate Cutscene for each of the various "intro" sequences that may occur, and only use OnStart to decide which one(s) to play.

    The 3D Demo game's Basement scene does something along these lines: the opening cutscene is actually in the Intro1 Cutscene, and run from OnStart if the "Skip intro on start" Local variable is set to False.

    "On Variable Change" is only run at the point a variable is changed, so it won't be something to make use of if you want to run Actions when the scene begins. If you do want to run a specific ActionList upon setting a Variable's value, it's best to instead follow the "Variable: Set" Action with an "ActionList: Run" Action.

  • Thank you both for the suggestions. I went ahead and put them into place. Though, I know I am missing steps. I sent new photos on the updates I have made. I now have two new local variables and variable checks on my "Onstart cutscene."

    I am unsure if the placement of my cutscenes on the variable checks are correct. To give a better view of the idea, the player is given two dialogue options during the triggered conversation. After this the player is hinted to go the scene two.

    If they choose the second dialogue option the variable "Talked to robert" is true because they already had the conversation I wanted them to have and they go to scene two "her room". Once back to scene one, the cutscene "Cutscene lisa on computer." should not play since they already had the conversation.

    However, if they choose they first option, then they haven't had the conversation and the character goes to scene two "her room". Indeed, either dialogue option leads to scene two. The only difference is that with option one, when back from scene two "Cutscene lisa on computer" is too take place. During which time the conversation I want them to have takes place, thus variable "Talked to robert" should revert to true.

    The issue still is that the "Cutscene lisa on computer" is not playing after the first dialogue option is chosen has returned from scene two. When back in scene one, she reverts back to "Cutscene starts lisa in hallway."

    I feel that maybe I could be missing something in-between the two variable checks. Please let me know your thoughts.

    Link to photos: https://imgur.com/a/mNsRF7w

    -Asuna

  • I'm not sure your images have been correctly uploaded - the last five in the link are all the same image.

    However, what you describe shouldn't require two separate variables. A single bool named "Talked to robert" should be enough.

    To have the "Cutscene lisa on computer" ActionList play when entering the scene, but only if "Talked to robert" is False: begin your OnStart cutscene with a Variable: Check Action that checks the value of "Talked to robert". Leave the other fields as their default (so that it checks if this variable is True), and then set the If condition is met output to Stop, and the If condition is not met output to Run Cutscene, with "Cutscene lisa on computer" assigned beneath.

    If "Cutscene lisa on computer" is still being played when you enter the room when it shouldn't be, keep your Variables Manager open - with Show 'runtime' values? checked - to check that this variable's value isn't being mistakenly set to the wrong value.

  • Hi,

    I got the actions to work properly. To start, I went ahead and placed a bool variable for "Lisa starts in hallway" as false. To add, on the "Onstart cutscene" I added a variable check for "Lisa starts in hallway" and set it to true. If condition was met I added in the ActionList I originally had for "Cutscene lisa on computer" and placed the that in with a variable set at the end of the ActionList to be true. If condition was not met on the variable check for "Lisa starts in hallway", I run the cutscene, "Cutscene, lisa starts in hallway." At the end, I did away with the cutscene "Cutscene lisa on computer" since I placed that ActionList on the "Onstart" as mentioned previously. So far so good. Thank you all for your responses.

    -Asuna

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.