Well, I am completely befuddled with this. I am busy creating a Dice Rolling system which I originally was just gonna have run in the background but now I have decided to have it shown and controlled manually by the player.
What I want to do is roll the dice for as long as the player holds down a key. So far I have tried it with the Space Key using the Ascii code of 32 but it has not worked.
Here is my code so far:
load object "Dice_Cube01.x", 1
Asc(I$)=32
While I$=Inkey$()
DO
X=RND(4)
Y=RND(4)
Z=RND(4)
XROTATE OBJECT 1,OBJECT ANGLE X(1)+X
YROTATE OBJECT 1,OBJECT ANGLE Y(1)+Y
ZROTATE OBJECT 1,OBJECT ANGLE Z(1)+Z
LOOP
EndWhile
Wait escapekey()