Forum rules - please read before posting.

Scene switch with a variable

Hello,

Trying to send a custom int variable to an action, which then will use that and change the scene to that var number.

By using scene switch, I can put in only a number but not a localvar / token etc.

Any chance this could be updated so I've got more control on how to change the scene through script?

Or am I overlooking things again and there's an easier way to tell it so.

Thank you.

Comments

  • You could try using parameters - the Scene: Switch Action accepts an integer parameter in place of the scene number.  The ActionList: Set parameter Action can be used to set a parameter's value from a Global Variable, so you could run that just before to extract the custom variable.

    Alternatively, you could just script the scene change:

    AC.SceneInfo mySceneInfo = new AC.SceneInfo (ChooseSceneBy.Number, "", myVariableValue);
    AC.KickStarter.sceneChanger.ChangeScene (mySceneInfo, true);
  • Thanks Chris, I had to refer to this again =)
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.