# CreateParticleAtBone

Particle
5.4 OC
bool
string szName Name of the particle
string szBoneName Name of the bone at which to create the particle
array pos Vector of three elements with the X,Y and Z coordinates of the particle relative to the bone position and orientation.
array dir Vector of three elements with the X,Y and Z components of the velocity of theparticle relative to the bone orientation.
int a Extra parameter. This is usually the size of the particle in 1/5 pixels.
int b Extra parameter. This is usually the color modulation of the particle.
object target Target object for object local particles. Object local particles are drawn directly on top of the object and are removed when the object is deleted.
bool behind_target If specified and not `false`, the particle is drawn directly behind the target object.
Creates a particle relative to a bone of the calling object's skeleton. The named particle definition must be loaded. For more information see the particle documentation.
This function returns `false` if the particle definition was not found, or the function is called for an object which does not have a mesh graphics, or the skeleton of the mesh does not have a bone called `szBoneName`. Otherwise, `true` is returned. There is no return value indicating whether the particle has actually been created. This must be so to prevent synchronization problems in network games, as particles may be handled differently on each computer in the network.
func InitializePlayer(int plr) { AddEffect("IntColorize", 0, 1, 1); }

global func FxIntColorizeTimer() { FindObject(Find_ID(Clonk))->CreateParticleAtBone("PSpark", "skeleton_body", [0, 0, 0], [0, 0, 0], 8, RGB(255,0,0)); FindObject(Find_ID(Clonk))->CreateParticleAtBone("PSpark", "pos_hand1", [0, 0, 0], [0, 0, 0], 8, RGB(0,255,0)); FindObject(Find_ID(Clonk))->CreateParticleAtBone("PSpark", "pos_hand2", [0, 0, 0], [0, 0, 0], 8, RGB(0,0,255)); return(0); }
Scenario script. Creates an effect which traces a Clonk's body, left hand and right hand with differently colored sparks.
CreateParticle
Clonk-Karl
2012-12