[SOLVED] set / unset interface for character

  • #1, by sebastianSunday, 05. February 2017, 19:32 3 years ago
    Hey pals,

    i need to switch an interface for a character but cant find a solution to unset the previous interface.

    The character should either have "interfaceA" or "interfaceB" which both are from the same interface class.

    I found a "set interface for character" action part. But i have no clue how to unset the other (before active) interface. The datastructure for the charactrs active interfaces say that they are not scriptable roll

    Any ideas?

    Thread Captain

    2337 Posts


  • #2, by afrlmeSunday, 05. February 2017, 20:06 3 years ago
    You can manually hide/show an individual interface using Lua script.
    Interfaces["example"].InterfaceVisible = true -- or false
    1

    If it's just a style thing, then you could also use the same interface & use conditions to determine which graphics should be shown. Or you could create the 2 interfaces under different classes & use condition query to determine which to show/hide.

    P.S: the none scriptable bit you mentioned is probably due to it not storing the new data in the save game files.

    Imperator

    6842 Posts

  • #3, by sebastianSunday, 05. February 2017, 20:29 3 years ago
    You can manually hide/show an individual interface using Lua script.
    Interfaces["example"].InterfaceVisible = true -- or false
    1

    If it's just a style thing, then you could also use the same interface & use conditions to determine which graphics should be shown. Or you could create the 2 interfaces under different classes & use condition query to determine which to show/hide.

    P.S: the none scriptable bit you mentioned is probably due to it not storing the new data in the save game files.

    what i need is to change the characters interface list to replace an interface with another. This should not affect other action parts or scripts because the new interface has the same interface class. 
    What purpose has the "set interface of a character" at all? I cant select a specific character or even "unset" an interface again...  

    EDIT: seems to work now XD

    It seems to just set an interface for the (current) character. all other interfaces in the same InterfaceClass get automatically deselected. Can a VS dev confirm this?

    Thread Captain

    2337 Posts

  • #4, by AlexSunday, 05. February 2017, 21:06 3 years ago
    It seems to just set an interface for the (current) character. all other interfaces in the same InterfaceClass get automatically deselected. Can a VS dev confirm this?
    yes, that's the way it works smile

    Great Poster

    378 Posts

  • #5, by sebastianSunday, 05. February 2017, 21:25 3 years ago
    thanks smile solved

    Thread Captain

    2337 Posts

Write post