How to interact between Lua and an object within the game?

  • #1, by RayManiacThursday, 01. December 2016, 20:39 8 years ago
    Hi, I want to start scripting with Lua, but I don't know how to interact e.g. with an object or a hotspot.

    For Example, I got in a scene an object called "picture" and I want to script if you're clicking on "picture" a text will be displayed: "It's a boring picture. What did you expect?".

    How to get I find out which name for the object has to be used?
    And I also want to know it for a hotspot in the same way.

    I thank you in advance.


    10 Posts

  • #2, by ke4Thursday, 01. December 2016, 21:18 8 years ago
    In Lua you can get object with



    In the data structure table you can see all the things you can use

    However at this point there's no option to start text with Lua. In this case you would have to display your text via an image or by calling an action that would be displaying the text through action part anyway.

    To give an example how to interact with an object. Let's say you want to set a scale to your object, then you would select your object as above and use the ObjectScale field in the data structure table

    Objects["name"].ObjectScale = 2

    If you want to only return the current value


    Key Killer

    810 Posts