I cant get the coins to disapear when the player collides with them... alsoI'm trying to get them all to rotate... which I cant figure out how to use types properly =P
can someone help me pleaze???
can someone help me pleaze???
Graphics3D 600,600,32,2 SetBuffer BackBuffer() Const tbob=1 Const tcoin=2 Type coin Field colision End Type camera=CreateCamera() CameraClsColor camera,0,100,100 l=CreateLight() PositionEntity camera,5,5,-15 bob=CreateSphere() coin=CreateSphere() EntityColor coin,100,100,0 ScaleEntity coin,.1,.5,.5 EntityShininess coin,1 PositionEntity bob,-3,0,0 EntityColor bob,0,100,100 EntityType bob,tbob EntityType coin,tcoin Collisions tbob,tcoin,1,1 For c.coin=Each coin If EntityCollided(bob,coin) c\colision=CountCollisions(bob) If c\colision>0 HideEntity coin Delete c collectball=collectball+1 EndIf EndIf Next For x=0 To 5 For y=0 To 5 CopyEntity coin PositionEntity coin,x*3,y*3,0 Next Next While Not KeyHit(1) If KeyDown(205) MoveEntity bob,.2,0,0 If KeyDown(203) MoveEntity bob,-.2,0,0 If KeyDown(200) MoveEntity bob,0,.2,0 If KeyDown(208) MoveEntity bob,0,-.2,0 TurnEntity coin,1,1,1 colidecount=CountCollisions(bob) RenderWorld UpdateWorld Text 0,0,"Use arrow keys to control Bob" Text 0,12,"colision count on Bob = "+colidecount Text 400,0,"Gold Coins Collected = "+collectball Flip Wend End