i am trying to learn/practice scripting by activating a grunt and have it follow path nodes. i can load my map fine but when i enter the script area nothing happens. i believe the names of my entities/areas match between the .map and .hps .... i need someone that has mastered the dark arts of scripting
i spent like 2 hours trying to do this simple task.
is there anything wrong with my syntax or something?
////////////////////////////
// Run first time starting map
void onstart()
{
AddEntityCollideCallback("Player", "Scr_enemyspawn1", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Grunt_1", true);
AddEnemyPatrolNode("Grunt_1", "PathNode_1", 0, "");
AddEnemyPatrolNode("Grunt_1", "PathNode_2", 0, "");
AddEnemyPatrolNode("Grunt_1", "PathNode_3", 0, "");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}