Page 1 of 1

Main menu bug

PostPosted: Fri Nov 04, 2011 3:00 pm
by SuperSonic
Hello guyz :D

Currently, I am working on the main menu to one of my projects(which I can hopefully finish). Now, there is this weird thing that happens when I try to select "options". It will go to the options screen but it will still let me control the main menu. It's really weird. If you could download the GED and tell me where I went wrong in my code, I will award you with a point :P

Thankz in advance,

Sonic

http://www.multiupload.com/3BM9MCZAVU

^Here is the link.

edit: use a, s, w, and d to move the cursor. and use k to select

Re: Main menu bug

PostPosted: Fri Nov 04, 2011 3:33 pm
by lcl
The problem is at: SureQuit - Draw Actor - Script editor:
Code: Select all
if(!transp)
{
    Menu = 3;
}
else
{
    Menu = 0;
}

It's setting Menu to 0, so when you move to options, Menu = 2 just for one frame before SureQuit makes it 0 again. :D
And anyway, don't use transp for making something invisible, use VisibilityState();. That's because transp leaves actor a little visible even when it's 1. :)

And btw, you can change this:
Code: Select all
if(animpos == 0)
{
    animpos = 1;
}
else
{
    animpos = 0;
}

To:
Code: Select all
animpos = (!animpos);

Because if animpos = 0, this will return 1 because animpos is not equal to one and when animpos = 1 it will return 0 because animpos is equal to 0 or with other words animpos is not equal to zero. :)

Re: Main menu bug

PostPosted: Fri Nov 04, 2011 3:40 pm
by SuperSonic
Great! It works :D

+1 as promised :wink:

Re: Main menu bug

PostPosted: Fri Nov 04, 2011 3:50 pm
by SuperSonic
Oh, and one more question. How do you like the menu sounds and gfx? :)

Re: Main menu bug

PostPosted: Fri Nov 04, 2011 8:42 pm
by lcl
SuperSonic wrote:Oh, and one more question. How do you like the menu sounds

Nice, made with SFXR? :D
SuperSonic wrote:and gfx? :)

It looks great so far. :)
Is the game going to be this little as well?

Good luck with the project anyway! :)

Re: Main menu bug

PostPosted: Fri Nov 04, 2011 8:58 pm
by SuperSonic
lcl wrote:Nice, made with SFXR?

Yep :D
lcl wrote:Is the game going to be this little as well?

It was going to be originally but now I think that the actual game will be bigger :P
lcl wrote:Good luck with the project anyway!

Thanks^^