Forum rules - please read before posting.

How to make the action list affect another scene?

I want to make the lights to be out on a train and there are different scenes for different rooms in the train so how do I make so that after the lights out animation is played, an image is teleported to a certain marker in the other scenes?

Thank you!

Comments

  • You need to use Global Variables that can be used across scenes, so that the actions of one scene can affect another.

    Create a Boolean variable named e.g. "Lights are out in train", and use the Variable: Set Action to change it's value from False to True or vice versa.

    You can then use a Variable: Check Action in your other scene's OnStart Cutscene to check this variable's value and play an animation if appropriate.
  • edited January 2017
    How do I create a Boolean Variable script for if a certain object has been placed on a certain marker or an animation has finished playing(whichever one is easier)?
    also after I create the Boolean Variable script, AC will automatically recognise it as a variable?
  • I'm not talking about creating scripts - variables are created in the Variables Manager in the main AC Game Editor window.

    Go to the Variables tab, select "Global", create a new variable and set its Type to Boolean.  You can then refer to it in all your scenes using the Actions I mentioned.
  • edited January 2017
    edit:
    how do I make it so that the variable knows what to do when it is set to TRUE?
    ---------------------------
    t hanks!
    I thought have to make a script because when I search that they all are scripts lol
  • edited January 2017
    The variable isn't supposed to know what to do when you change it. It's you who has to check the current state of the variable before doing something. You'll be using Variable: Check and Variable:Set for this. 

    In any actionlist/cutscene where you want something to run if the variable is in an specific state, you have to use Variable:Check. That action will give you two possible paths, depending on if the condition selected was met or not. That way, you can run some actions only if a variable is True or viceversa. But the state of the variable will only change if you change it manually. 

    So, for example, if the player uses a switch or lever, then the cutscene/actionlist in your hotspot should Use the Variable:Set action to turn a UsedLever variable to True. Then in the actionlist/cutscene in your Door's hotspot, you can use the Variable:Check action, and if the UsedLever is true, then you open the door (using animation or whatever), else you don't open it and can make some sound or play some dialogue ("It's locked..."), etc.
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.