Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

I think this is a longshot, but I've thought that about other things that turned out to be quite trivial.

 

Is there a way to send script1 with an unknown name to script2?

 

I have a variable number of quests with their own unique scripts set up to extend a common parent script. The child scripts 'push' their attached quest objects to activators. When an activator is activated, I'd like it to call a function in the same quest's script. But at this point the activator doesn't know the name of the script.

 

(The second-best choice, I believe, would be to set up modevents with arguments identifying the quest that should listen to them. Pushing the script objects would be more precise and less work for me, so I'd prefer to do that, if at all possible :smile:.)

Link to comment
Share on other sites

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

I think this is a longshot, but I've thought that about other things that turned out to be quite trivial.

 

Is there a way to send script1 with an unknown name to script2?

 

I have a variable number of quests with their own unique scripts set up to extend a common parent script. The child scripts 'push' their attached quest objects to activators. When an activator is activated, I'd like it to call a function in the same quest's script. But at this point the activator doesn't know the name of the script.

 

(The second-best choice, I believe, would be to set up modevents with arguments identifying the quest that should listen to them. Pushing the script objects would be more precise and less work for me, so I'd prefer to do that, if at all possible :smile:.)

You must at least have the name of the script. There's no way to access it otherwise. Either to fill the property or reference it when casting.

Link to comment
Share on other sites

I have a variable number of quests with their own unique scripts set up to extend a common parent script.

If I interpreted one of SmkViper's comments about how things work correctly, then if the common parent script has the function you want to call then you just need to cast all of the quests to that parent type and call that function. If the more specific script that extended the parent script has a version of that function it will be used instead of the common function version. You can test it with something simple like this.

 

 

 

ScriptName ParentScript extends Quest

Function DoSomething()
   Debug.Notification("CDCooley was wrong.")
   Debug.Trace("CDCooley was wrong.")
EndFunction
ScriptName Child1Script extends ParentScript

Function DoSomething()
   Debug.Notification("Child 1 is doing something.")
   Debug.Trace("Child 1 is doing something.")
EndFunction
ScriptName Child2Script extends ParentScript

Function DoSomething()
   Debug.Notification("Child 2 is doing something.")
   Debug.Trace("Child 2 is doing something.")
EndFunction
ScriptName CallerScript extends ObjectReference

ParentScript Property Quest1 Auto
ParentScript Property Quest2 Auto

Event OnActivate(ObjectReference akActionRef)
    Quest1.DoSomething()
    Quest2.DoSomething()
EndEvent

 

 

Link to comment
Share on other sites

Does anyone know of a good way to keep the weather always sunny? (I am not using CoT)

 

I tried the always sunny version of this mod: http://www.nexusmods.com/skyrim/mods/8739/ but it doesn't seem to work.

 

I tried this weather spell mod: http://www.nexusmods.com/skyrim/mods/61080/ but thew weather goes back to default after fast traveling.

 

Is there any way to accomplish this?

Link to comment
Share on other sites

EDWS wasn't working for me...not sure why.

 

I did find this:

 

Only way I know of to change how the weather system works is to actually edit the weather in Creationkit. So if you want only one weather all the time you can set all the regions in the world to select from only one weather. I think this is your best option if you really want to customize what weathers are available and so on.

 

...how do you set the weather by Region in the CK?

Link to comment
Share on other sites

Weather changes depending on region and time in theft So you can't really keep the weather one way without polling and resetting a lot (if you're using scripts).

 

Changing it region by region will be a pain though. You could use my Hotkey mod and just tap the Hotkey whenever it changes to anything other than sunny, I suppose.

Link to comment
Share on other sites

 

If I interpreted one of SmkViper's comments about how things work correctly, then if the common parent script has the function you want to call then you just need to cast all of the quests to that parent type and call that function. If the more specific script that extended the parent script has a version of that function it will be used instead of the common function version. You can test it with something simple like this.

 

Just tested it, it worked perfectly with my setup! (child functions overriding parent and all). Thanks for the great info

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...