Jump to content

Referencing a Custom Function from a Fragment


c0c0c0

Recommended Posts

I have a custom function library in a script called "myModCustom". It is attached to quest "myModQuest". Let's say it contains a function called "setGlobals()" that may or may not take parameters, but it returns nothing. It just does it stuff and we're done.

In a terminal object, I have a selection option I would like to fire "setGlobals". How do I reference the myModCustom script in the terminal fragment to use its functions?

Edited by c0c0c0
Link to comment
Share on other sites

Never seen a (working) non fragment function script attached to a scene.

 

If the script is actually attached to the quest, then create a property to your quest myModQuest and in the script fragment;

 

(myModQuest as myModCustom).setGlobals()

Link to comment
Share on other sites

Never seen a (working) non fragment function script attached to a scene.

You caught my miss-statement before I could edit it away.

 

Anyway, that worked. I've been banging my head against this for a couple of hours and you explained it faster than I could edit my post. Thanks!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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