It tried the set object collision on 3, but that still did not work. My character goes all the way through it. For some reason it wont let me post the entire code, so ill put the gravity and player positions down. * also, there are steps in the game and spheres that the collision box works for. For some reason it just does not like my box.
player:
make object cylinder 1,50
scale object 1,100,140,100
texture object 1,1
position object 1,0,35,0
make object collision box 1,-25,-35,-25,25,35,25,0
make object cylinder 99,50
make mesh from object 1,99
delete object 99
add limb 1,1,1
offset limb 1,1,0,25,0
scale limb 1,1,100,1,100
texture limb 1,1,99
Gravity:
Rem Gravity Effects
if MyAcceleration# = 0.0 : rem If I am not moving up or down
EmptySpace = 0 : ObjectsChecked = 0 : rem Get ready to start checking collisions
for CheckObject = 6 to 12 : rem Check the floor and every step object
if object collision(1,CheckObject)>0 : rem If I am touching something
1pY# = 1pY# - Gravity# : rem Look below me
position object 1, 1pX#,1pY#,1pZ# : rem Feel below me
if object collision(1,CheckObject) = 0 : rem If I feel only air
EmptySpace = EmptySpace + 1 : rem Mark up a free space
endif : rem I am touching something, but it is not below me
1pY# = 1pY# + Gravity# : rem Look up
position object 1, 1pX#,1pY#,1pZ# : rem Move back
else : rem If I am not touching anything
EmptySpace = EmptySpace + 1 : rem rem Mark up a free space
endif
ObjectsChecked = ObjectsChecked + 1 : rem Done with that one!
next CheckObject : rem On to the next one!
if EmptySpace = ObjectsChecked : rem If I have checked all the objects and nothing is below me
MyAcceleration# = MyAcceleration# - Gravity# : rem Gravity begins to pull
endif
endif
if MyAcceleration# <> 0.0 : rem If I am moving
1pY# = 1pY# + MyAcceleration# : rem Find where I am going
position object 1, 1pX#,1pY#,1pZ# : rem Put me there
EmptySpace = 0 : ObjectsChecked = 0 : rem Get ready to start checking collisions
for CheckObject = 6 to 12 : rem Check the floor and every step object
if object collision(1,CheckObject)>0 : rem If I hit an object
1pY# = 1pY# - MyAcceleration# : rem Find where I was
position object 1, 1pX#,1pY#,1pZ# : rem Put me back
MyAcceleration# = 0.0 : rem Stop me from moving
else : rem If the space I am going to is just air
EmptySpace = EmptySpace + 1 : rem rem Mark up a free space
endif
ObjectsChecked = ObjectsChecked + 1 : rem Done with that one!
next CheckObject : rem On to the next one!
if EmptySpace = ObjectsChecked : rem If I have checked all the objects and nothing is in my path
MyAcceleration# = MyAcceleration# - Gravity# : rem Gravity pulls more
endif
endif