Call Script is always empty

  • #1, by MortoAllegroMonday, 16. February 2015, 12:59 10 years ago
    i had try to add external script in lua on double click on mouse,
    but if i use "Call script" my check-box "Call Script is always empty" and my script dosen't show up.
    instead i have to use "execute a script" to use it.

    i'll prefer to use call script instead execute, because in that way is much simple and clean.

    any suggest?
    why my script works, but is not visible in call script?


    44 Posts

  • #2, by SubbMonday, 16. February 2015, 13:55 10 years ago
    If you want to use a script from the scripts tab you have to remove the check mark "definition script" in the properties of that script. Otherwise it is not visible in the "call script" box.


    14 Posts

  • #3, by afrlmeMonday, 16. February 2015, 14:51 10 years ago
    Scripts added to the script section are set as definition scripts by default. A definition script is automatically executed on game launch, which is useful for declaring variables, tables & functions.

    If you go to the properties tab for the script & untick the definition checkbox then it will become an execution script, which requires you to manually execute it via the call script action part.

    I recommend using a mixture of all 3 script methods. I tend to use the execute a script action part a lot, as I tend to use it for accessing or updating functions I've written inside of definition scripts or for quickly accessing/updating something in the visionaire studio data structure tables.


    7283 Posts

  • #4, by MortoAllegroMonday, 16. February 2015, 15:01 10 years ago
    thank you all. "definition script" i remove the check mark as you have suggest and i was able to see it on call action now.. ^^


    44 Posts