|
DemoGL::Reference::ScriptSyntax::Effect object
|
Effect object
Below are the definitions for all the commands which can be specified in the script with a registered effect object. You should
use the name specified when you registered the effects with DEMOGL_EffectRegister
as object name, similar to '_SOUNDSYSTEM' when specifying a command for the _SOUNDSYSTEM object
You can add as much whitespace around commands and object names in the scriptcommands as you like, these will be
stripped off anyway.
All the commands below are prefixed with the timeline position in milliseconds when the command should be executed.
This timeline position can be negative, which means the command is executed prior application execution. All negative timeline events
are executed at once, prior to the start of the application, in the order on the timeline, so more negative times come first.
Example:
-100;MYEFFECT;PREPARE;
This will make DemoGL call the Prepare() method of the object which was registered with the name 'MYEFFECT', prior to execution of the application.
Below, the effect object is referenced with 'Effectname'. You should replace that with the name of the effect object which is the target of the
command.
PREPARE
Effectname;PREPARE;
- Will make DemoGL call the Prepare() method of the effect object registered with the name 'Effectname'.
START
Effectname;START;Layer number;
- DemoGL will place the effect with registered name 'Effect name' on the layer with number Layer number. When the layer does not
exist, it will be created. When the layer exists and contains another effect, this effect will be replaced by the effect with
name 'Effectname'. The removed effect will be stopped, but can be assigned to another layer and continue execution. Layers are
rendered starting with the layer with the lowest number, then the layer with the next lowest number etc. Layer numbers don't have
to be sequencial, you can specify layer 0, 10 and 10000 for example, which results in first layer 0 is rendered, then 10 and then
10000. You can start an effect object on as many layers as you want.
- Layer number
- Specifies the number of the layer on which the effect should be placed.
Type: long. Legal values are >=0.
STOP
Effectname;STOP;
- The effect object registered with the name 'Effectname' will be stopped, all layers the effect is running on are removed. The effect
stays inside DemoGL so it can be restarted later using the START command.
END
Effectname;END;
- As STOP but will make DemoGL also call the End() method of the effect object registered with the name 'Effectname'. The effect is, unlike STOP,
removed from DemoGL and cannot be restarted, but should be re-registered again using DEMOGL_EffectRegister.
MOVETOLYR
Effectname;MOVETOLYR;Layer number;
- DemoGL will move the effect with registered name 'Effect name' to the layer with number Layer number. When that layer does not
exist, it will be created. When the layer exists and contains another effect, this effect will be replaced by the effect with
name 'Effectname'. The removed effect will be stopped, but can be assigned to another layer and continue execution.
The layer where the effect was running on is removed.
Layers are rendered starting with the layer with the lowest number, then the layer with the next lowest number etc. Layer numbers don't have
to be sequencial, you can specify layer 0, 10 and 10000 for example, which results in first layer 0 is rendered, then 10 and then
10000.
- Layer number
- Specifies the number of the layer to which the effect should be moved to, i.e. placed on.
Type: long. Legal values are >=0.
SEND
Effectname;SEND;value to send;
- Deprecated command. Do not use. DemoGL will call the ReceiveParam() method of the effect object registered with the name 'Effectname', passing
the value to send as parameter. Use SENDINT, SENDFLOAT or SENDSTRING equivalents instead.
- Value to send
- Any string that will be send to the effect object.
Type: string. Cannot contain ';' characters.
SENDINT
Effectname;SENDINT;Value name;value to send;Layer number;
- DemoGL will call the ReceiveInt() method of the effect object registered with the name 'Effectname', passing
the value to send as iParam parameter, value name as pszName and Layer number as
lLayer. See CEffect for details.
- Value name
- Name of the value in value to send. This way you can set variables in the effect objects using script commands.
Type: string. Cannot contain ';' characters.
- Value to send
- Any number that will be send to the effect object.
Type: integer.
- Layer number
- The number of the layer for which this send is ment. An effect object can be started on many layers, and the value send
can now be send to one layer in particular. It depends on the code inside the effect object if the layer number matters
but it's possible for the effect object to distinquish between layers when handling values that are received.
Type: integer.
SENDFLOAT
Effectname;SENDFLOAT;Value name;value to send;Layer number;
- DemoGL will call the ReceiveFloat() method of the effect object registered with the name 'Effectname', passing
the value to send as fParam parameter, value name as pszName and Layer number as
lLayer. See CEffect for details.
- Value name
- Name of the value in value to send. This way you can set variables in the effect objects using script commands.
Type: string. Cannot contain ';' characters.
- Value to send
- Any number that will be send to the effect object.
Type: float.
- Layer number
- The number of the layer for which this send is ment. An effect object can be started on many layers, and the value send
can now be send to one layer in particular. It depends on the code inside the effect object if the layer number matters
but it's possible for the effect object to distinquish between layers when handling values that are received.
Type: integer.
SENDSTRING
Effectname;SENDSTRING;Value name;value to send;Layer number;
- DemoGL will call the ReceiveString() method of the effect object registered with the name 'Effectname', passing
the value to send as pszParam parameter, value name as pszName and Layer number as
lLayer. See CEffect for details.
- Value name
- Name of the value in value to send. This way you can set variables in the effect objects using script commands.
Type: string. Cannot contain ';' characters.
- Value to send
- Any string that will be send to the effect object.
Type: string. Cannot contain ';' characters.
- Layer number
- The number of the layer for which this send is ment. An effect object can be started on many layers, and the value send
can now be send to one layer in particular. It depends on the code inside the effect object if the layer number matters
but it's possible for the effect object to distinquish between layers when handling values that are received.
Type: integer.
Requirements.
- DemoGL v1.3 (build 0112 or higher)
Last changed on 20-jan-2001
©1999-2001 Solutions Design