Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Creating custom script objects


libertasmens
 Share

Recommended Posts

I have not looked at this yet. The beth tutorials may have something on it.

I've been tooling around with more "conventional" programming, sort of OOP style stuff. Not sure how vast your knowledge is on Papyrus, seeing as it's relatively new, but I figured I'd report some of what I've found in case you don't. :)

(This is on the wiki, but just FYI) Extending a script works as follows: ScriptChild extends ScriptParent. This allows ScriptChild to access ScriptParent's functions/events. You can also override parent functions/events from the child, and you can still call the parent by using the class prefix parent.function()

Now the newer stuff, without using extend (such as with a new Utility). Using the Global flag you can have a standalone function/event which doesn't get called on an object. This is used with the scripts like Utility and Debug.

To call those functions, you just use import followed by the script name, which you're most likely aware of, or you can simply call NewScript.function()

The part that I haven't figured yet is how to get a hold of forms from within global standalone scripts.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...