PDA

View Full Version : Getting started in Lightwave Lscripts



Apheresis
04-04-2003, 11:04 AM
I am trying to get started writing Lscripts for Lightwave Layout (not modeler). I have found several tutorials on the web, but have not been able to get any scripts to execute.

I'm trying to write a basic script which will change the rotation of an object based on the pos(Time) of another object. Could someone give me a start on this?

Thanks

faulknermano
04-05-2003, 08:06 PM
@script motion
target;
create
{
setdesc("test");
}




process: ma, frame, time
{
if(target)
{
a = target.getPosition(time);
ma.set(ROTATION,a);
}

}



options
{
reqbegin("Select an object.");
c1 = ctlallitems("Object",nil);
return if(!reqpost());
target = getvalue(c1);
reqend();
}

Apheresis
04-07-2003, 08:20 AM
Back to the basics - when I enter this code in a text editor and save it as test.ls, then load it into Lightwave using LScript Tools->LW_LScript, I get "File test.ls line 1 Invalid parameter to 'script' pragma" What am I doing wrong?

Thanks

faulknermano
04-07-2003, 10:10 PM
this script was meant to be run as a motion modifier. look for LW LScript in the motion options of the item.

Apheresis
04-08-2003, 07:43 AM
Still getting "Invalid parameter to 'script' pragma"...

faulknermano
04-08-2003, 10:35 AM
i'm suspecting that there is an extra whitespace character after the word "motion".

make sure it's "@script motion"

other than that, i'm not sure. what version of lscript are you using, btw?