Jump to content

Multiple scripts on single reference - what does this do?


Saerileth

Recommended Posts

Just a quick question for curiosity's sake, and because I can't seem to find any information about this on the Wiki or anywhere else, really.

 

I noticed that you can add multiple scripts to references (or base objects) in the creation kit, not just one. What exactly does this do? Are all of them used? Do they supercede each other? If both scripts have an onActivate() method, which one is called, and in which order?

 

It'd be really helpful if someone could clear this up.

Link to comment
Share on other sites

Just a quick question for curiosity's sake, and because I can't seem to find any information about this on the Wiki or anywhere else, really.

 

I noticed that you can add multiple scripts to references (or base objects) in the creation kit, not just one. What exactly does this do? Are all of them used? Do they supercede each other? If both scripts have an onActivate() method, which one is called, and in which order?

 

It'd be really helpful if someone could clear this up.

 

Just adding to what Sjogga has already said, all events will fire in all the attached scripts so if you have two scripts that both have a onActivate() event both will fire and both will run independently.

 

so think of it this way

 

/ Script1.OnActivate()

/

Form

\

\Script2.OnActivate()

 

While both Scripts can see and work with the Form they don't see each other, generally speaking.

Edited by BotOwned
Link to comment
Share on other sites

  • Recently Browsing   0 members

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