View Full Version : writing plugins & LScripts?

05-02-2003, 10:45 AM
I have never tried to build/write a plugin or LScript before and was wondering if there was a good tutorial somewhere on how this is accomplished? I already have a few good ideas of tools I would like to create, I just need to know how I go about making them. :)

I hope that its not to difficult a process :rolleyes:

Karl Hansson
05-02-2003, 01:05 PM
Im learning lscript at the moment. Its real interesting. I have never coded anything before but I think I'm starting to get a hang of lscript.
I started reading the lscript userguide and reference guide pdf files that is available for download at newteks homepage. I figure when it comes to learning programming you have to start in the right end. Read the lscript userguide from start to finish and do ALL the examples and you are on your way of becoming a lscript programmer.

It is important that you read the whole user guide not just the parts you'r currently interested in because new techniques are presented all the time and if you skip a section you are going to skip lots of usefull techniques. Use the LSED (LScript Editor) application in your lightwave programs folder. Do all the examples in the userguide and take your time to really understand what every line of code in the examples mean and what they do and how they work together. Its not that hard actually and I'll promis you'll be thrilled all the time when you run your scripts. You'll say: Cool!!! It works!!!

Oh another thing dont use LW7.5b because lscript in layout is broken and none of your scripts will work. Use 7.5!

02-01-2004, 01:39 PM
Hi Cybernaut,

I have a pair of tutorials on my site:


Programming for the Genius-Impaired, parts 0 and 1.

There a few years old, but they are so much about the basics that they are still quite useful.

I'm in the proccess of updating and expanding them, as well.

02-02-2004, 02:34 PM
So you are the guy who wrote them? Cool, i read like i think almost two years back...they're really fun.

I don't remember if i really learned something substantial from them, but you definitely have to read them :D

A simple LScript is written pretty quickly, and since LW7 the LSED doesn't crash every few keystrokes :D

However for a C plugin, it takes quite a bit more to actually make it do it nothing but load and launch successfully...you have to deal with lots of callbacks and stuff. But once you get familiar with it you will like the power and speed advantage over LScript.