Еще один вопрос.
Вот создал хп и мп.
С помощью какой команды сделать так чтобы при столкновение с объектом хп убавлялись.
Global energy,r1,g1,b1,x1,y1,font_power
AppTitle"Power"
Graphics3D 640,480,16,2
font_power=LoadFont("Arial",18,1)
SetBuffer BackBuffer()
camera=CreateCamera()
light=CreateLight()
cone=CreateCone( 32 )
PositionEntity cone,0,0,5
While Not KeyDown( 1 )
TurnEntity cone,1,1,1
RenderWorld()
PositionPower(10,GraphicsHeight()-60)
ColorPower(255,0,0)
Power(100,"Health Power")
PositionPower(10,GraphicsHeight()-3
ColorPower(0,0,255)
Power(80,"Magic Power")
Flip
Wend
End
Function PositionPower(x,y) ;x,y - позиции полосы энергии на экране
x1=x:y1=y
End Function
Function ColorPower(r,g,b) ;r,g,b - цвет полосы энергии в RGB
r1=r:g1=g:b1=b
End Function
Function Power(energy,text_$) ;energy - заполнение полосы энергии значения от 0 до 100, text_$ - текст
If energy>100 Then energy=100
If energy<0 Then energy=0
Color 255,255,255:Rect x1,y1,104,19,0
Color r1,g1,b1:Rect x1+2,y1+2,energy,15,1
SetFont font_power
Text x1+109,y1+1,text_$
End Function