License from €75 Log in
DE EN FR ES IT CZ

Use variable scene name in Scenes[]

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 10 years ago
    Hi all,

    I'm trying to use the following in the definition script: basically, i'd like to be able to check the current scene for any conditions named 'cutscene' and if they are set to true (so i can customize the skipping of the cutscene using keyhandlers). The problem is how can i use a variable name within the Scene[] ?

    Scenes[current_scene_name] is wrong apparently, is there any way to tell VS that this is a variable and not an actual scene name? 

        current_scene_name = game:getLink(VGameCurrentScene):getName()
    
        if getObject("Scenes[current_scene_name].SceneConditions[cutscene]") == true

    Thanks!

  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 10 years ago
    if game.CurrentScene.SceneConditions["cutscene"].ConditionValue then
     -- is true
    else
     -- is false
    end
  4. · 10 years ago
    Well, simplicity is king i guess, thanks mate

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?