Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Candle on Wed 02/02/2005 22:11:09

Title: Character interactions codes link? [SOLVED]
Post by: Candle on Wed 02/02/2005 22:11:09
Could someone point me to the Character interactions codes .
Or what they are .
Title: Re: Character interactions codes link ?
Post by: strazer on Wed 02/02/2005 22:44:29
I don't know what you mean. What do you want to do?

Character functions are in the manual:
AGS v2.62: Text script functions -> Character functions
AGS v2.7: Scripting -> Character functions and properties
Title: Re: Character interactions codes link ?
Post by: Candle on Wed 02/02/2005 22:50:13
I wanted to see the codes so I can do one that I need if there are codes for what I need .
Or can you disable a show message ?
I have a char that gives an item when he is talked to  and I want to stop him for giving the item again if he is talked to again
Title: Re: Character interactions codes link ?
Post by: strazer on Wed 02/02/2005 23:11:33
I'm still not entirely sure what you mean, but here goes:

QuoteI have a char that gives an item when he is talked to  and I want to stop him for giving the item again if he is talked to again.

Interaction editor way:

Talk to character
  Conditional - If a variable is set to certain value: 28, 0
      Game - Display a message: "Here's your item."
      Player - Give the player an inventory item
      Game - Set variable value: 28, 1
      Stop running more commands
  Game - Display a message: "I have nothing more to say."

Script:


  // script for character: Talk to character

  if (GetGlobalInt(28) == 0) {
    DisplaySpeech(GUY, "Here's your item.");
    AddInventory(THE_ITEM_NUMBER);
    SetGlobalInt(28, 1);
  }
  else {
    DisplaySpeech(GUY, "I have nothing more to say.");
  }
Title: Re: Character interactions codes link ?
Post by: Candle on Wed 02/02/2005 23:37:21
Thank you so much . thats just what I wanted to do .
  // script for character: Talk to character

  if (GetGlobalInt(28) == 0) {
    DisplaySpeech(GUY, "Here's your item.");
    AddInventory(THE_ITEM_NUMBER);
    SetGlobalInt(28, 1);
  }
  else {
    DisplaySpeech(GUY, "I have nothing more to say.");
  }
I can use this more too. thank you /......
Title: Re: Character interactions codes link ?
Post by: strazer on Wed 02/02/2005 23:47:35
You're welcome. :)