RE: Enemy waiting at each PathNodes
I want the monster to go in straight line , and then re-go where he started walking , still in straight line.
Maybe my script can explain better my problem :
////////////////////////////
// Run when entering map
void OnStart()
{
SetEntityActive("monstre_1", false);
AddEntityCollideCallback("Player", "ScriptArea_1", "Armor", true, 1);
AddEntityCollideCallback("monstre_1", "ScriptArea_3", "stoppath", true, 0);
}
void Armor(string &in asParent, string &in asChild, int alState)
{
SetEntityActove("monstre_1" true);
SetEntityActive("corpse_male_1", true);
AddPlayerBodyForce(-90000, 6000, 0, false);
AddEnemyPatrolNode("monstre_1", roflpath_1, 0, "");
AddEnemyPatrolNode("monstre_1", roflpath_2, 0, "");
AddEnemyPatrolNode("monstre_1", roflpath_3, 0, "");
AddEnemyPatrolNode("monstre_1", roflpath_4, 0, "");
AddEnemyPatrolNode("monstre_1", roflpath_5, 0, "");
AddEnemyPatrolNode("monstre_1", roflpath_6, 0, "");
AddEnemyPatrolNode("monstre_1", roflpath_7, 0, "");
AddEnemyPatrolNode("monstre_1", roflpath_8, 0, "");
}
void stoppath(string &in asParent, string &in asChild, int alState)
{
SetEnemyDisableTriggers("monstre_1", false);
ClearEnemyPatrolNodes("monstre_1");
}
If i only put AddEnemyPatrolNode("monstre_1", roflpath_1, 0, ""); he go to first path , and stop walking.
If i put AddEnemyPatrolNode("monstre_1", roflpath, 0, ""); he dosen't move at all.
What should i do ?
(This post was last modified: 02-11-2012, 05:05 PM by onv.)
|