Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: pascalbg on Mon 17/11/2008 00:17:51

Title: How to talk again to the same character but with him saying something different?
Post by: pascalbg on Mon 17/11/2008 00:17:51
It's been about two hours that I'm trying to do that and I still can't. I tried with the variables but there's always problems and it seems to don't work for that.

In my little game, you speak to someone, he tells like the basic goal of the game and then if you talk to him again, he'd just say something different. But I can't do that.

Please, help me.

Thanks.
Title: Re: How to talk again to the same character but with him saying something different?
Post by: Khris on Mon 17/11/2008 01:18:42
There's the handy DoOnceOnly function:

  if (Game.DoOnceOnly("learn goal")) {
    cGuy.Say("You need to do this and that.");
    cGuy.Say("Then go there.");
  }
  else {
    cGuy.Say("Something different.");
  }
Title: Re: How to talk again to the same character but with him saying something different?
Post by: pascalbg on Mon 17/11/2008 01:28:22
Thank you, that was very useful!  ;)

Also, because I don't want to post another thread, I have another little question :

I want to use an object on a hotspot. There's the "Use inventory on hotspot" command but I don't know how it works; how to select a specific object to use.
Title: Re: How to talk again to the same character but with him saying something different?
Post by: Khris on Mon 17/11/2008 02:16:20
Check player.ActiveInventory.
Title: Re: How to talk again to the same character but with him saying something different?
Post by: pascalbg on Mon 17/11/2008 02:46:03
Thanks!