Jump to content

Scripts as a 'shared resource'?


ripple

Recommended Posts

I was looking at the script that handles the 'Gift of Charity.' There are two dialogue responses from NPC beggars when the player gives them a gold coin. Each of the responses are attached to a different script, but the codes are identical. So basically, the developers duplicated one script and assigned different script names to each, one for each responses. It seems this is the only way to embed scripted effects with NPC dialogues, but it also seems rather....'inefficient.'

 

Let's say I want to do something similar, but instead of two dialogue responses with the exact same scripted effects, I want to do six different dialogue responses. Does that mean I have duplicate six different scripts that do exactly the same thing? That sort of...'bloat' just seems unnecessary and I was wondering if there is a more 'streamlined' method of handling this by having one script file as a 'shared resource' that can be embedded with multiple dialogue responses.

Edited by ripple
Link to comment
Share on other sites

Yes, ok, that makes more sense (but I still don't understand why Bethesda developers didn't handle the beggar script that way).

 

I have another question: What is the best way to handle a set of 'generic' dialogues used by multiple NPCs that is intended to be enabled only between certain times of the day?

 

I've tried just using getcurrenttime as the quest condition for the dialogue, something like

 

>= 2.00 AND

<= 10.00

 

But it just won't work. In fact, the entire dialogue does not appear at all no matter what time of the day it is.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...