Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Gabarts

#141
Hello again, as you can see I've changed my account :)

I have completed my first room and all is working fine but 2 objects...

I've checked again and again what is wrong but unfortunately they are not working like I want. Code seems right because AGS doesn't give me errors but maybe there is some link problem that I cannot find. Basically I'm using 2 objects visibility to show a closed and an opened wardrobe (with GUI interact for both). Here the code:

Code: AGS
function casaperto_AnyClick()
{
    if (MovePlayer(340, 117)) {
     player.FaceDirection(eDir_Up);
  
  // LOOK AT
    if(UsedAction(eGA_LookAt)) {
      player.Say("Ora il cassetto è aperto.");
      Wait(5);
      player.Say("Phuaa!... che puzza!");
    }
  }
    // USE
    else if(UsedAction(eGA_Use)) {
      Unhandled();
    }
    // OPEN
    else if(UsedAction(eGA_Open)) {
      Unhandled();
    } 
      // CLOSE
    else if(UsedAction(eGA_Close)) {
      oCasaperto.Visible = false;
      oCaschiuso.Visible = true;
    }
    // Push
    else if(UsedAction(eGA_Push)) {
      Unhandled();
    }
    // Pull
    else if(UsedAction(eGA_Pull)) {
      Unhandled();
    }  
    // PICKUP
    else if(UsedAction(eGA_PickUp)) {
      Unhandled();
    }
    //USE INV
    else if(UsedAction(eGA_UseInv)) {
      Unhandled();
    }
    // don't forget this
    else Unhandled();
}
     
function caschiuso_AnyClick() {

    if (MovePlayer(340, 117)) {
     player.FaceDirection(eDir_Up);
  
  // LOOK AT
    if(UsedAction(eGA_LookAt)) {
      player.Say("E' il cassetto della biancheria di mio padre.");
      }
    }
    // USE
    else if(UsedAction(eGA_Use)) {
      Unhandled();
    }
    // OPEN
    else if(UsedAction(eGA_Open)) {
     oCaschiuso.Visible = false;
     oCasaperto.Visible = true;
    } 
      // CLOSE
    else if(UsedAction(eGA_Close)) {
      player.Say("E' già chiuso.");
    }
    // Push
    else if(UsedAction(eGA_Push)) {
      Unhandled();
    }
    // Pull
    else if(UsedAction(eGA_Pull)) {
      player.Say("Si apre normalmente, non c'è bisogno di tirarlo.");
    }  
    // PICKUP
    else if(UsedAction(eGA_PickUp)) {
      Unhandled();
    }
    //USE INV
    else if(UsedAction(eGA_UseInv)) {
      Unhandled();
    }
    // don't forget this
    else Unhandled();
}


The result is that the only action with GUI that is working is OPEN but doesn't switch to the other object. I've first tried with 1 hotspot and 1 object and the switch was working, but not the GUI. Where I am wrong?
#142
Thanks for appreciate my web page, but unfortunately I'm sorry to reveal you that the project is really buried. I'm now making an Indiana Jones fan game and I've found challenging and pretty easier to make (maybe because AGS is now very updated and you can find lot of help here).

OH :), btw, I've changed my username account as you can see...

SMF spam blocked by CleanTalk