(03-31-2012, 04:36 PM)flamez3 Wrote: Use this:
////////////////////////////
// Run when the map starts
void OnStart()
{
AddUseItemCallback("", "key_1", "level_celler_1", "UnlockLevelDoor", true);
}
void UnlockLevelDoor(string &in asItem,string &in asEntity)
{
SetLevelDoorLocked(asEntity, false);
RemoveItem(asItem);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
When scripting make sure that void OnStart() functions stay within the void OnStart() brackets and so on.
It's not really necessary from what I know since FG wrote all their code above all the On's