[SOLVED] set / unset interface for character

  • #1, z sebastianSunday, 05. February 2017, 19:32 hodinky 8 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?

    Kapitán

    2346 Posts


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

    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.

    Imperátor

    7285 Posts

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

    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?

    Kapitán

    2346 Posts

  • #4, z AlexSunday, 05. February 2017, 21:06 hodinky 8 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

    Čestný člen

    378 Posts

  • #5, z sebastianSunday, 05. February 2017, 21:25 hodinky 8 years ago
    thanks smile solved

    Kapitán

    2346 Posts