(02-05-2012, 06:47 PM)JenniferOrange Wrote: I'm not too sure on this, but you can try adding
CreateDataCache();
to your .hps. It's supposed to cache all of the textures and models until you tell it to destroy them.
The Result
Fatal Error
.............................
...........................
main (7,17):Area_1'is not declared
The Script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Area_1", "Waterlurker", true, 9);
AddUseItemCallback("", "Hammer", "Gate", "Kaputt", true);
CreateDataCache(Area_1);
}
void Waterlurker(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("waterlurker_1", true);
}
void Kaputt(string &in asItem, string &in asEntity)
{
SetEntityActive("Kaputt", true);
SetEntityActive("Gate", false);
SetEntityActive("Box", false);
PlaySoundAtEntity("", "break_wood_metal3.snt", "Player", 0, false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()