Computer Science Canada

Summative project-DDR

Author:  little_secrets [ Thu Jun 12, 2008 8:24 am ]
Post subject:  Summative project-DDR

Hello, i am new to compsci and turing, so im pretty much a noob. I am, trying to make ddr for my summative project, but i am having problems with the arrows; they wont continue to come up until the song is over, which is like 3 min. They appear once and then it doesnt come back. i have tried many things to fix it, even removing the exit whens and putting if satements but it still doesnt work.

ps one arrow is in the next post because i met my limit.

Author:  little_secrets [ Thu Jun 12, 2008 8:24 am ]
Post subject:  Re: Summative project-DDR

this is the last arrow

Author:  nastynika [ Thu Jun 12, 2008 8:31 am ]
Post subject:  Re: Summative project-DDR

instead of posting each individual piece put it all in a .zip file and post it that way easier to access and as annoying

Author:  Insectoid [ Thu Jun 12, 2008 8:42 am ]
Post subject:  RE:Summative project-DDR

How are you playing the music? Are you just looping it or are you using a process? (or the process-free way I haven't learned yet)

Author:  little_secrets [ Thu Jun 12, 2008 9:02 am ]
Post subject:  RE:Summative project-DDR

thanks nastynik, ill do that next time, i know it is a bit distracting.

insectoid im playing the music in a loop.

Author:  Insectoid [ Thu Jun 12, 2008 10:00 am ]
Post subject:  RE:Summative project-DDR

That's why. While the music is looped, the program can't do anything else. What you should do is make it a process, as they (sort of) run simultaneouly with the rest of your program. Don't use them for anything else though.

code:

process playmusic
     loop
          Music.PlayFile ("songname.extension")
     end loop
end playmusic

fork playmusic   

Author:  little_secrets [ Thu Jun 12, 2008 3:26 pm ]
Post subject:  RE:Summative project-DDR

thanks, insectoid but I don't know if you noticed I don't have the music in my program; I have different parts of the game then I put them together, so that cant be the problem.

Author:  Tony [ Thu Jun 12, 2008 3:41 pm ]
Post subject:  Re: RE:Summative project-DDR

little_secrets @ Thu Jun 12, 2008 3:26 pm wrote:
I don't know if you noticed I don't have the music in my program

I have noticed that. It appears that the problem is not in the code that you've posted.

Author:  little_secrets [ Thu Jun 12, 2008 3:45 pm ]
Post subject:  Re: RE:Summative project-DDR

Tony @ Thu Jun 12, 2008 3:41 pm wrote:
little_secrets @ Thu Jun 12, 2008 3:26 pm wrote:
I don't know if you noticed I don't have the music in my program

I have noticed that. It appears that the problem is not in the code that you've posted.

then what is the problem

Author:  Tony [ Thu Jun 12, 2008 3:49 pm ]
Post subject:  Re: RE:Summative project-DDR

little_secrets @ Thu Jun 12, 2008 3:45 pm wrote:
then what is the problem


little_secrets @ Thu Jun 12, 2008 3:26 pm wrote:
I have different parts of the game then I put them together

Author:  little_secrets [ Thu Jun 12, 2008 3:52 pm ]
Post subject:  RE:Summative project-DDR

oh ok, but i havent put them together yet, there is a problem with this game part, and the different parts i have are just the main menu, the music, the actual game and the exit.

Author:  Tony [ Thu Jun 12, 2008 4:03 pm ]
Post subject:  Re: RE:Summative project-DDR

You are making very little sense.
little_secrets @ Thu Jun 12, 2008 3:52 pm wrote:
there is a problem with this game part

little_secrets @ Thu Jun 12, 2008 8:24 am wrote:
the arrows; they wont continue to come up until the song is over

But you don't even have a song in "this game part".

Author:  little_secrets [ Thu Jun 12, 2008 4:16 pm ]
Post subject:  RE:Summative project-DDR

sorry i guess it was a typo, i meant they wont continue, the song is like 3 min but they only come up once.


i know its really confusing i never realized the typo until you mentioned it, thanks

Author:  Tony [ Thu Jun 12, 2008 4:36 pm ]
Post subject:  RE:Summative project-DDR

Oh, I see what is going on. You are using the same y variable for every procedure, and you are not even resetting the value. So once the first arrow reaches the top, the second one starts off at the top of the screen and disappears after a single frame.

Author:  little_secrets [ Thu Jun 12, 2008 4:38 pm ]
Post subject:  RE:Summative project-DDR

oh ok thanks so much, that helps alot, i know im a noob and i shouldnt have chosen this game for my summative but how do you restart a variable

Author:  Insectoid [ Thu Jun 12, 2008 5:44 pm ]
Post subject:  RE:Summative project-DDR

varible := startingvalue

Author:  vapour99 [ Thu Jun 12, 2008 7:28 pm ]
Post subject:  RE:Summative project-DDR

y := *

replace * with your y value for the top of the screen


throw that in before you make another arrow

Author:  riveryu [ Thu Jun 12, 2008 8:36 pm ]
Post subject:  RE:Summative project-DDR

restart a variable? do you mean resetting it as if you declared a new one? You assign it a default value, usually 0 or for string "". The goal is to overwrite the previous value. Oops didnt check second page..... Sry Laughing

Author:  little_secrets [ Thu Jun 12, 2008 8:40 pm ]
Post subject:  RE:Summative project-DDR

oh its ok, i am basically to overwrite the previous value.

Author:  nastynika [ Fri Jun 13, 2008 8:15 am ]
Post subject:  Re: Summative project-DDR

precisely and if u need any more help just ask


: