// 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.;

// This file replaces RIFLE_BULLET with a rubber chicken projectile.;

// If true, kills the sprite when it stops moving.;
killWhenStopped = true;

// 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;

// 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.75,0.75,0.75), BlueChickenMaterial, 1, 2, 1, 0);

// How much damage the sprite can take before being destroyed;
life = 100;
// How much damage the sprite does when colliding with another one;
damage = 20;

// Set to false means that the mesh won't make shadows even if the material allows it;
mesh.CastShadow = false;

// 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;

// 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 = RubberChickenSound;
// 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;
// true if this should be played as a UI sound;
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 = true
// decalStruct.m_decal is the actual decal to use.;
decalStruct.m_decal = BlueChickenDecal;
// 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;
// The minimum quality setting to spawn the decal at.  0 is low and 3 is Epic in the decorations quality settings of the game.;
decalStruct.m_minFoliageQuality = 1;
// This adds the decal to killDecals which will spawn a decal at the collision point upon death of this sprite.;
killDecals.Push(decalStruct);