Alternative Interfaces

  • #1, by darren-beckettThursday, 25. June 2015, 14:39 5 years ago
    Hi,

    I'd like the ability to assign a certain interface depending on the platform i'm building for. I can then select the required interface before creating the build for Android or Windows.

    I could therefore have larger (finger-friendly) icons when exporting to Android.

    I currently have 2 coin interfaces, but it seems that having a second interface would require me to setup every interaction twice (Once for each Interface).

    How can i best achieve this?

    Great Poster

    351 Posts


  • #2, by afrlmeThursday, 25. June 2015, 15:32 5 years ago
    You could use the same interface, I suppose. If it's just the icons then you could just apply a condition to them, which you could set on game launch based on os platform using the getProperty() Lua function.

    http://wiki.visionaire-tracker.net/wiki/GetProperty

    I know it only says win & mac are the currently supported platform values, but I'm sure that ios & android are also supported. (One of the VS devs will have to confirm this).

    1. create 4 conditions somewhere & name them: win, mac, ios, android. Set them all to false.

    2. assign the conditions to the buttons you only want to be available for each platform. You could actually create additional conditions which you can link 2 conditions to with the option to define them as AND or OR query conditions.

    3. add an execute a script action part to the game launch actions in the game tab & add the line of code below into it. This will return the platform name, which will then set one of the conditions you created above to true.
    Conditions[ getProperty("platform") ].ConditionValue = true
    1
    2


    4. good luck! grin

    Imperator

    6842 Posts

  • #3, by darren-beckettThursday, 25. June 2015, 16:10 5 years ago
    Thanks for the info.
    The issue i see is that the Mobile version of the interface needs to have a selectable area 3 times the size.

    Great Poster

    351 Posts

  • #4, by afrlmeThursday, 25. June 2015, 16:44 5 years ago
    I guess same principle as what I said above except you assign the required interface to the playable character.

    So on launch have it set a condition based on platform then in-editor using the if condition action parts you determine which interface to set to the playable character. Should work. Just leave the command interfaces unticked in the playable characters interface tab section. Should work - although not tested it, as I've not had the reason to do so, thus far.

    Imperator

    6842 Posts

  • #5, by darren-beckettFriday, 26. June 2015, 14:54 5 years ago
    Can Lua script also change the fonts at runtime depending on the platform?

    Great Poster

    351 Posts

  • #6, by afrlmeFriday, 26. June 2015, 15:17 5 years ago
    Yes I believe you can change some of the fonts. According to the data structure the fonts are not scriptable, but I think for the most part that if you update them via scripting that the new settings will not be stored in the save game is all, so most of them will be scriptable.

    http://wiki.visionaire-tracker.net/wiki/Data_Structure#Font

    Imperator

    6842 Posts

Write post