Hi,
Here are a few bits of code I have lying around. Some people might find useful. They're pretty simple, but some people might have some use for them.
Flickering Light
Exploding Barrel

and here's a health and armor code (ready for A5 templates, change to _health__003 and _armor__003 for template 6).

Code:

//=============================
//Health And Armor Pack Code
//---------------
//Created By: James A. Burke
//email: contact@jabigp.com
//=============================
//-----------------------------
//Defines
//-----------------------------
DEFINE _health_val, skill1; //Medical pack value
DEFINE _armor_val, skill1; //Armor pack value

//-----------------------------
//Prototype Functions
//-----------------------------
function healthPackEvent(); //Event called when player collides with a health pack entity
function armorPackEvent(); //Event called when player collides with an armor pack entity

//-----------------------------
//Functions
//-----------------------------
//---------------
//Desc: Gives the player health
//---------------
function healthPackEvent()
{
if(player._health + my._health_val > 100)
{
player._health = 100; //Don't give the player over 100 health
}
if(player._health + my._health_val <= 100)
{
player._health += my._health_val;
}
my.enable_impact = off;
my.event = null;
my.invisible = on;
my.passable = on;
wait(1);
ent_remove(my); //Remove the model
}

//---------------
//Desc: Gives the player armor
//---------------
function armorPackEvent()
{
if(player._armor + my._armor_val > 100)
{
player._armor = 100; //Don't give the player over 100 armor
}
if(player._armor + my._armor_val <= 100)
{
player._armor += my._armor_val;
}
my.enable_impact = off; //Inactive now
my.event = null;
my.invisible = on;
my.passable = on;
wait(1);
ent_remove(my); //Remove the model
}

//-----------------------------
//Actions
//-----------------------------
//---------------
//Desc: Standard health pack
//---------------
//uses: _health_val
action health_pack
{
while(player == null)
{
wait(1); //Prevent empty pointer errors
}
if(my._health_val <= 0)
{
my._health_val = 25; //Give it a default value
}
while(1)
{
if(player != null)
{
if(vec_dist(my.x, player.x) < 100)
{
player._health = 100;
ent_remove(my);
return;
}
}
my.pan += 2 * time; //Rotate the entity
wait(1);
}
}

//---------------
//Desc: Standard armor pack
//---------------
//uses: _armor_val
action armor_pack
{
if(my._armor_val <= 0)
{
my._armor_val = 25; //Give it a default value
}
my.enable_impact = on;
my.event = armorPackEvent;
}



I would also be happy to hear any suggestions for other codes
Hope this helps,
James