Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: fintonius on Fri 15/05/2009 12:58:21

Title: creating game options through character interaction
Post by: fintonius on Fri 15/05/2009 12:58:21
i need to know how to offer the gameplayer multiple options based on conversation interaction between characters. for example, if the main character meets another character, talks to him and is offered several responses to choose from;

1. "I can give you this key"
2. "I can give you directions"
3. "I can give you a kick in the balls"

so for 1, how does the character put the key into the main character's inventory, for 2, how can i code this option to reveal a previously hidden room exit if chosen, and, for 3, well, that's pretty much just going to end the conversation right there!

sorry if i'm asking already answered questions, it's just that i'm making a simple game for a college project and time is against me! any help will be greatly appreciated, thank you.
Title: Re: creating game options through character interaction
Post by: Khris on Fri 15/05/2009 13:50:56
You can use standard script code directly in the dialog scripts, just remember to start the line with a blank space.
Title: Re: creating game options through character interaction
Post by: fintonius on Fri 15/05/2009 14:52:11
thanks. still don't know what the code would be for giving the character the item or "revealing" a hotspot/edge etc. very much a noob at this
Title: Re: creating game options through character interaction
Post by: Matti on Fri 15/05/2009 15:00:22
Quote from: fintonius on Fri 15/05/2009 14:52:11
thanks. still don't know what the code would be for giving the character the item or "revealing" a hotspot/edge etc. very much a noob at this

cEgo.AddInventory(iKey);

hWhatever.Enabled = true;
Title: Re: creating game options through character interaction
Post by: Khris on Fri 15/05/2009 15:59:42
Dude, there's a manual included with AGS where all the commands are explained :)

Hope that wasn't too rtfm-y ;)
Title: Re: creating game options through character interaction
Post by: fintonius on Fri 15/05/2009 16:14:56
thanks mr matti, worked perfectly!

yes Khris, i know. just last minute panicking :)

thanks for all the help
Title: Re: creating game options through character interaction
Post by: Trent R on Fri 15/05/2009 17:37:23
For the hotspot, you'll have to use  hotspot[HOTSPOT_ID] instead of its scriptname, since you can only use those in a room script and you're in a dialog script (unless you used CallRoomScript or such, but that's not worth it)


~Trent