<- CRPL reference <- Unit Commands
CreateEffect
Arguments | Result | Notation |
Effect_Num,X,Y,Z,ScaleX,ScaleY,Speed | None | n1 x1 y1 z1 f1 f2 f3 - |
Description
CreateEffect allows you to play one of (currently) 17 in-game animations (explosions, the smoke that flies out when something lands, etc.).
Effect_Num - The effect number between 0 and 16 (see list below).
X,Y,Z - The world pixel coordinates where to play the effect (0,0 is the lower left of the map in pixel coordinates).
ScaleX, ScaleY - Used to change the size of the effect. 1 is the normal scale.
Speed - How fast to play the effect. Lower values play the effect slower. 1/30, or 0.03(3), will play most of the effects at their normal rate.
Effects are useful for visual flare. For instance when a unit blows up you might want to make a custom explosion.
List of effects:
0: “ShotExplosion”, radiation of yellow dots
1: “MortarShellExplosion” (fixed in v1.77)
2: “BerthaShellExplosion”, large explosion of white sparks
3: “RunnerExplosion”, large explosion of blue sparks
4: “SporeExplosion”, large fiery explosion, with flying debris
5: “TotemExplosion”, large radiation of yellow dots, ending with a vibrating green circle
6: “CreeperAAShellExplosion”, white explosion
7: “UnitExplosion”, fiery explosion
8: “MoveTrail”, white implosion (like a unit that the player chose to destroy)
9: “ShortTrail”, small black explosion (like a mortar shell going off)
10: “SporeTrail”, blue electrical radation
11: “SmokeRingEffect”, dust cloud (like a unit landing from orbit)
12: “ParticleBeamDamage”, long-lasting bright blue-white light
13: “PulseCannonShellEffect”, small black southwest-moving dot
14: “StunnedEffect”, orange static (like a glider being spawned)
15: “TerraModCell”, small orange torch
16: “TotemFiring”, long-lasting large bright blue-white vortex of light
# Play an effect at the current coords, in front of the current unit.
# Standard Notation
14 CurrentCoords CellToPixel -1 1.5 1.5 0.05 CreateEffect
# Warp Notation
CreateEffect(14 CellToPixel(CurrentCoords) -1 1.5 1.5 0.05)
12, 15 and 16 were previously unending animations. For use with CreateEffect, they are now clipped to 30 frames. To specify the desired duration of these effects, or clip any of the other effects short, see
CreateEffectClipped.
Previews