(06-22-2012, 06:25 PM)Jagsrs28 Wrote: Okay, I think I got it now, And I would also just like to say Thank You. You've been a huge help!
I just wanted to make sure everything will work now and I added them correctly.
////////////////////////////
// Run first time starting map
void OnStart()
{
AddTimer("", 1.0, "MonsterPath");
AddEntityCollideCallback("Grunty1", "monster_opendoor_area", monster_opendoor", true, 1);
}
void MonsterPath(string &in asTimer)
{
AddEnemyPatrolNode("Grunt1", "PathNodeArea1", 0,"PathNodeArea2", 0,"PathNodeArea3", 0,"PathNodeArea4", 0,"PathNodeArea5", 0);
}
void monster_opendoor(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("Cabby1", -10.0 , 0, 0, "World");
AddTimer("", 1.0, monsterdisable);
}
void monsterdisable(string &in asTimer)
{
SetEntityActive("Grunt1", false);
}
////////////////////////////
// Run when leaving map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Your getting it but it's still not quite right, add the path nodes like this
AddEnemyPatrolNode("Grunt1", "PathNodeArea1", 0, "");
AddEnemyPatrolNode("Grunt1", "PathNodeArea2", 0, "");
AddEnemyPatrolNode("Grunt1", "PathNodeArea3", 0, "");
AddEnemyPatrolNode("Grunt1", "PathNodeArea4", 0, "");
AddEnemyPatrolNode("Grunt1", "PathNodeArea5", 0, "");
the quotations at the end just before the ); is the animation you want the grunt to play when reaching the path node, these are optional you don't have to have an animation in there but you MUST have the quotations