My notes on Controllers, compiled into a guide.
SAIRA OBJECT CONTROLLER NOTES
Controllers allow you to make objects move, turn, glow, and fade on
their own. You give an object a controller with the following line
in Objects.ini of the pertinent planet:
Controller=
With the type of the controller after the equals sign.
You can only give an object one controller.
You can then customize your controller by adding Control parameters. They
start with "(c)" and set up values of your controller.
I'm not including any examples here because there's hundreds of
them to be found in the Objects.ini files in the Teleportation episode.
If you're unsure how exactly your code should look, just look through
those files. It shouldn't be that tough to figure out.
Here are the types of controllers at your disposal. There's only five:
Movement: Make an object move, spin, or both
Smoke: Make the object generate short-lived copies of itself
Sine Rotation: Make your object turn back and forth
Sine Transparency: Make your object fade in and out
Sine Scale: Make your object grow and shrink
Next up is the parameters list.
First of all, there are some things to note:
Some parameters can have extra random components. I will indicate that with these notes:
Works with RandomThis means you can do one of the following things:
(c) Parameter +Random=[[INTEGER]]
(c) Parameter +-Random=[[INTEGER]]
Upon entering a screen, a random number from 0 to the number you input
will be added/subtracted to the value.
Works with InvertThis means you can do the following:
(c) Parameter 50% Invert Chance=1
Upon entering a screen, the value for that variable has a 50% chance
of switching sign (+/-).
Positives:
Positive X is
rightPositive Y is
downPositive angles are
Counter-clockwiseA greater scale means
larger than the original
Transparency is from
0 (opaque) to
128 (transparent)And, last but not least, when a parameter appears
here with
nothing after the = sign, you put
in any number you wish after it. When a parameter
appears here
that ends in =1, it has to be =1
for it to work, because it is a Boolean flag.
Movement Controller: Makes an object move, spin, or both.
(c) X Speed= Sets horizontal movement speed.
Works with Random and Invert.
(c) Y Speed= Sets vertical movement speed.
Works with Random and Invert.
(c) Rotation= Sets rotation speed.
Works with Random and Invert.
Notes: When an object moves off the edge of the room, it appears
on the other side.
Smoke Controller: Makes your object an object generator.
(c) X Speed= Sets horizontal movement speed of generated objects.
Works with Random and Invert.
(c) Y Speed= Sets vertical movement speed of generated objects.
Works with Random and Invert.
(c) Rotation= Makes the generated objects spin.
Works with Random and Invert.
(c) Cycle Time= Sets lifetime of objects generated.
Works with Random.
Notes: Only one copy of the object exists at a time. Each one fades into
view, lives for a short while, then fades away before the next
one appears.
Sine Scale Controller: Grow, shrink, grow, shrink.
(c) From X Scale= Sets the minimum x scale.
(c) To X Scale= Sets the maximum x scale.
(c) From Y Scale= Sets the minimum y scale.
(c) To Y Scale= Sets the maximum y scale.
(c) Wavelength= Sets the length of time each growth cycle takes.
Works with Random.
(c) Scale +Random= Increases/drecreates From/To X/Y Scale all by
a random amount.
Sine Transparency Controller: Now you see it, now you don't.
(c) From Transparency= Sets the minimum transparency.
Set this to a number less than 0 if you want
the object to stay fully opaque for period of time.
(c) To Transparency= Sets the maximum transparency.
Set this to a number greater than 128 if you want
the object to stay invisible for period of time.
(c) Wavelength= Sets the length of time each glow takes.
Works with Random.
(c) Randomize X=1 Changes X after each time the object disappears.
(c) Randomize Y=1 Changes Y after each time the object disappears.
(c) Transparency +Random=Increases/decreases From/To Transparency by
a random amount.
Sine Rotation Controller: Rocking on a hinge
(c) From Angle= Sets minimum rotation angle
(c) To Angle= Sets maximum rotation angle
(c) Wavelength= Sets length of time each motion takes.
Works with Random.
(c) Angle +Random= Increases/decreases From/To Angle all by a
random amount.
Once again, if you're unsure how the code should look, just take
a look in any Objects.ini file.
Claims I made that I'm not really sure of:Scale +Random, Transparency +Random, and Angle +Random
It appears that these three things create variations in the
overall size/transparency/angle of the object, but I have no conclusive tests.
+Random doesn't work with individual parameters like "From Transparency"
This I just assumed. It's difficult to actually test this. Well, it's not difficult, but
I'm just too lazy to do it. Maybe later.
Invert doesn't work with Scale
It just doesn't seem like it would make sense... but it's not like I've actually tried it.
By the way, it's awesome watching trees and blocks of grass fly and spin out of control with movement controllers.