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
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?

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:
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?