you could use:
_global.NPCfunction = _parent.function1;
to define _global.NPCfunction assuming _parent.function1 is already defined.
but it would be better to create an NPC class that would contain the functions and variables common to all NPC's. each particular NPC would inherit from that class and could also define additional variables and functions needed for that character and, if needed, override some (or all) NPC variables and methods.
thanks kglad. Will test it soon.
your second piece of advice is good, that's what I already have.
However I still need to reassign a function to global because these functions are unique from NPC's giving you an option, and none will be common to NPCs. also the function needs to be moved to global because my NPC brains are designed to turn off once they have delivered their various chapters of text / questions / options to the global.
I think your response will work perfectly for this so I will test it out soon.
1 person found this helpful
worked perfectly! Thanks