I am making a slot machine game (3D) using textured cylinders as the spinning things. It first starts off with the cylinders spinning and you have to press space to stop each one, but what I need to do is so when you press space it stops on a certain part of the texture(instead of it stopping in between a 7 and a BAR or some other place). Each texture part is 90 degrees apart and there are 4 parts so I would need to make it stop within one of 4 90 degree areas. Ermm... I hope I explained it well enough.
Heres some code:
Graphics3D 800,600,32,2
cam=CreateCamera()
PositionEntity cam,0,0,-3
light=CreateLight()
slot=CreateCylinder()
PositionEntity slot,0,0,0
RotateEntity slot,0,0,90
turning=True
While Not KeyHit(1)
If turning=True Then
TurnEntity slot,0,7,0
EndIf
If KeyDown(57) Then
turning=False
EndIf
UpdateWorld
RenderWorld
Flip
Wend
|