PDA

View Full Version : Expressions



ige
02-17-2016, 10:22 AM
Hi. This is a question to Dan Ablan or someone else who can answer me about Expressions. I wanted to learn it and found my old book
(by Dan Ablan) : LightWave6,5 Magic. In the first chapter mounting the pistons went fine. But when coming to set up Light Intensity using this expression : (Cam.rot(Time).p-Cam.rot (Time-1/Scene.fps).p) I get an error message: Expression compile error: found "-" , expecting "[" or "(" . Can somebody give me whats wrong?

MonroePoteet
02-19-2016, 11:05 AM
Two things:

First, "Cam" is not a valid object reference. It should be "Camera".

Second, it looks like it's a bug in the LScript Expression parser. I'm running V11.6.3 and get the same error. It looks like a workaround is to use the cumbersome +(-1) instead of the -1 to subtract one frame from the Time:

(Camera.rot(Time).p-Camera.rot (Time+(-1)/Scene.fps).p)

I don't have LW2015 installed, so can't test it there. If it's still busted in LW2015, it should probably be reported as a bug.

mTp

erikals
02-19-2016, 01:45 PM
never used it myself, but there is also Relativity (comes with LW)


https://www.youtube.com/watch?v=3qXGPFf3mq4

ige
02-20-2016, 03:28 AM
Cam is an object - not the camera - in the scene. Cam is a larger gear driving a smaller gear . As I understand from the book the red and green light are going to be controlled by the speed of the Cam.

ige
02-20-2016, 03:40 AM
Thanks a lot. It worked when using +(-1).