My problems with this are two-fold and I believe they are sync related, although I am not positive.
First my animated sprite won't animate.
Second only parts of my text show up on the screen for more than a flash. I am combining the text and animated sprites with a 3d environment. For some reason putting certain segments of text in a function make it not appear, but it can work properly in a subroutine.
This example only allows the menu text to appear even in a subroutine, the additional text just vanishes. Also the animated sprite won't animate.
fountain:
create animated sprite 1,"media/bmp/fountain.bmp",11,1,1
sprite 1,255,300,1
play sprite 1,1,11,100
menu$(1)="Drink from fountain":menu$(2)="ignore":choice = 0: selections = 2: menuchoice = 1
while choice = 0
oldc = newc
newc = upkey()
if newc > oldc
dec menuchoice
endif
oc = nc
nc = downkey()
if nc > oc
inc menuchoice
endif
if menuchoice > selections then menuchoice = 1
if menuchoice < 1 then menuchoice = selections
menu(menuchoice, selections)
pause(10000)
if inkey$() = chr$(13)
choice = menuchoice
ENDIF
sync
endwhile
if choice = 1
charstatus(2)=100 // all fountains satisfy thirst
if charloc(1)=1 then charstatus(19)=0 // level 1 fountain cures poison
if charloc(1)=3 then charstatus(18)=0 // level 3 fountain cures disease
center text screen width()/2,250,"You feel refreshed!"
anykey()
sync
ENDIF
delete sprite 1
return
Am I doing something terribly wrong or what?
"So it goes."