hi all, i dont know how to explain what i am trying to do so here it is in points:
-i have a cube and a sphere
-you move the sphere towards the cube
-once the cube and the sphere collide the cube gets shorter and the sphere dissapears
Everything works well until the cube and sphere collide. When they do, the sphere dissapears but the cube keeps getting shorter even though nothing is colliding with it. I kind of know why this is but i dont know how to change it. Here is the code (in the main loop):
i put health as 10 and y as 10 in the beginning. Does anyone know how i could make it so that when the sphere collides with the cube, the cube gets shorter by 1 and no more, until another sphere collides with it?
Thanks alot
-i have a cube and a sphere
-you move the sphere towards the cube
-once the cube and the sphere collide the cube gets shorter and the sphere dissapears
Everything works well until the cube and sphere collide. When they do, the sphere dissapears but the cube keeps getting shorter even though nothing is colliding with it. I kind of know why this is but i dont know how to change it. Here is the code (in the main loop):
If EntityCollided (sphere, type_cube) And health=>2 Then y=y-1 health=health-1 HideEntity sphere EndIf ScaleEntity cube, x, y, z
i put health as 10 and y as 10 in the beginning. Does anyone know how i could make it so that when the sphere collides with the cube, the cube gets shorter by 1 and no more, until another sphere collides with it?
Thanks alot