Jump to content

City Script Trouble (Not Working, but Compiling)


Recommended Posts

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 ObjectReference

string property myHold auto
ObjectReference Property WR_InteriorDestructionMarker Auto
ObjectReference Property WR_InteriorNotDestroyedMarker Auto
ObjectReference Property WR_HeimskrCampMarker Auto
ObjectReference Property WR_ExteriorDestructionMarker Auto
ObjectReference Property WR_ExteriorNotDestroyedMarker Auto
ObjectReference Property SO_DestructionMarker Auto
ObjectReference Property SO_NotDestroyedMarker Auto
ObjectReference Property WH_DestructionMarker Auto
ObjectReference Property WR_NotDestroyedMarker Auto

Event onInit()
goToState(myHold)
endEvent

state 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.")
endEvent
endState

state Solitude
ObjectReference akActionRef
SO_DestructionMarker.disable()
SO_NotDestroyedMarker.enable()
Debug.Notification("The repairs to Solitude have begun.")
endEvent
endState

state Windhelm
ObjectReference akActionRef
WH_DestructionMarker.disable()
WH_NotDestroyedMarker.enable()
Debug.Notification("The repairs to Windhelm have begun.")
endEvent
endState

Edited by Aithlyra
Link to comment
Share on other sites

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 by Rasikko
Link to comment
Share on other sites

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

string property myHold auto
ObjectReference Property WR_InteriorDestructionMarker Auto
ObjectReference Property WR_InteriorNotDestroyedMarker Auto
ObjectReference Property WR_HeimskrCampMarker Auto
ObjectReference Property WR_ExteriorDestructionMarker Auto
ObjectReference Property WR_ExteriorNotDestroyedMarker Auto
ObjectReference Property SO_DestructionMarker Auto
ObjectReference Property SO_NotDestroyedMarker Auto
ObjectReference Property WH_DestructionMarker Auto
ObjectReference Property WH_NotDestroyedMarker Auto

Event onInit()
goToState(myHold)
endEvent

state 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.")
endEvent
endState

state Solitude
Event OnActivate(ObjectReference akActionRef)
SO_DestructionMarker.disable()
SO_NotDestroyedMarker.enable()
Debug.Notification("Repairs have begun on Solitude.")
endEvent
endState

state Windhelm
Event OnActivate(ObjectReference akActionRef)
WH_DestructionMarker.disable()
WH_NotDestroyedMarker.enable()
Debug.Notification("Repairs have begun on Windhelm.")
endEvent
endState

 

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

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

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

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

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

  • Recently Browsing   0 members

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