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
Please check the troubleshooting guides before posting!
ServantBrute Offline
Junior Member

Posts: 5
Threads: 3
Joined: Jul 2013
Reputation: 0
#1
Please check the troubleshooting guides before posting!

Hey guys i'm just checking to see if my Level3.hps file has any errors becuase when i enter a level door it says Fatal error cannot reach Level3.hps.

Here it is.

void OnStart()
{
AddEntityCollideCallback("Player", "AreaCollide", "EventCollide", true, 1);

void EventCollide(string &in asParent, string &in asChild, int alState)

SetEntityActive("Grunt", true);

AddEnemyPatrolNode("Grunt", "Path_1", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Path_2", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Path_3", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Path_4", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Path_5", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Path_6", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Path_7", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Path_8", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Path_9", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Path_10", 0.001f, "");
}
AddUseItemCallback("", "Key3", "DOOR", "UseKeyOnDoor", true);

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}
07-22-2013, 02:11 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Please check the troubleshooting guides before posting!

void OnStart()

{

        AddEntityCollideCallback("Player", "AreaCollide", "EventCollide", true, 1);    

AddUseItemCallback("", "Key3", "DOOR", "UseKeyOnDoor", true);
}


void EventCollide(string &in asParent, string &in asChild, int alState)
{

        SetEntityActive("Grunt", true);

     AddEnemyPatrolNode("Grunt", "Path_1", 0.001f, "");

        AddEnemyPatrolNode("Grunt", "Path_2", 0.001f, "");

        AddEnemyPatrolNode("Grunt", "Path_3", 0.001f, "");

        AddEnemyPatrolNode("Grunt", "Path_4", 0.001f, "");

        AddEnemyPatrolNode("Grunt", "Path_5", 0.001f, "");

    AddEnemyPatrolNode("Grunt", "Path_6", 0.001f, "");

    AddEnemyPatrolNode("Grunt", "Path_7", 0.001f, "");

    AddEnemyPatrolNode("Grunt", "Path_8", 0.001f, "");

    AddEnemyPatrolNode("Grunt", "Path_9", 0.001f, "");

    AddEnemyPatrolNode("Grunt", "Path_10", 0.001f, "");

}

    
void UseKeyOnDoor(string &in asItem, string &in asEntity)

{

    SetSwingDoorLocked(asEntity, false, true);

    PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);

    RemoveItem(asItem);    

}

Fixed. The errors are because void OnStart() have no closing brace, void EventCollide have no opening brace, and AddUseItemCallback is not defined in a function.

Also, this is the wrong section.

"Veni, vidi, vici."
"I came, I saw, I conquered."
07-22-2013, 07:46 AM
Find
ServantBrute Offline
Junior Member

Posts: 5
Threads: 3
Joined: Jul 2013
Reputation: 0
#3
RE: Please check the troubleshooting guides before posting!

(07-22-2013, 07:46 AM)JustAnotherPlayer Wrote:
void OnStart()

{

        AddEntityCollideCallback("Player", "AreaCollide", "EventCollide", true, 1);    

AddUseItemCallback("", "Key3", "DOOR", "UseKeyOnDoor", true);
}


void EventCollide(string &in asParent, string &in asChild, int alState)
{

        SetEntityActive("Grunt", true);

     AddEnemyPatrolNode("Grunt", "Path_1", 0.001f, "");

        AddEnemyPatrolNode("Grunt", "Path_2", 0.001f, "");

        AddEnemyPatrolNode("Grunt", "Path_3", 0.001f, "");

        AddEnemyPatrolNode("Grunt", "Path_4", 0.001f, "");

        AddEnemyPatrolNode("Grunt", "Path_5", 0.001f, "");

    AddEnemyPatrolNode("Grunt", "Path_6", 0.001f, "");

    AddEnemyPatrolNode("Grunt", "Path_7", 0.001f, "");

    AddEnemyPatrolNode("Grunt", "Path_8", 0.001f, "");

    AddEnemyPatrolNode("Grunt", "Path_9", 0.001f, "");

    AddEnemyPatrolNode("Grunt", "Path_10", 0.001f, "");

}

    
void UseKeyOnDoor(string &in asItem, string &in asEntity)

{

    SetSwingDoorLocked(asEntity, false, true);

    PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);

    RemoveItem(asItem);    

}

Fixed. The errors are because void OnStart() have no closing brace, void EventCollide have no opening brace, and AddUseItemCallback is not defined in a function.

Also, this is the wrong section.
I knew this was the wrong section, i was just rushing. And thanks for the help bro!
08-12-2013, 01:26 AM
Find




Users browsing this thread: 1 Guest(s)