help with Slot machine game

Blitz3D Forums/Blitz3D Beginners Area/help with Slot machine game

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Here's a new version, perhaps it will help you debug it if it desn't work but I explain the math:

; Get EntityPitch which is -90 to 90
Pitch# = EntityPitch#(Entity)

; Change range to 0 to 180
Pitch# = Pitch# + 90.0

; Get EntityYaw which is 0 or 180? (Check this!)
Yaw# = EntityYaw#(Entity)

; Add Yaw, which is 0 or 180 to Pitch which is 0..180, to get 0..360.
Pitch# = Pitch# + Yaw#

; Divide Pitch (0..360) by 90 (360/4) and round it down to get an integer 0..3.
Face = Floor(Pitch# / 90.0)