Frictional Games Forum (read-only)

Full Version: Enemy waiting at each PathNodes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello.

I've recently discovered that you can modify the Path of the Enemy , by adding PathNodes point , and script a bit.
But my probleme is :
The Enemy wait like 2 seconds each Path.
I checked my PatrolNodes line (in script file) , and it looks like this :


AddEnemyPatrolNode("monstre_1", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("monstre_1", "PathNodeArea_2", 0.0f, "");
AddEnemyPatrolNode("monstre_1", "PathNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("monstre_1", "PathNodeArea_4", 0.0f, "");
AddEnemyPatrolNode("monstre_1", "PathNodeArea_5", 0.0f, "");
AddEnemyPatrolNode("monstre_1", "PathNodeArea_6", 0.0f, "");
AddEnemyPatrolNode("monstre_1", "PathNodeArea_7", 0.0f, "");
AddEnemyPatrolNode("monstre_1", "PathNodeArea_8", 0.0f, "");

I puted "0.0f" , because i don't want the enemy to wait at each path , but he still do.


Any help ?
Code:
AddEnemyPatrolNode("monstre_1", "PathNodeArea_1", 0, "");



Should work. Don't put 0.0f, just 0.
Don't put 0, put 0.001.
(02-09-2012, 02:41 AM)Strembitsky Wrote: [ -> ]Should work. Don't put 0.0f, just 0.
The engine reads those as exactly the same. The f is only used to tell the programmer that it's a float value, though the scripter should know based upon the general function.


(02-09-2012, 05:36 AM)Obliviator27 Wrote: [ -> ]The engine reads those as exactly the same. The f is only used to tell the programmer that it's a float value, though the scripter should know based upon the general function.

The engine doesn't read them the same. Floats are not integers, and floats are not doubles. If you use decimal values but do not provide an f at the end of the number, the game will assume it is a double. If you use whole numbers, the game will assume it is an integer. Providing an f at the end of a decimal number implies less work for the engine since it doesn't have to implicitly convert the number to the proper type.
I stand corrected. *bows and exits*
Don't assign it to each path node. Assign it a single point to go to. It will use all intermediate path nodes as waypoints, and won't pause at them. The monster will follow the shortest route to the destination. Keep that in mind when assigning it a destination node.
I tested remplacing 0.0f by 0 , but the enemy still wait each path.

The name's of my pathnodes are :
PathNodeArea_1

PathNodeArea_2

PathNodeArea_3

PathNodeArea_4

PathNodeArea_5

PathNodeArea_6

PathNodeArea_7

Will this work , if i only put AddEnemyPatrolNode("monstre_1", "PathNodeArea", 0.0f, ""); or AddEnemyPatrolNode("monstre_1", "PathNodeArea_", 0.0f, ""); or AddEnemyPatrolNode("monstre_1", "PathNodeArea_1", 0.0f, ""); ?





Thanks
anyone ? :-(
(02-09-2012, 12:39 PM)palistov Wrote: [ -> ]Don't assign it to each path node. Assign it a single point to go to. It will use all intermediate path nodes as waypoints, and won't pause at them. The monster will follow the shortest route to the destination. Keep that in mind when assigning it a destination node.

Pages: 1 2