Adventures in Alice Workshop- TIDBITS - June/July 2011
Summary of how to use Scene change
If you want to change the ground texture, you need to drop in the
super ground and make the original ground invisible and also move it down
200 meters out of the way. If you are not changing the ground texture you
don't need superGround.
To use the fade to black and fade back in.
You must create two world variables storeAtmosphereColor and
storeAmbientLightColor.
Setup your camera views
Write the fadeIn and fadeOut methods.
Write methods for each scene.
Put the following in myFirstMethod in this order.
Save the old atmosphereColor and ambientLightColor by
storeAmbientLightColor set to ambientLightColor duration = 0
storeAtmosphereColor set to atmosphereColor duration = 0
do the setup for scene 1 such as moving to the camera view for scene 1
and changing the ground texture. You
may want to set the duration to 0 for these things so they happen
instantly.
Play scene 1.
Fade to black by calling fadeOut
Setup for scene 2 - change camera view, change ground texture and
anything
else you need to do to setup scene 2
fade back in by calling fadeIn
Play scene 2
fadeOut
Setup for scene 3 - camera view and ground texture
fadeIn
play Scene 3
World variables, class variables, local variables and parameters
world variable
World variables are for values that either
involve several objects (such as a list of objects) or are values
that several objects or their methods will refer to.
Create a World Variable under "world properties"
Examples include:
All lists of objects should be under world properties (create new
variable).
class variable
A class variable is a property that is related in some way to the object
and whose value you may use in
several
class methods (or functions).
Create a class variable by clicking on the "properties tab" for the class
and
then select "create new variable".
local variable
A local variable is for a method (or function) to store a value
that is just needed during the execution of the method and then is no
longer needed.
An example is you may want to jump up a random amount and then
come down that same amount. You could generate a random number and store
it in a local variable for that method. Then you can use its value for the
jump up part and the same value for the jump down part.
Create a local variable in a method (or function) on the top right of the
method where it says "create new variable".
parameter
A parameter is a place holder for a value that you will pass into a method
(or function). This makes a method more flexible to handle different
values. For example a method "jump", to jump up and down a certain
distance, could have a parameter number that
is for "how high to jump." This makes the method more flexible so that you
can call it with different values to jump different heights.
Create a parameter in a method or function on the top right of the method
or function where it says "create new parameter".