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

// Set to true to allow this sprite to take damage.;
canBeDamaged = true;

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

// Set to true to allow this sprite to catch on fire.;
flammable = true;

// Set to true to allow players to pick up and throw this object.;
pickUpEnabled = true;

// Set to true to cull this object if there are too many of it according to the decorations quality setting.;
decoration = true;

// Set to true to allow this object to float on water instead of sinking.;
floats = true;

// anim is a temporary animation structure that setups animations for future use.;
// If true, m_clamp will stop the animation after playing it once.  false will loop the animation forever.;
anim.m_clamp = false;
// m_animationSpeed is how fast the animation will play.;
anim.m_animationSpeed = 1.0;
// m_frameAmount is the amount of frames in the animation.;
anim.m_frameAmount = 4;
// m_frameOffset is the sprite sheet offset of the start of the animations.;
anim.m_frameOffset = 0;
// This adds the animation structure to animations which can be accessed in the future.;
animations.Push(anim);

anim.m_clamp = true;
anim.m_animationSpeed = 1.25;
anim.m_frameAmount = 1;
anim.m_frameOffset = 0;
animations.Push(anim);

// 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), ProjectileShotgunZombieGib2Material, 4, 2, 1, 0);

// How much damage the sprite can take before being destroyed;
life = 3;

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

// Set what to do when colliding with an object of type 1;
// Collision responses;
// 0 : Ignore;
// 2 : Block;
capsule.SetCollisionResponseToChannel(1, 0);
capsule.SetCollisionResponseToChannel(2, 0);
capsule.SetCollisionResponseToChannel(14, 0);
capsule.SetCollisionResponseToChannel(6, 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;

// Changes the size of the capsule to differ from the scale of the mesh we defined in Init.;
capsule.scale = vector(0.25, 0.25, 0.25);

// AI is a subject on its own. Please check the AI section in the modding documentation at https://blazingbitgames.com/mods ;
// ANIM_WHEN_STOPPED changes the anim when the sprite has stopped moving.;
ai.AddNode(100, -1.0, -1.0, 2, 1.0, 1.0);

// CHANGE_COLLISION_WHEN_STOPPED changes the collision settings when the sprite has stopped moving.;
ai.AddNode(101, -1.0, -1.0, 2, 1.0, 1.0);

// DECORATION specifies that this sprite is a decoration and non-critical.;
ai.AddNode(137, -1.0, -1.0, 0);

// PLAY_SOUND plays the ENEMY_DISINTEGRATE sound on death.;
ai.AddDeathNode(56, 8, 0.0, 0.0, 4.0, 0.4, 0.4, 1.8, 1.9, -1.0);

// SPAWN_PARTICLE spawns the BLOOD_DIRECTIONAL_LIGHT particle every 0.25 seconds for 3 seconds;
ai.AddNode(30, -1.0, 3.0, 6, 116.0, 1.0, 0.0, 0.25, 1.0, 1.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 = 38;
// 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);

// 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 = 0.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 = 0;
// If true, overwrite the impact location and use the current's sprite location instead.;
partStruct.m_useActorCoordinates = true;
// 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);

// 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 = true;
// 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 = 0;
// 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 = true;
// This adds the decal to killDecals which will spawn a decal at the collision point upon death of this sprite.;
killDecals.Push(decalStruct);