Hello,
I am trying to create a game where buttons on the screen will pop up randomly across the screen; kind of like whack-o-mole. I have a program located in the postinitialize event’s of the page that the game is supposed to be on as seen below.
Currently, this program does what I want it to and hides 4 buttons and only shows one in a constant loop. The problem that I am having is that the buttons on the screen are unable to be pressed and when I click on them it doesn’t even show that they are being clicked on visually.
Assigned to the buttons on their touch press event I have it so that they add 5 to a number box on the screen to represent score. They work fine when I get rid of the postinitalize event program on the page.
Does anyone know how to fix this problem to where the program will be able to read button presses while it’s in a constant loop on the page postinitalize event?
while(va0.val<10)
{
delay=1500
randset 0,5
va0.val=rand
if(va0.val==0)
{
vis b0,1
vis b1,0
vis b2,0
vis b3,0
vis b4,0
}
if(va0.val==1)
{
vis b0,0
vis b1,1
vis b2,0
vis b3,0
vis b4,0
}
if(va0.val==2)
{
vis b0,0
vis b1,0
vis b2,1
vis b3,0
vis b4,0
}
if(va0.val==3)
{
vis b0,0
vis b1,0
vis b2,0
vis b3,1
vis b4,0
}
if(va0.val==4)
{
vis b0,0
vis b1,0
vis b2,0
vis b3,0
vis b4,1
}
doevents
}