Jump to content

How to use a variable from a different script?


Recommended Posts

Hi. How do get a script to read a variable from a different script? Like example, say I have script1 and script2... I want script2 to be able to read a variable called cooldown from script1. But when I try it, it says "unknown command 'cooldown'!"

 

 

Let's say that script1 is attached to Quest1. To access it from script2, you need to use Quest1.cooldown. I know it works with scripts attached to quests since I've done that, and I've seen scripts from vanilla oblivion use variables from scripts attached to objects or NPCs. I don't think it works with magic scripts, but I don't know.

Link to comment
Share on other sites

Oh wait, you just want from another script, not from another script in another mod. So yeah, just what fg109 said.

 

Yep but that would've been my next question eventually! :D Thank you both, I got it working with the quest thing! (I'm soon about to release my mod based on Stealth Camouflage from Metal Gear Solid)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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