Aithlyra Posted April 1, 2018 Share Posted April 1, 2018 (edited) Hello! I have been trying to get a script working to provide a way to fix the damages caused by the civil war.However it seems to not be working for me. The script compiles just fine and the notification displays but nothing happens to the places that I supposed to be being repaired.If anyone might be able to spot what is wrong I would really appreciate it!scriptname TownFixingTomes extends ObjectReferencestring property myHold autoObjectReference Property WR_InteriorDestructionMarker AutoObjectReference Property WR_InteriorNotDestroyedMarker AutoObjectReference Property WR_HeimskrCampMarker AutoObjectReference Property WR_ExteriorDestructionMarker AutoObjectReference Property WR_ExteriorNotDestroyedMarker AutoObjectReference Property SO_DestructionMarker AutoObjectReference Property SO_NotDestroyedMarker AutoObjectReference Property WH_DestructionMarker AutoObjectReference Property WR_NotDestroyedMarker AutoEvent onInit() goToState(myHold)endEventstate Whiterun ObjectReference akActionRef WR_InteriorDestructionMarker.disable() WR_InteriorNotDestroyedMarker.enable() WR_HeimskrCampMarker.disable() WR_ExteriorDestructionMarker.disable() WR_ExteriorNotDestroyedMarker.enable() Debug.Notification("The repairs to Whiterun have begun.") endEventendStatestate Solitude ObjectReference akActionRef SO_DestructionMarker.disable() SO_NotDestroyedMarker.enable() Debug.Notification("The repairs to Solitude have begun.") endEventendStatestate Windhelm ObjectReference akActionRef WH_DestructionMarker.disable() WH_NotDestroyedMarker.enable() Debug.Notification("The repairs to Windhelm have begun.") endEventendState Edited April 1, 2018 by Aithlyra Link to comment Share on other sites More sharing options...
Evangela Posted April 2, 2018 Share Posted April 2, 2018 (edited) Since this was posted yesterday on April Fools, and there is no way that compiled, gotta say, nice try :tongue:. Now if that WASN'T a joke, then I wonder why the compiler would let such obvious syntax errors slip on through. In anycase you're wanting to use OnActivate. Using only the parameter portion of that wont do anything. Edited April 2, 2018 by Rasikko Link to comment Share on other sites More sharing options...
Aithlyra Posted April 2, 2018 Author Share Posted April 2, 2018 It was not a joke, and it was compiling for me? It is the second of April here...Perhaps something happened when I tried copying it to here?I know I could not get it to display as neatly as I would like in the forum post. I will try seeing about switching to OnActivate then. Thank you. Link to comment Share on other sites More sharing options...
Evangela Posted April 2, 2018 Share Posted April 2, 2018 (edited) Yeah I think pasting might have ate portions of the script. The compiler will error whenever there is an endEvent without the opening Event. Edited April 2, 2018 by Rasikko Link to comment Share on other sites More sharing options...
Aithlyra Posted April 3, 2018 Author Share Posted April 3, 2018 string property myHold autoObjectReference Property WR_InteriorDestructionMarker AutoObjectReference Property WR_InteriorNotDestroyedMarker AutoObjectReference Property WR_HeimskrCampMarker AutoObjectReference Property WR_ExteriorDestructionMarker AutoObjectReference Property WR_ExteriorNotDestroyedMarker AutoObjectReference Property SO_DestructionMarker AutoObjectReference Property SO_NotDestroyedMarker AutoObjectReference Property WH_DestructionMarker AutoObjectReference Property WH_NotDestroyedMarker AutoEvent onInit() goToState(myHold)endEventstate Whiterun Event OnActivate(ObjectReference akActionRef) WR_InteriorDestructionMarker.disable() WR_InteriorNotDestroyedMarker.enable() WR_HeimskrCampMarker.disable() WR_ExteriorDestructionMarker.disable() WR_ExteriorNotDestroyedMarker.enable()Debug.Notification("Repairs have begun on Whiterun.") endEventendStatestate Solitude Event OnActivate(ObjectReference akActionRef) SO_DestructionMarker.disable() SO_NotDestroyedMarker.enable()Debug.Notification("Repairs have begun on Solitude.") endEventendStatestate Windhelm Event OnActivate(ObjectReference akActionRef) WH_DestructionMarker.disable() WH_NotDestroyedMarker.enable()Debug.Notification("Repairs have begun on Windhelm.") endEventendState This is the script taken straight from my creation kit rather than from the source copy I had kept.I was going to add in the OnActivate but it seems it is already there? Link to comment Share on other sites More sharing options...
fore Posted April 3, 2018 Share Posted April 3, 2018 A stupid question, maybe. But that's always to be asked first since you didn't mention: have you filled the properties? Link to comment Share on other sites More sharing options...
Aithlyra Posted April 3, 2018 Author Share Posted April 3, 2018 I have indeed yes, although the only way I was able to locate the correct references was to fill the properties out using TESedit so perhaps that has caused problems?I am not very good at this sort of thing at all as I am sure you can tell, sorry! Link to comment Share on other sites More sharing options...
ben446 Posted April 3, 2018 Share Posted April 3, 2018 Aithlyra I don't know for sure as my scripting knowledge only goes to reading a script, but if you set the properties through TESedit and your having the problems, id try setting the properties through the scripts section. I know it might sound easier than it is, but if its compiling and the only thing you've done slightly different to what youd normally do is set the properties through TESedit it maybe worth perservering and trying to hit atleast one of the properties and testing it, If the script works on the one property then you know that's the issue Link to comment Share on other sites More sharing options...
Aithlyra Posted April 3, 2018 Author Share Posted April 3, 2018 I will keep trying to do so, it is just that I only know the reference numbers for what I am trying to have the script affect and I am having a little trouble finding them in the CK.I will keep trying though, thank you! Link to comment Share on other sites More sharing options...
Aithlyra Posted April 3, 2018 Author Share Posted April 3, 2018 Oh! Thank you so so much! I was not able to find the properties but just opening up that menu and then saving things again in the creation kit seems to have everything working again!Thank you so much! All my cities can now be fixed, thank you! Link to comment Share on other sites More sharing options...
Recommended Posts