I was just testing to see if I could use paths to control my train system and can't figure out whats making my AI entity stop on some waypoints but not others. Any ideas?
The red sphere is the first point, the rest are green. Press space to exit..
Set Display Mode 1024,768,32
Sync On
Scalefactor = 40
MAKE MATRIX 1,5000,5000,15,15
POSITION MATRIX 1,-2500,-15,-2500
AI Start
Make Object Cube 1,8
AI Add Friendly 1,1
AI Add Container 1
AI Make Path 1
AI Set Entity Speed 1,200
DIM X1#(15)
DIM Z1#(15)
Autocam off
Position camera 0,200,0
FOR I = 1 TO 14
READ X1#(I),Z1#(I)
x1#(I)=X1#(I)*ScaleFactor
Z1#(I)=Z1#(I)*ScaleFactor
MAKE OBJECT sphere I+200,3
POSITION OBJECT I+200,X1#(I),0,Z1#(I)
COLOR OBJECT I+200,RGB(0,255,0)
AI Path Add Point 1,X1#(I),Z1#(I)
NEXT I
AI Debug Show Paths 5
COLOR OBJECT 201,RGB(255,0,0)
AI Entity Assign Patrol Path 1,1
AI SET ENTITY PATROL TIME 1, -1000
AI SET ENTITY TURN SPEED 1,200
Do
Point Camera Object Position X(1),Object Position Y(1),Object Position Z(1)
if Spacekey () then end
AI Update
Sync
Loop
DATA -3.315, 7.971
DATA -3.331, 11.577
DATA -.073, 14.569
DATA 4.781, 13.724
DATA 8.279, 15.35
DATA 11.102, 13.379
DATA 10.273, 10.882
DATA 12.419, 9.447
DATA 9.211, 5.5
DATA 10.707, 1.039
DATA 8.137,-3.898
DATA 1.789,-5.588
DATA -.987,-2.881
DATA -3.288, 1.708
Thank you TGC for creating such amazing products!
Success does not come with meeting the minimum requirements.