Full Collision now..
>.<
`Loads the Character
Make Object Box 1,200,200,200
`Loads Enemy
Make Object Box 2,200,200,200
`position object a little to the right
position object 2,0,0,300
`Makes a Sphere the size of the Character for a shield
Make Object Sphere 3,Object Size(1)*2
`Collision Boxes for Object 1 (Character)
CollBox(1)
`Collision Boxes for Object 2 (Enemy)
CollBox(2)
Do
`Hides Sphere for now
Hide Object 3
`Checks for collision beetween the Enemy and the Character
`Moves the Character
if upkey()=1 then move object 1,1
if downkey()=1 then move object 1,-1
if leftkey()=1 then turn object left 1,2
if rightkey()=1 then turn object right 1,2
`positions the Camera over Object 1
position camera Object position x(1)+500, object position y(1)+500, object Position z(1)
`points the camera where object 1 is
point camera Object position x(1),Object position y(1), object position z(1)
`Positions the Sheild where the (Character) object 1 is
position object 3,object position x(1),object position y(1),object position z(1)
Collision(1,2)
Loop
`Collision Box Function from RPGamer
Function CollBox(ob#)
obsx#= Object Size X(ob#): Rem Find the object size X
obsy#= Object Size Y(ob#): Rem Find the object size Y
obsz#= Object Size Z(ob#): Rem Find the object size Z
Make object Collision Box ob#,0-(obsx#/2),0-(obsy#/2),0-(obsz#/2),(obsx#/2),(obsy#/2),(obsz#/2),0
endfunction
Function Collision(x,x2)
if object collision(x,x2)=1
x#=object position x(x)
y#=object position y(x)
z#=object position z(x)
dec x#,get object collision x()
dec y#,get object collision y()
dec z#,get object collision z()
position object x,x#,y#,z#
Show Object 3 : Ghost Object on 3
Endif
EndFunction
Tigerdane
