04-19-2012, 05:22 PM
I was looking at some of Amnesia's source files and I noticed a 10_daniels_room_servant_grunt.nodes file. I was wondering if anyone knows of an easy way to make one. I say easy because one of the values needed are distance values between each node. Ex.
Of course it's possible to calculate the distance between two points, but it would be quite tedious to do so. Or am I just crazy, and that Distance value means something else completely. I would like to use such a file so that I can just clear the current path nodes from the AI and call up paths that I have already pre-made.
Oh, and they use it like so:
Or is that just how far the enemy can stray from the nodes?
Code:
<Node Name="PathNodeArea_1" ID="580">
<Edge Node="PathNodeArea_28" Distance="1.67661678791046142578" />
<Edge Node="PathNodeArea_25" Distance="1.74686419963836669922" />
<Edge Node="PathNodeArea_4" Distance="2.35236239433288574219" />
<Edge Node="PathNodeArea_2" Distance="3.08871102333068847656" />
<Edge Node="PathNodeArea_29" Distance="3.24689984321594238281" />
<Edge Node="PathNodeArea_7" Distance="4.88411092758178710938" />
</Node>
Oh, and they use it like so:
Code:
AddEnemyPatrolNode("grunt_normal_1", "PathNodeArea_28", 0, "");
Or is that just how far the enemy can stray from the nodes?