This doesn't make any sense, mouseover glitch? FIXED

Non-platform specific questions.

This doesn't make any sense, mouseover glitch? FIXED

Postby Hblade » Sat Apr 10, 2010 2:18 pm

I fixed this using this code:
Code: Select all
switch(cloneindex)
{
    case 0:
    if (Chao_options.index == 1)
    {
        PlaySound2("data/Cursor.wav", 1.000000, 1, 0.000000);
        Chao_options.index = cloneindex;
    }
    break;
    case 1:
    if (Chao_options.index == 0)
    {
        PlaySound2("data/Cursor.wav", 1.000000, 1, 0.000000);
        Chao_options.index = cloneindex;
    }
    break;
}

THE OLD GLITCH:

Dude I've ran into something that really doesn't make sense...
ON MOUSEOVER:
Code: Select all
Chao_options.index = cloneindex;
switch(cloneindex)
{
    case 0:
    if (Chao_options.index == 1)
    {
        PlaySound2("data/Cursor.wav", 1.000000, 1, 0.000000);
    }
    break;
    case 1:
    if (Chao_options.index == 0)
    {
        PlaySound2("data/Cursor.wav", 1.000000, 1, 0.000000);
    }
    break;
}

Shouldn't that mean if the Chao_options' index is 0, it wont play the sound but if it's not on that selection it plays the sound?

I'm trying to make it NOT repeat the sound effect when hovered over and over again on the same selection
but NOOO, for some reason it doesn't play the sound at all, but yet if I do this:
Code: Select all
switch(cloneindex)
{
    case 0:
    if (Chao_options.index == 0)
    {
        PlaySound2("data/Cursor.wav", 1.000000, 1, 0.000000);
    }
    break;
    case 1:
    if (Chao_options.index == 1)
    {
        PlaySound2("data/Cursor.wav", 1.000000, 1, 0.000000);
    }
    break;
}

if plays the sound effect but it repeats... DOESNT MAKE ANY SENSE
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron