I'd like if there was a book or PDF that has the syntax available, instead of having to scratch around for it.
So what is the syntax for setMotion?
So far, in the tutorials, I see:
setMotion(Follow gEgo 15)
and
setMotion(MoveTo 180 150 RoomScript)
What I want to do is have an actor avoid the gEgo.
Just popping by and I saw this. setMotion doesn't have an explicit syntax other than the first parameter (which is the Motion class name).
The subsequent parameters are specific to the motion. setMotion just forwards them on through to a function on the Motion instance (I think maybe it's the
init function?). So you need to find out what the parameters are for that function. The best way is to look at the source code.
For example, Follow seems to take a target and a distance. MoveTo takes an x and y, and a script to cue when its done.
I think the Avoid script is something different. It's not a Motion. It's a basic path-finding script that make the actor go around objects or blocked areas on its way to a destination.
It doesn't make one actor run away from another. I suspect you'd have to write your own script for that.