// Every script operation must end with a semicolon.  Spaces or line returns are ignored.;
// Base game sprite file names are a number, so only use non-number names to add new sprite.  Ex: BlueChicken.txt;
// Don't put spaces in file names.;
// This file contains only a small subset of all possible sprite commands.  To make your own sprite, take a similar existing one and copy its script file.;

// If true, the sprite will orient itself towards the player vertically.  Makes somewhat-spherical objects look better.;
facePlayerPitch = true;

// If true, the sprite will be placed on the ground after being created.;
placeOnGround = false;

// Collision bleed time is the minimum time before a collision-related effect is triggered after the last one.;
// Objects that leave decals or play sounds when bouncing are a good example.;
collisionBleedTime = 0.25;

// If true, the sprite won't take damage on hitting another sprite that died and will pierce through it without collision.;
pierceOnKill = true;

// Init is the main sprite-creation command.  It requires some commands to be called before it and others after it.;
// definition: Init(Sprite scale vector(scale x, scale y, scale z), material, movement type, collision type, destructible type, activation type);
// It's possible to randomly choose a material by adding multiple ones separated by ':'.  Example: 15:BlueChickenMaterial:33:PotatoMaterial;
// Movement types;
// 0 : No movement (but can be moved);
// 1 : Projectile;
// 2 : Enemy;
// 3 : Static (cannot be moved at all);
// 4 : Physics (bouncing);
// Collision types;
// 0 : No collisions;
// 1 : The flat mesh has collisions;
// 2 : The capsule shape around the sprite has collisions;
// 3 : Overlap (don't use);
// Destruction types;
// 0 : Can't be destroyed;
// 1 : Disappears on destruction;
// 2 : Explodes (not used, becomes 1);
// 3 : Slice (not used, becomes 1);
// 4 : Falls down like a flat mesh;
// 5 : Context (depends on how the destruction happened.  Mostly for enemies);
// Activation types;
// 0 : Can't be activated;
// 1 : Can only be activated once;
// 2 : Can be activated infinitely;
// 3 : This is a switch;
Init(vector(0.12,0.12,0.12), 793, 1, 2, 1, 0);

// How much damage the sprite does when colliding with another one;
damage = 5;

// Set the type of collision of this sprite's capsule.  This affects how it'll react with other objects it can collide with.;
// Possible collision types;
// 0 : Static (walls or static sprites);
// 1 : Dynamic (most moving sprites);
// 2 : Pawn (the player);
// 6 : Usually for projectiles that can pass through most objects;
// 7 : Most projectiles;
// 14 : The player in multiplayer;
capsule.CollisionObjectType = 7;

// Set what to do when colliding with an object of type 7;
// Collision responses;
// 0 : Ignore;
// 2 : Block;
capsule.SetCollisionResponseToChannel(7, 0);
capsule.SetCollisionResponseToChannel(2, 0);
capsule.SetCollisionResponseToChannel(14, 0);

// Set the mass of the capsule.  This affects how heavy it reacts.  0.0 means it isn't affected by its weight;
capsule.AllMassScale = 0.0;

// If false, the sprite won't react to gravity.;
capsule.enableGravity = false;

// If false, the mesh won't drop shadows.;
mesh.CastShadow = false;

// PLAY_SOUND will play RubberChickenSound when the sprite dies.;
ai.AddDeathNode(56, 8, 0.0, 0.0, RubberChickenSound, 0.1, 0.1, 0.9, 1.1, -1.0);

// parStruct is a temporary particle structure that can be used to spawnn particles in various ways.;
// If true, the particle will be attached to this sprite and move with it. It'll also be destroyed if the sprite is destroyed.;
partStruct.m_managed = false;
// If true, if the other sprite in the collision bleeds, only play the other sprite's bleed particles instead of our own. Useful to not spawn generic bullet hit spark on fleshy enemies that can bleed instead.;
partStruct.m_removeIfTargetBleeds = false;
// The normal points outward from the impact at the impact angle. You can offset the particle towards that direction, so that big particles don't clip with the sprite.;
partStruct.m_normalOffset = 5.0;
// If true, will rotate the particle to face the impact.;
partStruct.m_rotate = false;
// The actual type of particle to spawn.;
partStruct.m_type = 2;
// If true, overwrite the impact location and use the current's sprite location instead.;
partStruct.m_useActorCoordinates = false;
// You can specify a x, y, z offset to the particle if it should not come out of the center of the sprite.;
partStruct.m_offset = vector(0.0,0.0,0.0);
// This adds the particle structure to killParticles which will spawn these particles when the sprite dies.;
killParticles.Push(partStruct);

// tmpSound is a temporary sound structure that can be used for many things.  First you need to set all its values;
// tmpSound.m_sound is simply which sound to use;
tmpSound.m_sound = 728;
// The minimum possible volume.  Random;
tmpSound.m_volumeMin = 1.0;
// The maximum possible volume.  Random;
tmpSound.m_volumeMax = 1.0;
// The minimum possible pitch.  Random;
tmpSound.m_pitchMin = 0.9;
// The maximum possible pitch.  Random;
tmpSound.m_pitchMax = 1.1;
tmpSound.m_UI = false;
// This adds the sound to collisionSounds, which will play all its sounds when a collision happens;
collisionSounds.Push(tmpSound);


// decalStruct is a temporary decal structure that can be used to add decals when getting damaged, dying or even to spawn decals immediately.;
// If true, doesn't add a decal at this position if another already exists close.;
decalStruct.m_preventOverlapping = false;
// If true, the decal will rotate according to the impact velocity of the sprite.;
decalStruct.m_rotateVelocity = false;
// decalStruct.m_decal is the actual decal to use.;
decalStruct.m_decal = 3;
// If true, when it detects an overlap with a decal of the same type, it'll instead grow the size of the original decal.;
decalStruct.m_allowsGrowing = false;
// This adds the decal to killDecals which will spawn a decal at the collision point upon death of this sprite.;
killDecals.Push(decalStruct);