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

Topics - rickious

#21
How do I display message when you click to walk in an area that in inaccessible?
#22
Im sure the answer is online for this but after a day and a half of trying to word it right on here, the help file, and Google I give up and will ask the experts (you) :-D

So, the character talks to a hotspot for a one off event.  Basically asking someone to open a door. Then I want the player to be able to interact with the door to exit the room.
Code: ags

function hHotspot2_Talk()

{
  if (Game.DoOnceOnly("Talk to door1"))
  {
    cEgo.Say("Can you open this door for me... Please.");
    Wait(30)
    adoor3.Play();
  }
   Display("The door now unlocked");
}


So, you talk to the door. Character says "can you open this door for me... Please".  Then sound 'adoor3' (sound of door unlocking) plays after a short pause for the on screen dialogue.  The final 'Display' is simply so there is still a reaction if you try to talk to the door again (as the game crashed if I tried talking to the hotspot again so I added this until I figure that out.).

QUESTION 1 How do I now make the door hotspot 'Interact' enabled as a result of the above.

QUESTION 2 How do I make a new reaction to the player talking to this hotspot which will only run all future times and NOT this time.  At the moment with my basic code, the final 'Display("The door now unlocked");' runs at the end of the initial 'talk' and all future ones. So I want a separate initial reaction and all future reactions.

QUESTION 3 How can I close the 'talk' option at the end of this 'DoOnceOnly' event so nothing happens (for future reference.)

Thanks in advance as Im sure this is easy enough for seasoned scripters to answer.
SMF spam blocked by CleanTalk