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
Enemy waiting at each PathNodes
onv Offline
Member

Posts: 51
Threads: 12
Joined: Feb 2012
Reputation: 2
#1
Enemy waiting at each PathNodes

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 ?
02-08-2012, 09:37 PM
Find
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#2
RE: Enemy waiting at each PathNodes

AddEnemyPatrolNode("monstre_1", "PathNodeArea_1", 0, "");



Should work. Don't put 0.0f, just 0.
(This post was last modified: 02-09-2012, 02:42 AM by Strembitsky.)
02-09-2012, 02:41 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Enemy waiting at each PathNodes

Don't put 0, put 0.001.

Tutorials: From Noob to Pro
02-09-2012, 02:45 AM
Website Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#4
RE: Enemy waiting at each PathNodes

(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
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: Enemy waiting at each PathNodes

(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.

Tutorials: From Noob to Pro
02-09-2012, 06:08 AM
Website Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#6
RE: Enemy waiting at each PathNodes

I stand corrected. *bows and exits*

02-09-2012, 09:01 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#7
RE: Enemy waiting at each PathNodes

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.

02-09-2012, 12:39 PM
Find
onv Offline
Member

Posts: 51
Threads: 12
Joined: Feb 2012
Reputation: 2
#8
RE: Enemy waiting at each PathNodes

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
02-09-2012, 03:26 PM
Find
onv Offline
Member

Posts: 51
Threads: 12
Joined: Feb 2012
Reputation: 2
#9
RE: Enemy waiting at each PathNodes

anyone ? :-(
02-11-2012, 09:19 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#10
RE: Enemy waiting at each PathNodes

(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.


02-11-2012, 09:31 AM
Find




Users browsing this thread: 1 Guest(s)