How to use/ call ILIOS

  • #1, by mulewaMonday, 21. February 2022, 11:45 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?

    Newbie

    21 Posts


  • #2, by SimonSMonday, 21. February 2022, 12:42 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();

    Thread Captain

    1580 Posts

  • #3, by mulewaMonday, 21. February 2022, 13:24 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

    Newbie

    21 Posts

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

    Thread Captain

    1580 Posts