Difference between revisions of "ParticleAnimated"

From King Arthur's Gold Wiki
Jump to: navigation, search
 
Line 4: Line 4:
  
 
Filename is the file the particle texture will be loaded from, pos is its position, vel is its velocity, angle is ??? - appears unused?, scale is a scaling factor on the particle size, animatespeed is how often the particle animation will be updated, gravity is how strong gravity's pull on it is, selflit determines whether the particle is a light source or not.
 
Filename is the file the particle texture will be loaded from, pos is its position, vel is its velocity, angle is ??? - appears unused?, scale is a scaling factor on the particle size, animatespeed is how often the particle animation will be updated, gravity is how strong gravity's pull on it is, selflit determines whether the particle is a light source or not.
<syntaxhighlight lang="cpp">void makeAnimatedParticle( string filename, Vec2f pos, Vec2f vel, f32 angle, f32 scale, u8 animatespeed, f32 gravity, bool selflit )</syntaxhighlight>
+
<syntaxhighlight lang="cpp">void ParticleAnimated( string filename, Vec2f pos, Vec2f vel, f32 angle, f32 scale, u8 animatespeed, f32 gravity, bool selflit )</syntaxhighlight>
  
 
Example from Entities/Common/FireScripts/FireParticle.as:
 
Example from Entities/Common/FireScripts/FireParticle.as:
<syntaxhighlight lang="cpp">makeAnimatedParticle( texture, pos, Vec2f(0,0), 0.0f, 1.0f, 5, -0.1, true );</syntaxhighlight>
+
<syntaxhighlight lang="cpp">ParticleAnimated( texture, pos, Vec2f(0,0), 0.0f, 1.0f, 5, -0.1, true );</syntaxhighlight>
 
[[Category:Scripting]]
 
[[Category:Scripting]]
 
[[Category:Global Functions]]
 
[[Category:Global Functions]]

Latest revision as of 21:34, 19 September 2012

Creates a particle with a number of different options.


Filename is the file the particle texture will be loaded from, pos is its position, vel is its velocity, angle is ??? - appears unused?, scale is a scaling factor on the particle size, animatespeed is how often the particle animation will be updated, gravity is how strong gravity's pull on it is, selflit determines whether the particle is a light source or not.

void ParticleAnimated( string filename, Vec2f pos, Vec2f vel, f32 angle, f32 scale, u8 animatespeed, f32 gravity, bool selflit )

Example from Entities/Common/FireScripts/FireParticle.as:

ParticleAnimated( texture, pos, Vec2f(0,0), 0.0f, 1.0f, 5, -0.1, true );