PDA

View Full Version : Possible grid bug?


Shadow-Wolf
08-27-2009, 05:41 PM
Ok heres the problem, for a quest I've set up a random wandering npc named Crazy Dom(temp name) and he is set to a patrol grid in the city of felwithe. However when he spawns he waits at the first waypoint on the grid for twice as long and when he starts to move he skips the second waypoint on the grid and heads straight for the 3rd. However after he has completed his path once it seems to fix the problem and he follows the correct grid pattern, any ideas?

Grid
INSERT INTO `grid` VALUES ('61005', '61', '3', '2');

Grid entries

INSERT INTO `grid_entries` VALUES ('61005', '61', '1', '17.3', '-0.5', '3.753', '0', '5');
INSERT INTO `grid_entries` VALUES ('61005', '61', '2', '-202.039', '-0.155101', '3.752', '0', '5');
INSERT INTO `grid_entries` VALUES ('61005', '61', '3', '-240.357', '-115.072', '3.752', '0', '5');
INSERT INTO `grid_entries` VALUES ('61005', '61', '4', '-308.382', '-112.569', '3.752', '0', '5');
INSERT INTO `grid_entries` VALUES ('61005', '61', '5', '-331.336', '-36.8543', '3.752', '0', '5');
INSERT INTO `grid_entries` VALUES ('61005', '61', '6', '-427.137', '-35.0299', '3.752', '0', '5');
INSERT INTO `grid_entries` VALUES ('61005', '61', '7', '-428.05', '-79.1253', '3.752', '0', '5');
INSERT INTO `grid_entries` VALUES ('61005', '61', '8', '-484.019', '-77.6558', '3.752', '0', '5');
INSERT INTO `grid_entries` VALUES ('61005', '61', '9', '-502.502', '-22.7699', '3.752', '0', '5');
INSERT INTO `grid_entries` VALUES ('61005', '61', '10', '-574.855', '9.43539', '3.752', '0', '5');


spawn 2(hes one of 5 in his spawngroup, and if the others spawn instead of him they do the same thing)

INSERT INTO `spawn2` VALUES ('68532', '61005', 'felwithea', '0', '17.299999', '-0.500000', '3.800000', '192.000000', '10', '0', '61005', '0', '1');

joligario
08-27-2009, 07:36 PM
The setting of '2' sets a random pause. That may explain why he is at the first point twice as long.

Shadow-Wolf
08-27-2009, 08:06 PM
pretty sure it's supposed to be random between 1 and the number I set, however he stays longer than all the points even though the pause on this point is smaller than the others.

joligario
08-27-2009, 08:11 PM
The pause on all your points is 5 according to your code above

Shadow-Wolf
08-27-2009, 08:16 PM
Changed them afterwards, the all pauses are 1 second except on halfway through where I play to have him talking. the first waypoint still takes more than 6 seconds.

joligario
08-27-2009, 08:19 PM
Have you tried changing to full pause (1) yet? It may help you sort out real timing.

Shadow-Wolf
08-27-2009, 08:27 PM
Yes I did, and I added a little debug quest to him that has him say what waypoint he's at, when he spawns he says he's at waypoint one and heads for the third waypoint, apparently quest waypoints start at 0 so when he says he's at 1 he is actually at waypoint 2. I have changed the waypoint numbers to start at 0 like the quest system and that hasn't changed anything.

joligario
08-27-2009, 08:47 PM
I haven't seen any start at 0. Waypoint 1 should be his spawn point also. Unless you are talking about $wp... I haven't tested that out yet.

Shadow-Wolf
08-27-2009, 10:26 PM
$wp starts at 0 so I changed the grid points to match. Makes it easier to debug atleast.