Thanks for being patient with me, but something is still wrong because I pasted that exact code and the game throws up an error message saying 'ERR - expected '('.
It must have something to do with the line
"void BreakPotPlant(string &in asParent, string &in asChild, int alState)"
because the map loads when this is deleted. Am I supposed to replace the text in this line?
If it helps here is the entire content of my .hps file so far:
//===========================================
// This runs when the map first starts
void OnStart()
{
if(ScriptDebugOn())
{
GiveItemFromFile("tinderbox", "tinderbox.ent");
{
AddEntityCollideCallback("Player", "ScriptArea_2", "BreakPotPlant", true, 1);
}
void BreakPotPlant(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("pot_plant_small02_1", 0);
}
}
}
//===========================================
// This runs when the player enters the map
void OnEnter()
{
//----AUDIO----//
PlayMusic("10_amb", true, 5, 1, 0, true);
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
}