Starsickle Posted February 29, 2012 Share Posted February 29, 2012 I'm trying to find a way to do two things: Trying to have some script activate a quest on location discovery or upon entering a cell. I'm also trying to figure out how to enable or disable statics as a quest progresses. Been looking around but nothing solid really has come up. Thanks! Link to comment Share on other sites More sharing options...
mgbeach Posted February 29, 2012 Share Posted February 29, 2012 Sorry I can't offer any specific help but you may want to look at existing cells like Sky Haven Temple which currently change along with quest stages to see how things are set up there. Link to comment Share on other sites More sharing options...
Starsickle Posted March 10, 2012 Author Share Posted March 10, 2012 Sorry, I've been looking at sky haven temple for examples of how to do this but I still am not sure. Does anyone know how to basically do this? Link to comment Share on other sites More sharing options...
fg109 Posted March 11, 2012 Share Posted March 11, 2012 You could try putting down a trigger zone at the door. When the player comes through, the trigger will activate, and you can script it to start up your quest. Link to comment Share on other sites More sharing options...
Starsickle Posted March 12, 2012 Author Share Posted March 12, 2012 (edited) Here's what I've been able to piece together so far: Player enters house, hits a volume box trigger - it runs a script that starts a quest, then disables itself so the player doesn't keep running into it again. For testing purposes, I just want it to disable a burned down house outside, and enable a complete one outside. Taking from the tutorial, the volume box will have something like: Scriptname Star_TEST_EnterStarter extends ObjectReference {This script is the trigger on enter script} Event OnTriggerEnter(ObjectReference akActionRef) if(akActionRef == Game.GetPlayer()) ; This condition ensures that only the player will trigger this code Debug.MessageBox("Yippee!") ; BURNEDBUILDING.Disable() ; Take away the burned building outside ; NEWBUILDING.Enable() ; fixed up building appears outside ; THISVOLUMETRIGGER.Disable() ; so the player doesn't keep running into it. ; SOMEQUEST START ; not sure about hte code for this. I just want to start a quest. endif EndEvent I'm just not sure what to do and where to put things. You can't just reference these objects, but I don't know how to declare them in this scripting language. I've played with it, but I don't know how to get these references and manipulate them yet. Edited March 12, 2012 by blast0r Link to comment Share on other sites More sharing options...
fg109 Posted March 12, 2012 Share Posted March 12, 2012 Unlike Oblivion, you can't just reference things by their editor/form/reference IDs. You have to declare properties in your script (they're basically the same as variables) which you then set outside of the script, in the property window. Your script should look like this: Scriptname Star_TEST_EnterStarter extends ObjectReference {This script is the trigger on enter script} ObjectReference property BurnedBuilding auto ObjectReference property NewBuilding auto Quest property SomeQuest auto Event OnTriggerEnter(ObjectReference akActionRef) if(akActionRef == Game.GetPlayer()) Debug.MessageBox("Yippee!") BurnedBuilding.Disable() NewBuilding.Enable() Self.Disable() ; instead of 'this' or 'GetSelf' like in Oblivion SomeQuest.Start() endif EndEvent After you've put this script on your object, and saved, compiled, and closed the script editing window, you should see your script listed with a "+" in front of it. You can double-click it, and that'll take you to the property window. Now you can set those properties we put in the script to whatever references they should be. Link to comment Share on other sites More sharing options...
Starsickle Posted March 16, 2012 Author Share Posted March 16, 2012 Unlike Oblivion, you can't just reference things by their editor/form/reference IDs. You have to declare properties in your script (they're basically the same as variables) which you then set outside of the script, in the property window. Your script should look like this: Scriptname Star_TEST_EnterStarter extends ObjectReference {This script is the trigger on enter script} ObjectReference property BurnedBuilding auto ObjectReference property NewBuilding auto Quest property SomeQuest auto Event OnTriggerEnter(ObjectReference akActionRef) if(akActionRef == Game.GetPlayer()) Debug.MessageBox("Yippee!") BurnedBuilding.Disable() NewBuilding.Enable() Self.Disable() ; instead of 'this' or 'GetSelf' like in Oblivion SomeQuest.Start() endif EndEvent After you've put this script on your object, and saved, compiled, and closed the script editing window, you should see your script listed with a "+" in front of it. You can double-click it, and that'll take you to the property window. Now you can set those properties we put in the script to whatever references they should be. Ah, thanks - I'll try that! Link to comment Share on other sites More sharing options...
Starsickle Posted March 16, 2012 Author Share Posted March 16, 2012 (edited) I noticed if you hit auto-fill it fills the properties, since I named them the same. It's working now. Thanks so much. The Northern Frost Brewery will probably be made public this weekend. :) Edited March 16, 2012 by blast0r Link to comment Share on other sites More sharing options...
Susurruss Posted March 17, 2012 Share Posted March 17, 2012 Why don't you do it with a change location event node? Link to comment Share on other sites More sharing options...
SinderionsBones Posted March 17, 2012 Share Posted March 17, 2012 Why don't you do it with a change location event node? I think it had something to do with in addition to entering a cell, discovering a location, which would require a trigger over the specific area around the location marker. The SM event would be a tad cleaner, but depends on the effect they're going for. Link to comment Share on other sites More sharing options...
Recommended Posts