Ok, to make this simple i have decided to only make the ai follow the player, or another object.
I used this:
rem AI
phy set vehicle motor force 123,250
phy set vehicle wheel multiplier 123,50
EZro_SetupFromObject 123
r# = wrapvalue(EZro_ObjFindLocalYangleToPoint(123,object position x(2),object position y(2),object position z(2)))
phy set vehicle steering angle 123,r#
rem AI
But it doesnt work.
Got any techniques to find out if another object is to the left or right of another object?
----------------------------------------------------------
Changed it a little, but still doesnt work :S
rem AI -------------------------------------------------
rem EZro_SetupFromObject 123
gx# = object position x(123)
gz# = object position z(123)
nx1# = newxvalue(object position x(123),object angle y(123),getdist(123,2))
nz1# = newzvalue(object position z(123),object angle y(123),getdist(123,2))
nx2# = object position x(2)
nz2# = object position x(2)
r# = wrapvalue(ezro_anglebetweenpoints(gx#,0.0,gz#,nx1#,0.0,nz1#,nx2#,0.0,nz2#))
if r# < 0.0 then rm# = -20.0 : phy set vehicle motor force 123,100 : phy set vehicle wheel multiplier 123,200
if r# > 0.0 then rm# = 20.0 : phy set vehicle motor force 123,100 : phy set vehicle wheel multiplier 123,200
if r# <> 0.0
phy set vehicle motor force 123,300
phy set vehicle wheel multiplier 123,50
endif
phy set vehicle steering angle 123,rm#
rem AI -------------------------------------------------
Dont delete my sig mods, it is 600X120...
Slash!