User Tools

Site Tools


prpl: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
Last revisionBoth sides next revision
prpl:createparticle [2017/02/24 01:57] – Alternative for type param GoodMorningprpl:createparticle [2018/06/17 11:27] – changed title kajacx
Line 1: Line 1:
 <- [[.:prplreference| PRPL reference]] <- [[.:prplreference#everything_else_2|Everything Else 2]] <- [[.:prplreference| PRPL reference]] <- [[.:prplreference#everything_else_2|Everything Else 2]]
  
-=====  CREATEPARTICLE  =====+=====  CreateParticle  =====
  
 ^Arguments^Result^Notation^ ^Arguments^Result^Notation^
-| | | [ - ] |+Pixel Coordinates, Direction, Speed, Type, Enemy PID | [ f1 f2 f3 f4 i1 b1 i2 ] |
  
  
 === Description === === Description ===
 +
 +Creates a particle at pixel coords (f1, f2) with movement direction f3 (in radians, 0 is to the right, positive angle goes upwards) and speed f4 (in pixels per frame). The particle is of type i1 with 0=SOFT, 1=MEDIUM, 2=HARD. Actual health depends on map settings. If b1 is true, the particle is an enemy particle.
 +
 +Returns the PID of the particle created.
  
 === Examples === === Examples ===
 +<code prpl>
 +#Creates a friendly particle at this core's location, moving to the right at 0.75 pixels per frame (the default max speed)
 +# Its health is dictated by the setting for "SOFT" particle health 
 +CurrentPixelCoords 0.0 0.75 0 false CreateParticle ->PID
 +</code>
 <code> i2 = GetIntFromStack(); //enemy  <code> i2 = GetIntFromStack(); //enemy 
- i1 = GetIntFromStack(); //particle type (This seems to be hardness. 0=SOFT, 1=MEDIUM, 2=HARD. Actual health depends on map settings. Or possibly this is the health directly. -GM)+ i1 = GetIntFromStack(); //particle type (This seems to be hardness. 0=SOFT, 1=MEDIUM, 2=HARD. Actual health depends on map settings. -GM)
  f4 = GetFloatFromStack(); //Speed   f4 = GetFloatFromStack(); //Speed 
  f3 = GetFloatFromStack(); //direction in rad   f3 = GetFloatFromStack(); //direction in rad 
prpl/createparticle.txt · Last modified: 2018/06/17 11:28 by kajacx