Category: Particles
Since engine version: 4.2 OC
PV_Sin
Description
The value will is calculates as sin(value) * amplitude + offset with value given in degrees.
Syntax
array PV_Sin(int value, int amplitude, int offset);
Parameters
- value:
- Value or value provider to calculate the sine of. The result of PV_Linear can be used to evaluate the sine function linearly over time.
- amplitude:
- Amplitude of result. May be a value or value provider.
- offset:
- [opt] Offset added to result. May be a value or value provider. Defaults to zero.
Remarks
See the particle documentation for further explanations of the particle system.
See PV_Random for another example with PV_Sin.
Example
CreateParticle("MagicRing", 0, 0, 0, 0, 100, {R=0xff,G=0x00,B=0x30, Size = PV_Sin(PV_Linear(0,180),10,0)}, 1);
Creates a particle which increases size from 0 to 10 and back to 0 during 100 frames.
See also: CreateParticle, PC_Bounce, PC_Die, PV_Cos, PV_Direction, PV_KeyFrames, PV_Linear, PV_Random, PV_Speed, PV_Step