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
Strange Problem.
spamqad Offline
Junior Member

Posts: 12
Threads: 4
Joined: Sep 2010
Reputation: 0
#1
Strange Problem.

Hello fellow developers. Many days ago I cam across a common problem facing me and my customs story. My script would not work. so I posted on the forms, and good fellow triadtimes came to help me. however after taking his advice it still did not work. Infact not even the test script seemed to work. Please if someone knows the answer to my problem then dont hesitate to answer it.

The point of the script was that when the player walked into the first area ("ScriptArea_1") A monster would spawn. Then if the player tried to retreat to the cabinet they would trigger the next Area ("Causing a monster to spawn in the cabinet itself and run out.

-----------------------------------------------------------------------------------------------------------

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 0, "");
AddEntityCollideCallback("Player", "ScriptArea_2", "PlayerCollide2", true, 1);
}

void PlayerCollide2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 2, "");
}
-----------------------------------------------------------------------------------------------------------

The point of test script was to see if i could put a chair into an area and turn an entity on.

-----------------------------------------------------------------------------------------------------------

void onStart ()
{
AddEntityCollideCallback("ChairKey", "ChairLock", "ChairComplete", true, 0);
}
void ChairComplete()
{
SetEntityActive("ChairCandle", true);
}
-----------------------------------------------------------------------------------------------------------
*bump*
(This post was last modified: 12-21-2011, 12:41 AM by spamqad.)
12-21-2011, 12:01 AM
Find
RedMser Offline
Junior Member

Posts: 40
Threads: 12
Joined: Mar 2012
Reputation: 1
#2
RE: Strange Problem.

(12-21-2011, 12:01 AM)spamqad Wrote: Hello fellow developers. Many days ago I cam across a common problem facing me and my customs story. My script would not work. so I posted on the forms, and good fellow triadtimes came to help me. however after taking his advice it still did not work. Infact not even the test script seemed to work. Please if someone knows the answer to my problem then dont hesitate to answer it.

The point of the script was that when the player walked into the first area ("ScriptArea_1") A monster would spawn. Then if the player tried to retreat to the cabinet they would trigger the next Area ("Causing a monster to spawn in the cabinet itself and run out.

-----------------------------------------------------------------------------------------------------------

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 0, "");
AddEntityCollideCallback("Player", "ScriptArea_2", "PlayerCollide2", true, 1);
}

void PlayerCollide2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 2, "");
}
-----------------------------------------------------------------------------------------------------------

The point of test script was to see if i could put a chair into an area and turn an entity on.

-----------------------------------------------------------------------------------------------------------

void onStart ()
{
AddEntityCollideCallback("ChairKey", "ChairLock", "ChairComplete", true, 0);
}
void ChairComplete()
{
SetEntityActive("ChairCandle", true);
}
-----------------------------------------------------------------------------------------------------------
*bump*
I beleave you try to enable the Grunt 2 times: one at the first collision and again on the 2nd one. Also, when testing the map, are there no errors?
03-31-2012, 01:24 PM
Find




Users browsing this thread: 1 Guest(s)