Or you can also use a disstance fourmula to stop it, like if object distance is x then stop object 1.this is a faster way to do it.
edit, or with this function put it like this
check =CheckObjectCollisionArea(your box, the floor, 5)
if check =1 then stop object
function CheckObjectCollisionArea(Object1, object2, distance)
`Set the default to '0', the check variable is what we'll be returning - if the object is in the right area, a value will be returned
check = 0
`Get the First Object's position - I named the variables 'NPC' and 'Player', but that don't matter, it's just what I called them when
`coding
NPCx = Object position x(Object1)
NPCy = Object position y(Object1)
NPCz = object position z(Object1)
`Get the second object's position
PlayerX = Object position x(Object2)
PlayerY = object position y(Object2)
PlayerZ = object position z(Object2)
`Calculate the distance between points by removing the second object's position variables from the the first
`So is Object 2 is at X = 100 and Object 1 is at X = 30, then the returned 'x' value overall will be '70', thus the distance
`on the 'x' axis
Posx = NPCx - PlayerX
Posy = NPCy - PlayerY
Posz = NPCz - PlayerZ
`getting the distance
dis = distance
`This will check if the objects are close enough. Basically if you choose a distance value of '25', it'll check
`if the object distance is between -25 and 25 for all axis' If you're in that zone, then the check value returned will be '1'
if posx < dis and posx > -dis and posy < dis and posy > -dis and posz < dis and posz > -dis then check = 1
`endif
my signature keeps being erased by a mod So this is my new signature.