I know this sounds too stupid, but it's not working out for me.
I am making an turn-based strategy game where I select weapons and click 'Go' each turn to attack my enemy.
My main program is just full of 'gosub's for each step I perform (such as initialize_map, initialize_buildings etc)
Now when I come to the 'input_plr' subroutine, I need the player to click on a weapon of choice and then click 'Go'. Unless he does both of these, the program should not proceed.
I tried placing this subroutine in a while-do and repeat-until loop, but then I get nothing displayed on my screen even if I use sync in that loop.
Any help here?
I could post my whole program here if needed (as this is only for practice purpose) but you dont want to be going through a 500 line program for this I guess.
Thank you for your help!
-filya
edit: ok, here is the design of my program
rem code for initializing stuff goes here
rem MAIN LOOP
do
gosub initialize_terrain
gosub initialize_players
gosub choose_weapon
gosub attack_result
sync
loop
rem SUBROUTINES
initialize_terrain:
rem prepares terrain and textures etc
return
initialize_players:
rem prepares player and enemy buildings etc
return
choose_weapon:
rem player needs to choose a weapon and then click GO to attack
rem code for weapon buttons and GO button goes here
if mouseX()>350 and mouseX()<450 and mouseY()>500 and mouseY()<530 and mouseclick()
if plr5choice=0
set cursor 250,100:print "Please choose what you want to do this turn"
else
weaponselected=1
endif
endif
return
attack_result:
rem calculate what happens in that round
return
-- game dev is fun...but taking up too much time --