Zizilon
Junior Member
Posts: 7
Threads: 4
Joined: Jun 2012
Reputation:
0
|
RE: I need Help
(01-29-2014, 11:40 AM)daortir Wrote: You had 2 OnEnter functions ^^. That should fix the error : )
void OnStart()
{
AddUseItemCallback("", "Key", "Mansion", "UsedKeyonDoor", true);
}
void UsedKeyonDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Mansion", false, true);
PlaySoundAtEntity("", "unlock_door", "Mansion", 0, false);
RemoveItem("Key");
}
void OnEnter()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0.001, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 0, "");
SetEntityActive("servant_brute_1", true);
}
void OnStart()
{
AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1);
}
void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup1", 0); //This stands for ("Name of category", "Name of entry", time to be displayed on the screen);.
}
void OnLeave()
{
}
Now there is only one error, but it fixed the other one so there is something else wrong?
ERR : A function with the same name and parameters already exist
|
|
01-29-2014, 11:49 AM |
|