GomuGomu64 Posted June 15, 2012 Share Posted June 15, 2012 (edited) Just a quickie. I've got one boolean in a script that spawns an NPC. I've attached a script to that NPC so that when they die, that variable gets changed. But, I don't know how to change that boolean with the script on the NPC; the two scripts are different from each other, and on seperate things (The one with the variable I want to change is on an XMarker, the script that'll do the change is on the NPC). How would I do this? <strike>Edit: Figured it out.</strike> Scriptname YourScriptNameHere extends ScriptWithStuffInItYouWantToEditHere <br><br>2nd Edit : No, I didn't figure it out.<br><br>Anybody mind telling me? :P<br> Edited June 15, 2012 by GomuGomu64 Link to comment Share on other sites More sharing options...
fg109 Posted June 19, 2012 Share Posted June 19, 2012 The code where you thought you figured it out, that's what you do if you want "YourScriptNameHere" to have access to all the functions in "ScriptWithStuffInItYouWantToEditHere". But no, that's not what you want to do; similar, but not it. First of all, you need to have "ScriptWithStuffInItYouWantToEditHere" to actually be put on something (a quest, activator, perk, anything) or else you won't be able to reference it anywhere. Then in "YourScriptNameHere", you add the line: ScriptWithStuffInItYouWantToEditHere Property TheThingThatHasThatScriptOnIt AutoThen if for example you want to access SomeProperty in "ScriptWithStuffInItYouWantToEditHere", you use TheThingThatHasThatScriptOnIt.SomeProperty Link to comment Share on other sites More sharing options...
David Brasher Posted June 20, 2012 Share Posted June 20, 2012 Skyrim scripting stinks and is no good for variables. When you can't get one script to see the variable in another script, just give up and create a new global variable which both scripts can easily see. Link to comment Share on other sites More sharing options...
Recommended Posts