I need some help. What I am trying to do is have a certain sound and phrase appear on screen only when I pick up the gold key on a certain level. Here is my code so far. The only problem is the sound and phrase appear when I pick up the gold key AND the silver key on this level. Again, I only want this stuff to happen when the gold key is picked up. Here is my code so far:
WL_AGENT.C
It was my understanding the bo_key1 is the gold key and bo_key 2 is the silver key. I have already tried swapping the bo_key1 for bo_key 2 and still the sound and message appears for both keys. Help me please!
WL_AGENT.C
- Code:
case bo_key1:
case bo_key2:
case bo_key3:
case bo_key4:
GiveKey (check->itemnumber - bo_key1);
SD_PlaySound (KEYPICKUPSND);
if(gamestate.mapon==13);//episode 2 level 4
GiveKey (check->itemnumber - bo_key1);
GiveExtraMan ();
SD_PlaySound (ACHIEVESND);
GetMessage("*FROM THE BELLY OF THE BEAST AWARD!*\nExtra Man Added!");
break;
It was my understanding the bo_key1 is the gold key and bo_key 2 is the silver key. I have already tried swapping the bo_key1 for bo_key 2 and still the sound and message appears for both keys. Help me please!