this is a strange one, for some reason AI object tend to clime up & fall through things when dark physics is added to them.
I don`t get my head around that one be cos I had to work on somthing else at the time, but if you figger it out please post it here.
here is your code with out media
Set Display Mode 1280, 800, 32
Sync On
Sync Rate 0
`*** Start Physic and AI
AI Start
`AI Set Radius 2.5
Phy Start
`*** User AI setup ***
type AI :` name of user type
Alive as boolean :` to see if the AI object is alive or not
Size as integer :` how big the AI object is
speed# as float
endtype :` end of user type
dim AI_NPC(2) as AI
` make a patrol path
AI Make Path 1
AI Path Add Point 1, 100, 100
AI Path Add Point 1, -100, 100
AI Path Add Point 1, -100, -100
AI Path Add Point 1, 100, -100
`Load Object "DataObjectMondeMonde.dbo", 1
make object cube 1,1
scale object 1,100000,10,100000
Phy Make Rigid Body Static MESH 1
`Load Object "DataObjectJoueurJoueur.dbo", 2
make object cube 2,1
AI_NPC(2).Alive = 1
rem add them to the enemy team and set their speed (in units per second)
AI Add Enemy 2
AI Set Entity Speed 2, 25.00000000
AI Set Entity Aggressive 2
AI Set Entity View Arc 2, 90, 180
AI Set Entity View Range 2, 60
AI Set Entity Hearing Range 2, 100
`AI Set Avoid Mode 1
`assign entities their patrol paths (entityNum, pathNum)
AI Entity Assign Patrol Path 2, 1
`phy make rigid body dynamic box i :`????????????????
phy make BOX character controller 2,20,30,20,object size x(2)/2,object size y(2)/2,object size z(2)/2,1, 1.5, 45.0
`phy make capsule character controller 2,20,30,20,object size x(2),object size y(2),1,1.5,45.0
DO
AI_movement = AI Get Entity Is Moving ( 2 )
AI_Move_X# = AI Get Entity Move X ( 2 )
AI_Move_Z# = AI Get Entity Move z ( 2 )
` AI_Move_Z# = object position y(i)
If AI_movement = 1 Then AI_NPC(2).speed# = 25.00000000
if AI_movement = 0 Then AI_NPC(2).speed# = 0.00000000
phy move character controller 2,AI_NPC(2).speed# :` this how it works but I cant fix it
` work how to make nice move ment for the AI object :speed#*sin(AI_Move_X#)
` phy set rigid body linear velocity i,speed#*sin(AI_Move_Z#)*cos(AI_Move_X#),object position y(i),speed#*cos(AI_Move_Z#)*cos(angX#) :`object position y(i) :`speed#*sin(AI_Move_X#)
Camera_Control()
`*** Update Physic and AI ***
ai update
phy update
sync
LOOP
function Camera_Control()
`speed# = 10
`angY# = camera angle y()
`angX# = -camera angle X()
yrotate camera camera angle y() + mousemovex()*0.3
xrotate camera camera angle x() + mousemovey()*0.3
rem stops mouse from going upside down
if wrapvalue(camera angle x(0))>100 and wrapvalue(camera angle x(0))<120 then xrotate camera 0,100
if wrapvalue(camera angle x(0))>180 and wrapvalue(camera angle x(0))<280 then xrotate camera 0,280
rem camera position
`position camera x#,y#,z#
if mouseclick()=2 then move camera 0,-5
if mouseclick()=1 then move camera 0,5
`if upkey()=1 then move camera 0,0.5
`if downkey()=1 then move camera 0,-0.5
endfunction
PHY END
now it seem to work well with out media, now if I were you I would look at the level you made, and check for gaps and holes.
run it thro the physic debuger, and see if its your level or the character controller which is on the blink.
soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!