Interactions doing nothing...? [SOLVED]

Started by Bandersnatch, Wed 10/09/2014 16:10:51

Previous topic - Next topic

Bandersnatch

Hi, I've converted a Hotspot to an object in one of my rooms but for some reason only one of the functions will work with AnyClick...I can look at it and the character will respond as per the scripting but if I try any of the other actions nothing happens at all. Any ideas why this might be? It works with the exact same scripting I have for a different object in the room.

Here's the code for the object:

Code: ags

function oCoffeePot_AnyClick()
{
  if (MovePlayer(239, 82)) {
    player.FaceDirection(eDir_Right);
}
// LOOK AT
    if(UsedAction(eGA_LookAt)) {
      QueuedSpeech.SkipCurrentMessage();
      cEleanor.Say("The coffee isn't ready yet.");
  if(tutorialState==1){
    cWhitfield.SayQueued("Good!");
    cWhitfield.SayQueued("Now go open the door on the left!");
    tutorialState = 2;
    SetTimer(1, 0);
    SetTimer(1, 400); //10 SECONDS
    }
    // USE
    else if(UsedAction(eGA_Use)) {
      player.Say("It isn't ready.");
    }
    // Push
    else if(UsedAction(eGA_Push)) {
      player.Say("Great idea. Burn my hands AND spill the coffee.");
    }
    // Pull
    else if(UsedAction(eGA_Pull)) {
    player.Say("Nah.");
    }  
    // PICKUP
    else if(UsedAction(eGA_PickUp)) {
      player.Say("Not until it's ready.");
    }
    // OPEN
    else if(UsedAction(eGA_Open)) {
      player.Say("It doesn't need opening.");
    }
    // CLOSE
    else if(UsedAction(eGA_Close)) {
    player.Say("It's already closed.");
    }
    //USE INV
    else if(UsedAction(eGA_UseInv)) {
      Unhandled();
    }
    // don't forget this
    else Unhandled();
  }

Bandersnatch

Never mind - there was a brace in the wrong place. Oops!

SMF spam blocked by CleanTalk