what dose the GetGlobalInt do in this code

Started by Dred Rubacant, Sun 26/11/2006 01:35:22

Previous topic - Next topic

Dred Rubacant

if ( ( GetGlobalInt(54) == 0) && ( GetGlobalInt(58) == 1) ) {
  if (UsedAction(A_LOOK_AT)) {
    if(MovePlayer(270, 96)) {
      FaceDirection(GetPlayerCharacter(), DIR_UP);
      Display("Light Switch.");
    }
    else Unhandled();
}
else if (UsedAction(A_USE)) {
    if(MovePlayer(270, 96)) {
      FaceDirection(GetPlayerCharacter(), DIR_UP);
      PlaySound(66);
     // ObjectOff(1);
      SetFlashlightDarkness (GetFlashlightMaxLightLevel ()); 
     SetFlashlightBrightness (GetFlashlightDarkness ());     
      //LoseInventory(2);
      //AddInventory(1);
     

SetGlobalInt(54, 1);
      SetGlobalInt(58, 0);
   



    }
    else Unhandled(); 
   }
   else Unhandled();   


do i really need the GetGlobalInt
Some say i need panels! and Some say i dont Need them.   WHERES THE DRUGS I'm going CRAZY. Plus I must have been on Drugs and a Maniac if i was going to name the game Maniacs Mansion.

What was i thinking!!!!!

Ishmael

Yes.

Unless they're just used in that one place, you can define a couple of local boolean or integer variables. See the manual.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Dred Rubacant

Some say i need panels! and Some say i dont Need them.   WHERES THE DRUGS I'm going CRAZY. Plus I must have been on Drugs and a Maniac if i was going to name the game Maniacs Mansion.

What was i thinking!!!!!

SMF spam blocked by CleanTalk