Hi, I am making a little music program for 20 Liners (I haven't yet stacked much), and was trying to do it without help, but i just can't get it right. I want to use gosub or goto (goto is in my code) but it doesn't seem to react when i press the up/downkey in the test. Infact it goes straight to the first music without bothering to check if a key is being pressed(I added suspend for key but it didn't help). I have never attached so am just going to try
.
cls
print "Welcome to Music Beats: My first 20 liner and first program that i didn't use a tutorial!":print "To play City, press up. To play haunted, press down."
if upkey()=1 then goto city
if downkey()=1 then goto haunted
city:
make object cube 1,100
color object 1,rgb(100,0,100)
load music "bustling-city.mid",1
play music 1
do
for x=1 to 360
rotate object 1,x,x,0
next x
loop
haunted:
make object sphere 2,100
color object 2,rgb(255,0,0)
do:for x=1 to 360
rotate object 2,x,x,0:next x
loop
I think that worked. I also attached the code to the bottom button.
It needs media which is not included, so dont bother trying to test it without removing the music.
Last night I was looking up at the stars and said "Where the hell is my roof?!"