(06-10-2013, 10:43 AM)amnesiaplayer321 Wrote: Hi again. I need a script for disables lantern use in specific area,then gets enabled to use in another area.I found no results on internet. Anyone can give me that script?
void onStart();
{
AddEntityCollideCallback("Player", "AreaName", "LanternDisable", true, 1);
AddEntityCollideCallback("Player", "AreaName", LanternEnable", true, 1);
}
void LanternDisable(string &in asParent, string &in asChild, int alState)
{
SetLanternDisabled(true); // lantern gone
}
void LanternEnable(string &in asParent, string &in asChild, int alState)
{
SetLanternDisabled(false); // lantern back
}
When player collides with area he loses or get his lantern back.