User Tools

Site Tools


prpl:docs:createparticle

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
prpl:docs:createparticle [2015/05/23 15:50] jmapsprpl:docs:createparticle [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-<- [[prpl: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, 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 using radians. 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 and damages ships only. Takes multiple hits to destroy.| 
- 
-^ Enemy ^ Description ^ 
-| 1 | True - See type for behavior | 
-| 0 | False - The particle will be blue and harmless. It will still be attracted to ships but will happily float under them.| 
- 
-Note: Particle speed is limited by the default speed. Default speed is 0.75 pixels per frame. Higher speeds are clipped to the default speed unless the default speed is changed by calling the [[SETPARTICLEMAXSPEED]] function. This has to be called for every particle created. Very high speeds may cause particles to skip over space in the map and not cause damage to objects that appear to be in its path.  
- 
-=== 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. Then set the particles maximum speed. 
-<code> 
-@CreateMyParticle 
- 
-:CreateMyParticle 
-CreateParticle(CurrentPixelCoords HalfPi 1.6 0 1) ->p 
-SetMaxParticleMaxSpeed(<-p 2.0) 
-</code>  
prpl/docs/createparticle.1432396256.txt.gz · Last modified: 2025/02/14 14:56 (external edit)