Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom story crash issue
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
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 Sad
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)
[Image: k6vbdhu]

Aculy iz dolan.
10-31-2012, 08:50 PM
Find


Messages In This Thread
Custom story crash issue - by Rowzter - 10-31-2012, 08:40 PM
RE: Custom story crash issue - by The chaser - 10-31-2012, 08:50 PM
RE: Custom story crash issue - by Rowzter - 10-31-2012, 08:56 PM



Users browsing this thread: 1 Guest(s)