License from €75
DE EN FR ES IT CZ

Play video in lua

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

  1. · 13 years ago
    Hi guys,
    I'm not able to find how can I play a video in lua... 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. Forum readers get the Indie Bundle 15 % off with the code FORUM15: €84.15 instead of €99, valid until 31 Dec 2026.

    Get 15 % off Try it for free
  3. · 13 years ago
    Hi, why exactly do you want to do that ?
    It's not possible yet, also if you want to export your game, all videos are renamed.
  4. · 13 years ago
    I don't think we have a function for playing videos with lua.

    We have startAnimation, startSound & startAction. I believe that is all of the ones we currently have available.

    See: here for all available (exclusive) player functions.

    Sorry.
  5. · 13 years ago
    ok, no problem. I have a script that check a variable, if this is true, play video...

    if getObject("Conditions[boat_puzzleFault?]"):getBool(VConditionValue) == true then
    getObject("Conditions[boat_puzzlePassed?]"):setValue(VConditionValue, false)
    (play video here)
    else
    ....
    end
    


    I have solved with a alternative.

    Thanks.
  6. · 13 years ago
    You could create a called by other action for it inside of the editor containing the play video action.

    By the way: Simon sorted out short-hand lua script code for Visionaire Studio 4.1 plus.

    if Conditions["boat_puzzleFault"].ConditionValue then
     Conditions["boat_puzzlePassed"].ConditionValue = true
     startAction("Actions[action_name]")
    else
     -- add else actions here or just remove this line & else if not needed.
    end
    

    also... you can access data tables without using ["object_name"] too.
    Conditions.condition_name.ConditionValue = false
    

    ...although some of the table names are different when using short-hand.
    Values["value_name"].Int -- Int instead of ValueInt or VValueInt
    Values["value_name"].String instead of ValueString or VValueString
    -- etc...
    
  7. · 13 years ago
    ok, thanks.

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?