User Tools

Site Tools


pf:createparticle

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
pf:createparticle [2015/03/01 19:07] – Add detail stewbasicpf:createparticle [2015/03/04 16:56] (current) – removed Karsten75
Line 1: Line 1:
-~~DISCUSSION~~ 
-<- [[pf:alphabetic_list_of_commands| Alpha List of Commands]] <-[[class link]] <-[[pf:prpl_information|PRPL home]] <-[[pf:start| Game 4 home]]   
-=====  CreateParticle   ===== 
- 
-^Arguments^Result^Notation^ 
-|Pixel coordinates, speed, direction, 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: 
- 
-^Type^Description^ 
-|0|The default round particle which is attracted to ships and energy sources.| 
-|1|A square particle which travels in a straight line.| 
- 
-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. 
- 
-=== 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. 
-<code> 
-CreateParticle(CurrentPixelCoords 90 10 0 1) ->p 
-</code>  
- 
-=== Raw Code === 
-<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 
-</code> 
  
pf/createparticle.1425236865.txt.gz · Last modified: 2025/02/14 14:56 (external edit)