How to use/ call ILIOS

  • #1, z mulewaMonday, 21. February 2022, 11:45 hodinky 2 years ago
    Hello i played a bit with this ilios.
    I have created a minimal function(see picture)

    1. choose object (item) by constant string "leeres Bier"
    2. get  actions from object
    3. choose action by constant-string "look"
    4. Action.Start

    Is the script in general correct?
    and
    How can i call now the Function?

    Bažant

    21 Posts


  • #2, z SimonSMonday, 21. February 2022, 12:42 hodinky 2 years ago
    All ilios functionality requires classes and functions to create an execution flow. The ilios code is better integrated in the engine so it can just move between native code and ilios code. 

    In short you need a class. If you want to call a function from an action you need to create a function to call. An example is attached.

    The functions needs to be static, you can then call it like this in a run ilios script:

    testClass.f();

    Kapitán

    1582 Posts

  • #3, z mulewaMonday, 21. February 2022, 13:24 hodinky 2 years ago
    Ah ok understand, the call action is working now.

    Is there a way to write something in a logFile?
    For example the call action i was able to run with numeric index of the actions of the object
    But with the name i dont found out the right string i tried tryed:  
    Look
    and 
    'Look' executed (immediate)
    so would be interesting to write first the names of all read out actions to the Logfile

    Bažant

    21 Posts

  • #4, z SimonSMonday, 21. February 2022, 14:03 hodinky 2 years ago
    You can use Debug.Print to write to the console / messages.log.

    Kapitán

    1582 Posts