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
Why doesnt this script work!?
Angerpull Offline
Member

Posts: 88
Threads: 24
Joined: Jun 2011
Reputation: 0
#3
RE: I see no Problems!?

(07-08-2011, 11:12 PM)Snuffalofagus Wrote:
(07-08-2011, 10:59 PM)Angerpull Wrote: Hey can anyone tell me what's wrong with my script? I want a grunt to spawn and walk against a path, but no matter what I do it will not work.

Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player" , "GruntCorner" , "MonsterFunc1" , true , 1);
}

void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("CornerGrunt" , true);
AddEnemyPatrolNode("CornerGrunt", "Path1", 0, "");
AddEnemyPatrolNode("CornerGrunt", "Path2", 5, "");
AddEnemyPatrolNode("CornerGrunt", "Path3", 0, "");
AddEnemyPatrolNode("CornerGrunt", "Path4", 0, "");
}

Does the enemy even become active? As in, does it actually spawn?
I personally think that the "CreateEntityAtArea" command works better than the "SetEntityActive" command. That's just me though, first off, does the map even load?

Yes the map loads, how could I know if the script worked or not? But I see no problems with my script.

07-08-2011, 11:50 PM
Find


Messages In This Thread
Why doesnt this script work!? - by Angerpull - 07-08-2011, 10:59 PM
RE: I see no Problems!? - by Zypherzemus - 07-08-2011, 11:12 PM
RE: I see no Problems!? - by Angerpull - 07-08-2011, 11:50 PM
RE: I see no Problems!? - by Zypherzemus - 07-09-2011, 12:57 AM
RE: I see no Problems!? - by Angerpull - 07-09-2011, 01:24 AM



Users browsing this thread: 1 Guest(s)