Hiding an entity upon colision

Blitz3D Forums/Blitz3D Beginners Area/Hiding an entity upon colision

thanks jhocking for your sugestion.. and Wolron, I know how the free entity code works, I just dont understand how to apply it through a colision... though jhocking's advice has given me more information to work with, I'm still stubbed as to how to place the code into my current work..

here's my coding so far, take note.. I made the spheres coins, and I'm not really using Mario, but a white sphere named Bob.. this is just so I can attempt to build a decent 3D engine

----------------------------------------------------
Graphics3D 530,340
SetBuffer BackBuffer()

Const bob_type=1
Const wld_type=2
Const coin_type=3

;--Camera-------------------------
cam=CreateCamera()
CameraClsColor cam,999,999,999
CameraFogMode cam,1
CameraFogRange cam,0,100
CameraFogColor cam,999,999,999
CameraViewport cam,0,0,800,600
MoveEntity cam,0,5,-20

light=CreateLight()
;---------------------------------

;--Player-------------------------
bob=CreateSphere()
PositionEntity bob,0,0,0
EntityType bob,bob_type

t2=CreateCube()
ScaleEntity t2,1,1,1
PositionEntity t2,0,1,0
EntityColor t2,800,43,25
EntityAlpha t2,0

EntityParent cam,t2
;----------------------------------

;--Coins (for now)-----------------
coin=CreateSphere()
ScaleEntity coin,0.5,0.5,0.5
EntityColor coin,100,50,100
EntityType coin,coin_type
PositionEntity coin,5,0,0

CopyEntity coin
PositionEntity coin,10,0,0
CopyEntity coin
PositionEntity coin,15,0,0
CopyEntity coin
PositionEntity coin,20,0,0
CopyEntity coin
PositionEntity coin,20,0,-5
CopyEntity coin
PositionEntity coin,20,0,-10
CopyEntity coin
PositionEntity coin,20,0,-15
;-----------------------------------


;--world----------------------------
wld=CreatePlane()
PositionEntity wld,0,-5,0
grs= LoadTexture("grass.bmp")
ScaleTexture grs,20,20
EntityTexture wld,grs
EntityType wld,wld_type
;------------------------------------

Collisions bob_type,wld_type,2,2

gravity#=.03
jumpvel#=.9

While Not KeyHit(1)


If KeyDown(200) MoveEntity bob,0,0,0.5 MoveEntity t2,0,0,0.5
If KeyDown(208) MoveEntity bob,0,0,-0.5 MoveEntity t2,0,0,-0.5
If KeyDown(203) MoveEntity bob,-0.5,0,0 MoveEntity t2,-0.5,0,0
If KeyDown(205) MoveEntity bob,0.5,0,0 MoveEntity t2,0.5,0,0
PointEntity cam,t2

If jumping=0
If KeyDown(54) Then yvel#=jumpvel# jumping=1
EndIf
If jumping=1
yvel#=yvel#-gravity#
by#=by#+yvel#
EndIf

If by#<1 Then by#=1 yvel#=0 jumping=0

speed#=speed#*.99
MoveEntity bob,0,yvel#,speed#


UpdateWorld
RenderWorld

Flip
Wend

End
-----------------------------------------------------

can someone explain to me how to place the code into my current code?