Pause/save game Menu

  • #10, by afrlmeThursday, 01. October 2015, 22:13 9 years ago
    The only people that can edit the VS wiki are people that me or David create accounts for. Essentially me, David, Alex, Simon, Thomas & the engine itself (some of the pages are automated by code in the engine - most however are written by me or the devs).

    In regards to access: I disabled registration & limited guests to read only permissions. It's only a wiki in the traditional sense that it's wiki CMS from the people behind Wikipedia.

    Imperator

    7278 Posts


  • #11, by ygmantellThursday, 01. October 2015, 22:49 9 years ago
    Thanks
    If I want the button to automatically appear on every scene, should it be an interface of its own?

    Great Poster

    274 Posts

  • #12, by afrlmeThursday, 01. October 2015, 23:09 9 years ago
    Yes or you could even add it to your main interface. Interfaces are automatically hidden by default for menu scenes unless you enable the always show interface inside of the properties tab for the interface.

    Menu scenes do not allow interfaces unless you specifically grant permission with the option I just mentioned or use a show interface action part inside of an at begin of scene action for the menu.

    Imperator

    7278 Posts

  • #13, by tristan-kangThursday, 01. October 2015, 23:28 9 years ago
    If you stuck at some point that you can't figure out how to solve.

    Then it's easier and faster to look up the projects in the main webpage. There are total 4 games and you can download their projects and look inside what actions are located within the games so you can clearly understand it while testing their games.

    I tried it and mastered already. Magical Potion and Chaos in Cannibal Village have all things you might want to know.

    Great Poster

    267 Posts

  • #14, by afrlmeThursday, 01. October 2015, 23:46 9 years ago
    I tried it and mastered already. Magical Potion and Chaos in Cannibal Village have all things you might want to know.


    What most of them lack though is the bloody end if action part to close off if queries.

    Imperator

    7278 Posts

  • #15, by tristan-kangThursday, 01. October 2015, 23:50 9 years ago
    I think it's because these games seem to be made before current build of VS. Perhaps 2 or 3 version. So many things they are missing that I can find.

    Or end if is already existed but the devs didn't know how to use it.

    Great Poster

    267 Posts

  • #16, by afrlmeThursday, 01. October 2015, 23:58 9 years ago
    haha. The games were made as part of a competition for 4.0 official release. There is not that much difference in terms of new features since the public build version when they were released to the current public build.

    End if has been in the engine as long as there as been if queries. End if is used to close off if queries so that you can add additional actions after them or multiple queries inside of other queries. However the engine doesn't return an error or warning if an end if is not added, but it's still much cleaner to do so.

    Imperator

    7278 Posts

  • #17, by tristan-kangFriday, 02. October 2015, 00:13 9 years ago
    About End if and Else.

    I think someone mentioned it earlier but Else if is really necessary to clear the action codes.

    If condition Blah blah blah false
    -if condition blah blah blah true
    --execute action blah blah blah 
    -End if
    End if
    


    If I put End if then those '-' or '--' lines are cleared and the code lines look clean.

    But the problem is...

    if condition blah blah blah true
    -if character is on scene
    --execute action blah blah
    -End if
    -if character is on another scene (xxx)
    --show scene (xxx)
    Else
    --if condition blah blah blah false
    ---execute action blah blah
    ---End if
    --End if
    End if
    


    this '-' line is added more and it makes the action part screen a bit messy. And I should put a lot of End if lines to make sure the action went through with no problem.

    Now let's say I added a lot of alternative situations then I'll probably should put End if 10 times.

    Why they didn't make Else line separately so these entire '-' doom never happened.

    Great Poster

    267 Posts

  • #18, by afrlmeFriday, 02. October 2015, 00:45 9 years ago
    What we need is action parts for creating elseif, and & or. All three of those operators reduce the amount of end's needed.

    This is the reason I often end up using the execute a script action part so that I can create complex if queries through code.

    The editor if query system is much better in 4.x than 3.7.1 as it now has tree branching & you can collapse / expand the various if queries to see what belongs to which query.

    Ok here's a quick mock-up (Lua) of the second code block in your post...
    if Conditions["blah"].ConditionValue then
     if game.CurrentCharacter.Scene == game.CurrentScene then
      startAction("Actions[test1]")
     else
      game.CurrentScene = game.CurrentCharacter.Scene
     end
    else
     startAction("Actions[test2]")
    end
    

    ... your example is not really all that great for me to show the difference between editor if query system vs. the scripting method. So I'll provide another one...
    if Conditions["blah"].ConditionValue and not game.CurrentScene:getBool(VSceneIsMenu) then -- used getObject for SceneIsMenu because it doesn't like shorthand method.
     if game.CurrentCharacter.Scene == game.CurrentScene then
      return true
     elseif game.CurrentCharacter.Scene ~= game.CurrentScene then
      game.CurrentScene = game.CurrentCharacter.Scene
     end
    end
    

    ... notice I reduced it down to two end operators because I used elseif & and operators. elseif, and & or operators allow you to create a continuation inside of the same query line, thus removing the need to close each query off individually.

    Imperator

    7278 Posts

  • #19, by tristan-kangFriday, 02. October 2015, 00:56 9 years ago
    Oh that's really sweet script. I hope they add Else If and Or commands on future build. These are what I want and make query looks clean. Yes, I love clean things...

    By the way, I forgot to point this one. Magical Potions has its own game launcher. I noticed it. But when I build the game with the project (Magical Potions) the game launcher didn't pop up. Is it some kind of external works to make game launchers for VS? I'm wondering.

    Great Poster

    267 Posts

  • #20, by afrlmeFriday, 02. October 2015, 02:16 9 years ago
    Yes if you want a launcher application then you would have to build one yourself with a third party program. Nigec, one of the members on here (not seen him online for a while mind) made a launch app a few years back using action script. I believe he even shared his code in a thread somewhere on here.

    * edit: found the thread @ http://www.visionaire-studio.net/forum/thread/config-ini-editor

    All the launchers are (most likely) doing is probably allowing you to tweak the config.ini & then run the game exe.

    Imperator

    7278 Posts