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.
You can use standard script code directly in the dialog scripts, just remember to start the line with a blank space.
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
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;
Dude, there's a manual included with AGS where all the commands are explained :)
Hope that wasn't too rtfm-y ;)
thanks mr matti, worked perfectly!
yes Khris, i know. just last minute panicking :)
thanks for all the help
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