This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| prpl:createparticle [2017/02/24 06:57] – Alternative for type param GoodMorning | prpl:createparticle [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | <- [[.: | + | <- [[.: |
| - | ===== | + | ===== |
| ^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
| - | | | | [ - ] | | + | | Pixel Coordinates, |
| === 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 " | ||
| + | CurrentPixelCoords 0.0 0.75 0 false CreateParticle ->PID | ||
| + | </ | ||
| < | < | ||
| - | i1 = GetIntFromStack(); | + | i1 = GetIntFromStack(); |
| f4 = GetFloatFromStack(); | f4 = GetFloatFromStack(); | ||
| f3 = GetFloatFromStack(); | f3 = GetFloatFromStack(); | ||