Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: on Fri 12/12/2003 01:00:48

Title: It may sound silly, but a big deal 4 me...
Post by: on Fri 12/12/2003 01:00:48
Hey there....I started using AGS a week ago and fortunately I understood all the topics in the tutorial and managed to use the program....but there's something that seems to be impossible for me....
  I want to give something to a character in order to make him give me another object, so...how do I do that??? Please help me. Thanks bye,
JAVIER.
Title: Re:It may sound silly, but a big deal 4 me...
Post by: Scummbuddy on Fri 12/12/2003 01:38:36
LoseInventory?
and try and make subject titles that have to do with your problem
Title: Re:It may sound silly, but a big deal 4 me...
Post by: Scorpiorus on Fri 12/12/2003 15:00:29
QuoteI want to give something to a character in order to make him give me another object, so...how do I do that???
Under the character use inventory on character interaction:

int active_item = character[GetPlayerCharacter()].activeinv;

if (active_item == _SOME_INVENTORY_YOU_HAVE_TO_HAVE) {
SetActiveInventory(-1);
LoseInventory(active_item);
AddInventory(_NEW_ITEM);

}

~Cheers