INFO
|
|
You can add various special effects to your texts and images, but also to complete layers or HUDs, using simple commands: let Sprite Candy do alpha fading, zooming, color fading, smooth position change, automated movement or rotation and many more automatically. Just apply them once and Sprite Candy will do the rest ('set and forget').
You can even combine special effects by applying two or more effects to an object at once. All effects provide a 'delay' and 'duration' parameter, so you can apply several effects to an object and let them trigger exactly after another -or with a pause between. By using mutliple effects with time delays, you can create an 'effect chains' that Sprite Candy will process automatically.
You can apply two alpha-fades with different time delays, for example, to let an object automatically fade-in and fade-out within a given time.
Some things to keep in mind when working with effects:
Do not forget to place HUD_Update( ) within your game loop (see chapter 'HUDs').
Most (but not all) effects can be applied to objects, layers and even complete HUDs.
You can apply different effect types to the same object at once, but you can only apply one effect of the same type (f.e. "Blink") at the same time only. If you apply two effects of the same type to an object at once, the first one will be cleared automatically.
All HUD_FX... commands return a unique effect ID. You don't have to remember this ID, except you want to delete an effect manually before it has been finished automatically. In this case, you must specify the effect's ID.
Effects will be cleared automatically when their duration time has exceeded or the object has been removed. You can also remove an effect at any time using the ClearEffect(s) commands.
All Sprite Candy animations and effects are time-based (not frame-based) and will run with the same speed at all frame rates. While they're basically frame-independent, they will run smoother when providing higher frame rates. Therefore, you should not limit the frame rate. Best results will be achieved if you allow your game to run as fast as possible (using Delta-Time, for example).
When using movement-, scaling- or rotation-effects with HUDs, layers or objects, you may lose the pixel-sharpness. HUD objects only appear 'crisp' when HUDs, layers and objects are not rotated, not scaled and positioned at integer X / Y positions.
|
|
SPECIAL FX COMMANDS
|
|
|
EFFECTS CONTROL |
HUD_CountEffects
|
|
|
number_of_effects% =
HUD_CountEffects (
[HUD|Layer|ObjectHandle%],
[effect_type$]
)
|
This command returns the number of effects that are currently applied to an object (or to all existing objects, if no object handle has been specified). Use this command to determine if all effects that have been applied to an object have been completely finished yet.
Quite useful: imagine your player sprite has been hit and you applied a blinking effect to it (HUD_FX_Blink). The sprite should be invulnerable while blinking, so within your collision check routine you can use
IF HUD_CountEffects(Player, "BLINK") > 0 THEN RETURN
HUD|Layer|ObjectHandle%
Handle of a HUD, a layer or an object. Use '0' to loop through all existing HUDs, layers and objects.
effect_type$
You can specify the type name of an effect ("COLORFADE", "BLINK" etc.) here to count effects of a certain type only. An effect's type name is the same as the regarding function name, but without the "HUD_FX". Some effect type name examples:
"BLINK"
"STEADYMOVE"
"SCALE"
etc...
|
|
HUD_ClearEffect
|
|
|
HUD_ClearEffect (
EffectHandle%
)
|
Use this command to remove a certain effect manually. Each time you add an effect to an object, a unique effect handle is returned. You can remember this handle to remove it at any time. Since an effect will be removed automatically after expiration, you'll need this command for effects only that don't have any duration time set (and, therefore, will run infinitely).
EffectHandle%
EffectHandle, as returned by all HUD_FX... commands.
|
|
HUD_ClearEffects
|
|
|
HUD_ClearEffects (
[HUD|Layer|Group|ObjectHandle%],
[effect_type$]
)
|
This command can be used to
Clear ALL effects of all objects at once (if ObjectHandle and effect name are not specified)
Clear ALL effects of a certain object (if an ObjectHandle is specified only)
Clear ALL effects of a certain type only (for example: using "COLORFLASH" as effect name will clear all ColorFlash effects)
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, an object group or an individual object. Use '0' if you want to affect all existing objects.
effect_type$
You can specify an effect type name if you want to clear a certain effect type only. If no effect name has been specified, all effects attached to the specified object will be cleared. Effect type names are the same as their function names, but without the "HUD_FX". For example:
"BLINK"
"STEADYMOVE"
"SCALE"
etc...
|
|
HUD_PauseEffects
|
|
|
HUD_PauseEffects (
[HUD|Layer|ObjectHandle%],
[effect_name$]
)
|
This command pauses a specific effect or all effects that are currently applied.
HUD|Layer|ObjectHandle%
If a HUD, a layer or an object handle is specified, this command will affect the specified object only. You can use '0' here (or leave this parameter empty) to affect ALL existing objects at once.
effect_type$
You can specify an effect type name if you want to pause a certain effect type only. If no effect name has been specified, all effects attached to the specified object will be paused. Effect type names are the same as their function names, but without the "HUD_FX". For example:
"BLINK"
"STEADYMOVE"
"SCALE"
etc...
|
|
HUD_ResumeEffects
|
|
|
HUD_ResumeEffects (
[HUD|Layer|ObjectHandle%],
[effect_type$]
)
|
Use this command to resume effects that have been set to pause before.
HUD|Layer|ObjectHandle%
Handle of a HUD, a layer or an object handle. If a handle is specified, this command will affect the specified object only. You can use '0' here (or leave this parameter empty) to affect ALL objects at once.
effect_type$
You can specify an effect type name if you want to resume a certain effect type only. If no effect name has been specified, all effects attached to the specified object will be resumed. Effect type names are the same as their function names, but without the "HUD_FX". For example:
"BLINK"
"STEADYMOVE"
"SCALE"
etc...
|
|
EFFECTS |
HUD_FX_SteadyMove
|
|
|
EffectHandle% =
HUD_FX_SteadyMove (
GroupHandle%|ObjectHandle%,
speed_x%,
speed_y%,
[relative%],
[stopOutside%],
[duration%],
[delay%]
)
|
This effect will move the specified object continously into a specified direction. When it moves outside the screen, it will wether be placed on the opposite screen border or stop. Use this effect to create scrolling text lines, for example.
GroupHandle% | ObjectHandle%
Handle of an object (text, image, shape etc.) or a group. This effect can't be used with HUDs or layers.
speed_x% , speed_y%
The distance (in pixels) that the object should move within one second either in x-direction, y-direction, or both. You can use positive values (move downward or right) or negative values (move upward or left).
relative%
TRUE - Object will move relative to it's current orientation.
FALSE - Object will move into an absolute direction, regardless of it's orientation.
stopOutside%
TRUE - The object will stop when it moves outside the screen (the effect will be cleared automatically then).
FALSE - The object will move infinitely. When it moves outside the screen, it will be placed at the opposite screen border.
duration%
Default is 0 (infinitely). The duration of this effect, in milliseconds. 0 will play this effect infinitely (as long as the object exists or HUD_ClearEffect(s) is used). 1000, for example, sets the duration of this effect to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_SteadyRotate
|
|
|
EffectHandle% =
HUD_FX_SteadyRotate (
HUD|Layer|Group|ObjectHandle%,
speed#,
[duration%],
[delay%]
)
|
This effect will rotate an object, but also a layer or a complete HUD, continously at a given speed.
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object.
speed#
Determines the speed of the rotation (in degress per second). Use 360 to achieve a full rotation per second, for example. Use negative values to rotate the object into the opposite direction.
duration%
Default is 0 (infinitely). The duration of this effect, in milliseconds. 0 will play this effect infinitely (as long as the object exists or HUD_ClearEffect(s) is used). 1000, for example, sets the duration of this effect to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_SteadyScale
|
|
|
EffectHandle% =
HUD_FX_SteadyScale (
HUD|Layer|Group|ObjectHandle%,
sx1#,
sy1#,
sx2#,
sy2#,
speed#,
[duration%],
[delay%]
)
|
This effect will scale an object, but also a layer or a complete HUD, continously from one specified size to another and vice versa. You can specify different x- and y-scales to achieve nice effects.
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object.
sx1# , sy1#, sx2# , sy2#
Two x-scale and y-scale sets. The object will be scaled from one size to another and vice versa. 1.0 is the original object scale. 0.5 will set the object's size to 50% and 2.0 will double the object's size, for example.
speed#
The amount of time to scale from one size to another (in milliseconds). Use 1000, for example to scale from one size to the other within a range of one second.
duration%
Default is 0 (infinitely). The duration of this effect, in milliseconds. 0 will play this effect infinitely (as long as the object exists or HUD_ClearEffect(s) is used). 1000, for example, sets the duration of this effect to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_FollowObject
|
|
|
EffectHandle% =
HUD_FX_FollowObject (
Group|ObjectHandle%,
TargetHandle%,
[offx%],
[offy%],
[damping%],
[duration%],
[delay%]
)
|
Using this effect you can force an object to follow another one (useful for moving tooltips, energy bars, etc.). You can also specify a damping value. If a damping value of 0 is used, the object will move exactly like its target (without delay), where higher damping values will cause a smoother and slower movement.
Group|ObjectHandle%
Handle of an object (text, image, shape etc.) or a group. This effect can't be used with HUDs or layers.
TargetHandle%
Handle of a target object to follow.
offx% , offy%
When set to 0, the source object will be moved to the exact position of the target object. By specifying x- and y-offsets (in pixels), you can place the object above or below the target object, for example (imagin a tooltip or an energy bar placed on top of a sprite).
damping%
You can specify a damping value to smoothen the movement of the source object. When no damping is used (0), the source object will be set to the target position immediately.
duration%
Default is 0 (infinitely). The duration of this effect, in milliseconds. 0 will play this effect infinitely (as long as the object exists or HUD_ClearEffect(s) is used). 1000, for example, sets the duration of this effect to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_FaceObject
|
|
|
EffectHandle% =
HUD_FX_FaceObject (
Group|ObjectHandle%,
TargetHandle%,
[damping%],
[duration%],
[delay%]
)
|
This effects automatically turns an object so that it faces a specified target object. Additionally, you can set a damping value to slow-down the rotation (making it smoother). Combined with HUD_FX_SteadyMove, you can use this effect to create 'homing missiles', for example. This effect will delete itself automatically when the target object has been removed or does not exist anymore.
Group|ObjectHandle%
Handle of an object (text, image, shape etc.) or a group. This effect can't be used with HUDs or layers.
TargetHandle%
Handle of a target object to face.
damping%
You can specify a damping value to smoothen the rotation movement of the source object. When no damping is used (0), the source object's orientation will be set to face the target immediately.
duration%
Default is 0 (infinitely). The duration of this effect, in milliseconds. 0 will play this effect infinitely (as long as the object exists or HUD_ClearEffect(s) is used). 1000, for example, sets the duration of this effect to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_Orbit
|
|
|
EffectHandle% =
HUD_FX_Orbit (
Group|ObjectHandle%,
TargetHandle%,
radius%,
speed#,
[start_angle#],
[duration%],
[delay%]
)
|
This effect lets an object orbit around another one with a specified radius and at a given speed. You can also set a start angle.
Group|ObjectHandle%
Handle of an object (text, image, shape etc.) or a group. This effect can't be used with HUDs or layers.
TargetHandle%
Handle of a target object. The source object will steadily circle around that object, using the specified radius and speed.
radius%
The distance, in pixels, between the target object's and the source object's center points.
speed#
Number of turns per second. Using 1, for example, will move the source object once around the target object per second.
start_angle#
The start angle (0 - 360) of the orbitting object. If 0 or not specified, the source object will start at the top of the target object.
duration%
Default is 0 (infinitely). The duration of this effect, in milliseconds. 0 will play this effect infinitely (as long as the object exists or HUD_ClearEffect(s) is used). 1000, for example, sets the duration of this effect to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_MoveTo
|
|
|
EffectHandle% =
HUD_FX_MoveTo (
HUD|Layer|Group|ObjectHandle%,
x%,
y%,
duration%,
[ease_x%],
[ease_y%],
[delay%],
[moveRelative%],
[direction%]
)
|
This effect moves an object, but also a layer or a complete HUD, to a specified X / Y position at a given speed. You can specify an 'ease' factor to smooth the movement. The effect will be automatically cleared when the target position is reached.
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object.
x% , y%%
A target position where the object will be moved to.
duration%
The duration of the movement, in milliseconds. When using 1000, for example, the object will take one second to reach the specified target position.
ease_x% , ease_y%
When set to 0, the object's movement will be straight and linear. By using Sprite Candy's various easing techniques, you can achieve awesome effects, like smooth movements, slow-downs at the end or beginning of the movement -or even elastic and spring-like motions! You can use the following easing methods (easing in means a slower movement at the beginning, where easing out means a slower movement at the end of the movement):
0 - Linear (no easing)
1 - Light easing in
2 - Light easing out
3 - Light easing in & out
4 - Medium easing in
5 - Medium easing out
6 - Medium easing in & out
7 - Strong easing in
8 - Strong easing out
9 - Strong easing in & out
10 - Elastic easing in
11 - Elastic easing out
12 - Elastic easing in & out
13 - Overshooting easing in
14 - Overshooting easing out
15 - Overshooting easing in & out
16 - Bounce easing out
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
moveRelative%
FALSE - (default) The object will be moved TO the given coordinates (absolute).
TRUE - The object will be moved BY the given x- and y- values (relative).
direction%
0 (default) - The object will be moved as usual.
1 - The object will only be moved horizontally (x-axis) and remain on its current y-coordinate.
2 - The object will only be moved vertically (y-axis) and remain on its current x-coordinate.
|
|
HUD_FX_Scale
|
|
|
EffectHandle% =
HUD_FX_Scale (
HUD|Layer|Group|ObjectHandle%,
scalex#,
scaley#,
duration%,
[ease_x%],
[ease_y%],
[delay%]
)
|
Using this effect you can scale an object, a layer or complete HUD smoothly from it's current size to another size within a given range of time. You can also choose from a dozen of different 'easing methods'. This means, that the scaling can either be straight -or slower at the beginning and getting faster to the end, for example. You can even achieve elastic or bounce-like scaling effects!
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object.
scalex# , scaley#
The target x- and y-scale, where 1.0 is the original object size. Values below will shrink the object, while values above 1.0 will enlarge it.
duration%
The duration of the scaling, in milliseconds. When using 1000, for example, the object will take one second to reach the specified target scale.
ease_x% , ease_y%
When set to 0, the scaling will be straight and linear. By using Sprite Candy's various easing techniques, you can achieve awesome effects, like smooth movements, slow-downs at the end or beginning of the movement -or even elastic and spring-like motions! You can use the following easing methods (easing in means a slower motion at the beginning, where easing out means a slower motion at the end):
0 - Linear (no easing)
1 - Light easing in
2 - Light easing out
3 - Light easing in & out
4 - Medium easing in
5 - Medium easing out
6 - Medium easing in & out
7 - Strong easing in
8 - Strong easing out
9 - Strong easing in & out
10 - Elastic easing in
11 - Elastic easing out
12 - Elastic easing in & out
13 - Overshooting easing in
14 - Overshooting easing out
15 - Overshooting easing in & out
16 - Bounce easing out
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_Rotate
|
|
|
EffectHandle% =
HUD_FX_Rotate (
HUD|Layer|Group|ObjectHandle%,
angle#,
relative%,
duration%,
[ease%],
[delay%]
)
|
Using this effect you can rotate an object, a layer or complete HUD smoothly from it's current orientation to another one within a given range of time. You can also choose from a dozen of different 'easing methods'. This means, that the motion can either be straight -or slower at the beginning and getting faster to the end, for example. You can even achieve elastic or bounce-like motion effects!
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object.
angle#
When relative% is set to TRUE, the object will be rotated AT the specified amount. When relative is set to FALSE, the object will be rotated TO the specified angle.
relative%
TRUE - The object will be turned AT a specified angle.
FALSE - The object will be turned to an absolute angle, as specified.
duration%
The duration of the rotation, in milliseconds. When using 1000, for example, the object will take one second to reach the specified target angle.
ease%
When set to 0, the motion will be straight and linear. By using Sprite Candy's various easing techniques, you can achieve awesome effects, like smooth movements, slow-downs at the end or beginning of the movement -or even elastic and spring-like motions! You can use the following easing methods (easing in means a slower motion at the beginning, where easing out means a slower motion at the end):
0 - Linear (no easing)
1 - Light easing in
2 - Light easing out
3 - Light easing in & out
4 - Medium easing in
5 - Medium easing out
6 - Medium easing in & out
7 - Strong easing in
8 - Strong easing out
9 - Strong easing in & out
10 - Elastic easing in
11 - Elastic easing out
12 - Elastic easing in & out
13 - Overshooting easing in
14 - Overshooting easing out
15 - Overshooting easing in & out
16 - Bounce easing out
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_SineRotate
|
|
|
EffectHandle% =
HUD_FX_SineRotate (
HUD|Layer|Group|ObjectHandle%,
angle#,
speed#,
[duration%],
[delay%]
)
|
This effect swings (turns) an object constantly into both directions like a seesaw movement.
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object.
angle#
Maximum swinging range (0-360). If set to 20, for example, the specified object will swing (turn) smoothly 10 degress to the right and 10 degress to the left. You can also specify a negative value to let the object start with a swing to the left first, then to the right.
speed#
Speed of the swinging movement. As higher, as faster. Try a value like 0.35, for example.
duration%
Default is 0 (infinitely). The duration of this effect, in milliseconds. 0 will play this effect infinitely (as long as the object exists or HUD_ClearEffect(s) is used). 1000, for example, sets the duration of this effect to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_ColorFade
|
|
|
EffectHandle% =
HUD_FX_ColorFade (
Group|ObjectHandle%,
R%,G%,B%,
duration%,
[delay%]
)
|
This command will fade an objects color smoothly from it's current RGB values to the specified ones.
Group|ObjectHandle%
Handle of an object (text, image, shape etc.) or a group. This effect can't be used with HUDs or layers.
R1% ,G1% ,B1%
Red, green and blue component of the target color. Each may range from 0 (no color) to 255 (full color).
duration%
The duration of this effect, in milliseconds. 1000, for example, sets the duration of the color fade to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_Shake
|
|
|
EffectHandle% =
HUD_FX_Shake (
HUD|Layer|Group|ObjectHandle%,
max_distance%,
speed%,
[duration%],
[delay%]
)
|
This effect shakes an object, a layer or a complete HUD and can be used as a 'shaking camera' effect, for example. You can define a radius and the speed of the movement.
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object.
max_distance%
The maximum distance (in pixels) of the shake movement. As higher, as stronger the shaking effect will be.
speed%
The speed of the shaking movement. As higher, as faster.
duration%
Default is 0 (infinitely). The duration of this effect, in milliseconds. 0 will play this effect infinitely (as long as the object exists or HUD_ClearEffect(s) is used). 1000, for example, sets the duration of this effect to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_Wave
|
|
|
EffectHandle% =
HUD_FX_Wave (
HUD|Layer|Group|ObjectHandle%,
range_x%,
speed_x#,
[range_y%],
[speed_y#],
[duration%],
[delay%]
)
|
This effect will move the specified object back and forth, using a smooth horizontal or vertical sine wave movement. If you specify the range for one direction only, the object will move straight back and forth. If you specify ranges for both directions, you can create curved or even circular movements as well.
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object
range_x% , range_y%
The range (in pixels) that the object should move to the left or right (range_x) and upward or downward (range_y) from it's current position. The object will move back and forth repeatedly. Use one direction only to achieve straight movements, use both directions to achieve curved or circular movements.
speed_x# , speed_y#
The object will move the specified range into one direction first, then back into the opposite direction. A movement cycle will be completed when the object reached its original position again. The speed parameters specify how many cycles to perform per second. Using 1, for example, means one cycle per second.
duration%
Default is 0 (infinitely). The duration of this effect, in milliseconds. 0 will play this effect infinitely (as long as the object exists or HUD_ClearEffect(s) is used). 1000, for example, sets the duration of this effect to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_Rumble
|
|
|
EffectHandle% =
HUD_FX_Rumble (
HUD|Layer|Group|ObjectHandle%|HUD_Handle%,
radius%,
duration%,
[delay%]
)
|
This effect will 'rumble' an object, but also a layer or complete HUD, like an earthquake. The effect starts at the given radius, getting slower and slower until it stops automatically.
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object.
radius%
This parameter determines the start radius (in pixels) of the effect.
duration%
Duration of the effect in milliseconds. The movement will become slower and slower so that it will stop automatically after the number of milliseconds you specified here. The effect will be cleared automatically then.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_AutoRemove
|
|
|
HUD_FX_AutoRemove (
HUD|Layer|Group|ObjectHandle%,
delay%
)
|
This command automatically removes an object (text, image, etc.) after a given amount of time (same as HUD_RemoveObject, but you can specify a time delay here). This is useful when creating small particles or explosions: simply create an object, apply a movement- or scale-effect, for example and let Sprite Candy remove it automatically after a given amount of time. So you don't need to care about these objects. Create them, apply some effects -and forget them.
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object.
delay%
Delay (in milliseconds). The object will be removed (deleted) automatically when the specified time has exceeded.
|
|
HUD_FX_AlphaFade
|
|
|
EffectHandle% =
HUD_FX_AlphaFade (
HUD|Layer|Group|ObjectHandle%,
targetValue#,
duration%,
[delay%]
)
|
This effect will smoothly change an object's alpha transparency from it's current value to the specified one.
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object
targetValue#
The object's target transparency (0.0 = transparent, 1.0 = opaque, solid).
duration%
The duration of the alpha fade, in milliseconds. 1000, for example, sets the duration of this effect to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_SmoothBlink
|
|
|
EffectHandle% =
HUD_FX_SmoothBlink (
HUD|Layer|Group|ObjectHandle%,
alpha1#,
alpha2#,
speed%,
[duration%],
[delay%],
[finalAlpha#]
)
|
This will apply a smooth blinking effect. The specified object will change from one specified alpha value to another and vice versa at a given speed.
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object.
alpha1# , alpha2#
Two alpha values that may range from 0.0 (transparent) to 1.0 (opaque, solid). The object's transparency will cycle between these two values.
speed%
The time, in milliseconds, that the effect should take to change from one value to another.
duration%
Default is 0 (infinitely). The duration of this effect, in milliseconds. 0 will play this effect infinitely (as long as the object exists or HUD_ClearEffect(s) is used). 1000, for example, sets the duration of this effect to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
finalAlpha#
You can specify an alpha value (0.0 - 1.0) that the object will be set to when the effect has been removed or interrupted.
|
|
HUD_FX_Blink
|
|
|
EffectHandle% =
HUD_FX_Blink (
HUD|Layer|Group|ObjectHandle%,
hiddenTime%,
visibleTime%,
[duration%],
[delay%]
)
|
This will apply a simple blinking effect. The specified object will be shown and hidden using specified intervals. Useful for creating HUD game symbols, scores or warning messages within your game. When the effect has expired, the object will be set to visible automatically.
HUD|Layer|Group|ObjectHandle%
Handle of a HUD, a layer, a group or an object.
visibleTime% , hiddenTime%
The time, in milliseconds, that the object should be visible / hidden. If the visible time is set to 1000 and the hidden time to 500, for example, the object will be shown for one second, then stay hidden for half a second and so on...
duration%
Default is 0 (infinitely). The duration of this effect, in milliseconds. 0 will play this effect infinitely (as long as the object exists or HUD_ClearEffect(s) is used). 1000, for example, sets the duration of this effect to one second.
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_Ripple
|
|
|
EffectHandle% =
HUD_FX_Ripple (
Group|ObjectHandle%,
width#,
height#,
speed#,
[duration%],
[delay%]
)
|
This will apply an animated sine (ripple) effect to an object. The object's mesh will be deformed unterwater-like. You can define the width of the sine wave, the height and the speed that the sine wave should move by per second. As more vertices an object owns as better the effect will look (use it with text effects, for example).
Group|ObjectHandle%
Handle of an object (text, image, shape etc.) or a group. This effect can't be used with HUDs or layers.
width#
The 'width' or frequency of the wave. Higher values will produce narrow waves that are repeated more often, where lower frequencies produce big and long waves. For good results, use a value between 1 and 5, for example.
height#
The 'height' of the wave. Good results will be achieved with a value of 10, for example.
speed#
Determines the speed that the sine wave will be moved by per second. As higher, as faster the wave will move.
duration%
Duration of the effect in milliseconds. The effect will be cleared automatically when it's duration time has exceeded. If you did not specify this parameter or set it to 0 (default), the effect will run infinitely (until the object has been removed or the effect has been cleared manually).
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
HUD_FX_ScrollTexture
|
|
|
EffectHandle% =
HUD_FX_ScrollTexture (
Group|ImageHandle%,
speedx%,
speedy%,
[duration%],
[delay%]
)
|
This effect continously scrolls an image's content (the texture clip that the image displays). You can determine the scrolling speed in x and y direction. Use this effect with tiled images to simulate moving planes, for example. To achieve good results, you should use textures with a single image only, instead of textures that contain multiple images.
Group|ImageHandle%
Handle of an image object created with HUD_CreateImage( ) or HUD_CreateTiledImage( ). You can also pass a handle of a group of images.
speedx% , speedy%
The speed (in pixels) that the image's texture should be moved by, per second.
duration%
Duration of the effect in milliseconds. The effect will be cleared automatically when it's duration time has exceeded. If you did not specify this parameter or set it to 0 (default), the effect will run infinitely (until the object has been removed or the effect has been cleared manually).
delay%
The number of milliseconds after the effect will be triggered. When not specified, the effect will start immediately. Using the delay parameter, you can apply multiple effects to an object at once and let them play sequentially, for example.
|
|
©2004,2005 Mike Dogan / X-PRESSIVE.COM
X-PRESSIVE.COM is a label and working title of Mike Dogan, est. 1999
All artwork, including graphics, text, images and sounds are property of Mike Dogan, X-PRESSIVE.COM. Trademarks belong to their respective owners. All rights reserved.
|