Link to video at end of page.
(This script is MOD. You can modify it, use it in your creations, keeping it NO MODIFY)
This script allow to animate an object by Keyframed Motion (non-physical SMOOTH movement) and more:
- Move to absolute/relative position
- Rotate to world coordinates / or relative to the current placement
- Change speed
- Move and rotate parts of the object linkset
- Modify textures, emit light
- Play sounds and particles
- Send chats to public or owner
- Wait
- Schedule cycling events (not movements) by separate script, same configuration notecard
You can RECORD and SAVE a complex sequence of movements and rotations by using the "Say Position&Rotation" script included.
EXAMPLE CONFIGURATION PROGRAMS ARE INCLUDED
_ _ _ _ _
The COMMAND INSTRUCTIONS accepted are:
O : set the default orientation (the preferred side of the XYZ defined as frontal face)
S : set the object speed (integer or floating point values)
P : move to offset position < ±X , ±Y , ±Z > from the current
L : move to region location <X , Y , Z > from the current
R : rotate the object as defined by <A,B,C,D>
D : add a rotation <±180,±180,±180> to the current (in degrees)
F : the object turn the front face toward a relative < ±X , ±Y , ±Z > position in space
M : send a message to public chat
W : wait N seconds (before next instruction)
B : move back to starting position (saved in the object description)
A : repeat the execution from line N (0 is first line)
> : play (>1) a sound or stop (>0) a sound
* : play (*5,1) a ParticleSystem on linkset number 5 or stop it (*5,0) on linkset number 5
& : (DEBUG) show the current command as hover text
! : schedule one of the above commands (not movements)
":" MODIFY PRIM PARAMS
[ PRIM_POS_LOCAL, position ]
[ PRIM_ROT_LOCAL, rotation ]
[ PRIM_OMEGA, axis, spinrate, gain ] - Sets the prim's spin to the specified axis and rate.
[ PRIM_POINT_LIGHT, boolean, linear_color, intensity, radius, falloff ]
[ PRIM_PROJECTOR, texture, fov, focus, ambiance ]
[ PRIM_GLOW, face, intensity ]
[ PRIM_FULLBRIGHT, face, boolean ]
[ PRIM_COLOR, face, color, alpha ]
[ PRIM_TEXTURE, face, texture, repeats, offsets, rotation_in_radians ]
_ _ _ _ _
EXAMPLES OF COMMANDS:
R<0,0,0,1> (4 parameters)
Set the initial rotation of the object.
O<0,90,270> (3 parameters in Degrees)
Set default orientation.
MOVEMENT:
Back and Forth:
P<-10,0,0>
P<+10,0,0>
Up and Down:
P<0,0,+10>
P<0,0,-10>
ABSOLUTE ROTATION EXAMPLES:
R<0.00000, 0.00000, 0.00002, 1.00000>
P<-1.06, 0.00, 0.00>
R<0.00000, 0.00000, -0.38268, 0.92388>
P<0.59, -1.85, 0.00>
P<0.28, 1.39, 0.00>
R<0.00000, 0.00000, 0.38268, 0.92388>
NOTE: split 180 degrees inversions in two 90 degrees steps
(to specify on which side you want it to happen)
ADD ROTATION
X=+90
R<0.70711, 0.00000, 0.00000, 0.70711>
X=+180
R<-1.00000, 0.00000, -0.00000, 0.00000>
X=-90
R<-0.70711, 0.00000, 0.00000, 0.70711>
Y=+90
R<0.00000, 0.70711, 0.00000, 0.70711>
Y=+180
R<-0.00000, -1.00000, -0.00000, 0.00000>
Y=-90
R<0.00000, -0.70711, 0.00000, 0.70711>
Z=+90
R<0.00000, 0.00000, 0.70711, 0.70711>
Z=+180
R<-0.00000, 0.00000, -1.00000, 0.00000>
Z=-90
R<-0.00000, 0.00000, -0.70711, 0.70711>
Turn toward North, North-East, North, North-West:
R<0.00000, 0.00000, 0.00000, 1.00000>
R<-0.00000, -0.00000, -0.38268, 0.92388>
R<0.00000, 0.00000, 0.00000, 1.00000>
R<0.00000, 0.00000, 0.38268, 0.92388>
TURN FACE TOWARD REGION COORDINATES XYZ: (you can set them manually)
F<0,1,0> / North
F<0,-1,0> / South
F<1,0,0> / East
F<-1,0,0> /West
F<0,0,1> / Up
F<0,0,-1> / Down
F<1,1,0> / North-East
F<0,-1,-1> / South-Down
=RELATIVE ROTATIONS=
PITCH DOWN +45 degrees
D<45,0,0>
PITCH UP -45 degrees
D<-45,0,0>
TURN (yaw) LEFT +90 degrees
D<0,+90,0>
TURN (yaw) RIGHT -90 degrees
D<0,-90,0>
ROLL (banking) RIGHT +30 degrees
D<0,0,+30>
ROLL (banking) LEFT -30 degrees
D<0,0,-30>
Move along a rectangle perimeter rotating the face to the next position:
F<-5,0,0>
P<-5,0,0>
F<0,+7,0>
P<0,+7,0>
F<+5,0,0>
P<+5,0,0>
F<0,-7,0>
P<0,-7,0>
Move to region coordinates:
L<85,90,35>
Play particles and sounds
*3,1
>1,8ca800ea-6502-00db-692c-21bffd387d43
W5
*3,0
>0
W3
A0
Verbose mode OFF
&0
Verbose mode ON
&1
Set speed at 1.5 (default is 1)
S1.5
_ _ _ _ _
SCHEDULE EVENT (executed only by "Scheduled Animator")
!01^500&
Schedule event 1 to be repeated every 500 centseconds (5.00 seconds)
01 has value in centsec, and is used to set an order of execution
EVERY 5.00 sec, set the face 4 of linkset 2 as FULLBRIGHT, GLOWING, RED
!01^500&:2:PRIM_FULLBRIGHT;4;1
!03^500&:2:PRIM_GLOW;4;1.0
!05^500&:2:PRIM_COLOR;4;<1.000, 0.000, 0.000>;1.0
EVERY 5.00 sec, AFTER 0.40 sec, set the same face as BLACK
!41^500&:2:PRIM_COLOR;4;<0.000, 0.000, 0.000>;1.0
!43^500&:2:PRIM_GLOW;4;0.0
!45^500&:2:PRIM_FULLBRIGHT;4;0
MORE DETAILED INSTRUCTIONS ARE INCLUDED
This script is not monkey-proof, need understanding and testing to reach the desired behavior.
Questions are welcome!
- non-physical SMOOTH movement
- many types of relative and absolute movement commands
- MOD script