This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pf:createparticle [2015/03/01 22:01] – virgilw | pf:createparticle [2015/03/04 16:56] (current) – removed Karsten75 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~DISCUSSION~~ | ||
- | <- [[pf: | ||
- | ===== CreateParticle | ||
- | |||
- | ^Arguments^Result^Notation^ | ||
- | |Pixel coordinates, | ||
- | |||
- | === Description === | ||
- | |||
- | Creates a particle with the given position and velocity. The angle is measured counterclockwise, | ||
- | |||
- | ^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.| | ||
- | |||
- | If the " | ||
- | |||
- | 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. | ||
- | |||
- | === 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. | ||
- | < | ||
- | @CreateMyParticle | ||
- | |||
- | : | ||
- | CreateParticle(CurrentPixelCoords 90 1.6 0 1) ->p | ||
- | SetMaxParticleMaxSpeed(< | ||
- | </ | ||
- | |||
- | === Raw Code === | ||
- | < | ||
- | case STATEMENT.CREATEPARTICLE: | ||
- | i2 = GetIntFromStack(); | ||
- | i1 = GetIntFromStack(); | ||
- | f4 = GetFloatFromStack(); | ||
- | f3 = GetFloatFromStack(); | ||
- | f2 = GetFloatFromStack(); | ||
- | f1 = GetFloatFromStack(); | ||
- | </ | ||