How to create a script.

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
Alen
Posts: 3
Joined: Mon Mar 07, 2011 3:38 pm
Contact:

How to create a script.

Post by Alen »

Where to find a tutorial on how to create a script.
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger »

You're best bet is to do a starters tutorial on Lua, especially one that focuses on object-oriented style scripting using Lua tables, as AS uses this extensively. Then you should take a look at some existing scripts that come with AS as well as scripts that you can find on this forum, and start to understand how they work. To help with this, you can download various documents that describe the AS scripting interface from sticky threads in this section of the forum.

Once you understand how some of these scripts work and how they access the scripting interface, you will be able to start making your own mods to them, and eventually start writing your own from scratch.

A lot of other people have asked questions about learning to script for AS on this forum, so you should be able to get a lot of information by searching for that kind of stuff as well. In particular, you might want to check out some of Peteroid's posts as he started writing scripts only late last year, and posted quite a lot about what he learnt along the way.
Post Reply