creating game options through character interaction

Started by fintonius, Fri 15/05/2009 12:58:21

Previous topic - Next topic

fintonius

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.

Khris

You can use standard script code directly in the dialog scripts, just remember to start the line with a blank space.

fintonius

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

Matti

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;

Khris

Dude, there's a manual included with AGS where all the commands are explained :)

Hope that wasn't too rtfm-y ;)

fintonius

thanks mr matti, worked perfectly!

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

thanks for all the help

Trent R

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
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

SMF spam blocked by CleanTalk