User Tools

Site Tools


pf:createparticle

This is an old revision of the document!


~~DISCUSSION~~ <- Alpha List of Commands <-class link <-PRPL home <- Game 4 home

CreateParticle

ArgumentsResultNotation
Pixel coordinates, direction, speed, type, enemy Particle UID. f1 f2 f3 f4 i1 i2 –

Description

Creates a particle with the given position and velocity. The angle is measured counterclockwise, and angle 0 is to the right. Currently the possible values for “type” are:

TypeDescription
0The default round particle which is attracted to ships and energy sources.
1A square particle which travels in a straight line and damages ships only.

If the “enemy” argument is false, the particle will be blue and harmless. It will still be attracted to ships but will happily float under them.

Note: Particles are limited by maximum speed. Default speed is 0.75 in most game maps. Speeds are clipped to the default speed unless the default speed is changed by calling the SETPARTICLEMAXSPEED function.

How to use

Standard CRPL x y direction speed type enemy createparticle
Warp notation createparticle (x y direction speed type enemy)

Examples

Create an enemy particle moving up and capture its UID.

CreateParticle(CurrentPixelCoords 90 1.6 0 1) ->p

Raw Code

 case STATEMENT.CREATEPARTICLE:
                    i2 = GetIntFromStack(); //enemy
                    i1 = GetIntFromStack(); //particle type
                    f4 = GetFloatFromStack(); //Speed
                    f3 = GetFloatFromStack(); //direction in degrees
                    f2 = GetFloatFromStack(); //y
                    f1 = GetFloatFromStack(); //x
pf/createparticle.1425246454.txt.gz · Last modified: 2025/02/14 14:56 (external edit)