Server Totals
Deglos - (1)
Wilderness - (1)
Le'Or - (0)
Ferrell - (0)
Elysia - (0)
M'Chek - (0)
Mikona - (0)
Visimontium - (0)
Underdark - (0)
Total players: 2
Gallery

Links Menu

conversations and taken actions

Moderators: Nighthawk4, Dungeon Masters

conversations and taken actions

PostAuthor: slave_of_emotions » Thu Oct 27, 2005 10:42 am

I want to make a item with a conversation addet to it that after selecting a option from it starts a action.

For Example:

NPC: What do you want to do ?
PC;
option 1: jump me to point A
option 2: jump me to point B
...etc...

Now... is there other way to do this then adding to each option a own script ?
I would like to make one script for all options that checks inside what option was selected and starts a action acording to it.
User avatar
slave_of_emotions
Scholar of Fools
 
Posts: 472
Joined: Sun Sep 05, 2004 10:04 pm
Location: The European Union(Germany)

PostAuthor: Jonezie » Thu Oct 27, 2005 11:27 am

'fraid not. It's one of the more frustrating aspects of the NWN engine. The only real alternative is to have each option set a local variable, and then check this variable to determine the action at the end of the convo. This does nothing to cut down on script numbers, however.
User avatar
Jonezie
Team Member; Retired with Honors
 
Posts: 3906
Joined: Wed Jun 09, 2004 7:05 am
Location: Melbourne (GMT +10)

PostAuthor: slave_of_emotions » Thu Oct 27, 2005 12:40 pm

Do you perhaps know out of experiance, with of those two ways is more ressources friendly ?
User avatar
slave_of_emotions
Scholar of Fools
 
Posts: 472
Joined: Sun Sep 05, 2004 10:04 pm
Location: The European Union(Germany)

PostAuthor: Jonezie » Thu Oct 27, 2005 10:56 pm

slave_of_emotions wrote:Do you perhaps know out of experiance, with of those two ways is more ressources friendly ?

THey should be pretty much the same - it's the same code running, after all, just a slightly different method for running it. If it's something simple, I'd just go with a seperate script for each, because it'll be one script less to write. For something more complicated, I'd ue the variable approach, because if it has a bug, or needs changing, its a lot easier to modify a single big script than a bunch of little scripts.

Hope that helps
User avatar
Jonezie
Team Member; Retired with Honors
 
Posts: 3906
Joined: Wed Jun 09, 2004 7:05 am
Location: Melbourne (GMT +10)


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot]