Rowzter
Junior Member
Posts: 44
Threads: 12
Joined: Oct 2012
Reputation:
3
|
Custom story crash issue
Hello!, i have solved the Key unlock door problem, but now i want a grunt to spawn when im entering an area. When i start the custom story i got a crash report saying like "Could not load script, FOund parameters with the same name"
here is my new script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "key_study_1", "mansion_1", "UnlockDoor", true);
}
void UnlockDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}
void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
}
Is there some errors here?, i cant solve this problem
|
|
10-31-2012, 08:40 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: Custom story crash issue
(10-31-2012, 08:40 PM)Rowzter Wrote: Hello!, i have solved the Key unlock door problem, but now i want a grunt to spawn when im entering an area. When i start the custom story i got a crash report saying like "Could not load script, FOund parameters with the same name"
here is my new script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "key_study_1", "mansion_1", "UnlockDoor", true);
}
void UnlockDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}
void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
}
Is there some errors here?, i cant solve this problem You have two void OnStart().
It should be like this:
void OnStart()
{
AddUseItemCallback("", "key_study_1", "mansion_1", "UnlockDoor", true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}
void UnlockDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
}
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
10-31-2012, 08:50 PM |
|
Rowzter
Junior Member
Posts: 44
Threads: 12
Joined: Oct 2012
Reputation:
3
|
RE: Custom story crash issue
Thank you!!! you are the best on this forum!!!! Thank u very much!!!!!!!!!!
=D=D xD, How do i "Lock" this thread now xD?
|
|
10-31-2012, 08:56 PM |
|
|