Under "Scripts" I created an item called "TestMovement" whose body is simply
echo('test')
I have an alias, and I would like to invoke the TestMovement function from it. How can I achieve this?
Can I invoke a custom LUA function from an Alias? If yes, how?
-
- Posts: 9
- Joined: Tue Jul 18, 2017 8:03 pm
Re: Can I invoke a custom LUA function from an Alias? If yes, how?
What you want to do then is make a testMovement() function inside the TestMovement script object. Doesn't matter waht the script object is called in this case, just what you call the function below.
and in the alias call
-
- Posts: 9
- Joined: Tue Jul 18, 2017 8:03 pm
Re: Can I invoke a custom LUA function from an Alias? If yes, how?
Works! Thank you very much.
Re: Can I invoke a custom LUA function from an Alias? If yes, how?
Quite welcome =)
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: Can I invoke a custom LUA function from an Alias? If yes, how?
There is one case where the name of the script object is important and that is if one of the functions contained in its scripts is to be an event handler - in that case the name of the function and the name of the script object has to be the same - this is so the event system knows which function to send the event names entered for the script to handle to...