10-14-2012, 11:23 AM
Alright, another day another problem, I added a couple of new lines, they seem to be causing some kind of a problem:
void OnStart()
{
FadeOut(0);
FadeIn(10);
AddEntityCollideCallback("Player", "Studydooropen", "CollideRoomTwo", true, 0);
SetEntityCallbackFunc(lantern_1, removelight);
AddUseItemCallback("", "bedroomkey_1", "mansion_1", "UsedKeyOnDoor", true);
}
void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_2", true, true);
SetSwingDoorLocked("mansion_2", true, true);
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("bedroomkey_1");
}
void removelight(string &in asEntity, string &in type)
{
SetLightVisible(PointLight_1, false);
}
void OnLeave()
{
}
I wanted to make the lantern emit light until the player picks it up, then the light is supposed to disappear. I get this error:
main (6,24) : ERR : lantern_1 is not declared
main (29,18) : ERR : PointLight_1 is not declared
Any help?
Thanks, Rapsis
void OnStart()
{
FadeOut(0);
FadeIn(10);
AddEntityCollideCallback("Player", "Studydooropen", "CollideRoomTwo", true, 0);
SetEntityCallbackFunc(lantern_1, removelight);
AddUseItemCallback("", "bedroomkey_1", "mansion_1", "UsedKeyOnDoor", true);
}
void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_2", true, true);
SetSwingDoorLocked("mansion_2", true, true);
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("bedroomkey_1");
}
void removelight(string &in asEntity, string &in type)
{
SetLightVisible(PointLight_1, false);
}
void OnLeave()
{
}
I wanted to make the lantern emit light until the player picks it up, then the light is supposed to disappear. I get this error:
main (6,24) : ERR : lantern_1 is not declared
main (29,18) : ERR : PointLight_1 is not declared
Any help?
Thanks, Rapsis