Jump to content

Recommended Posts

Posted

I've put this script on a door that teleports from an interior cell to the outside world. It compiles and saves but weather isn't changed.

 

 

  Reveal hidden contents

Thanks for any help.

 

Posted
  On 6/7/2019 at 1:47 PM, antstubell said:

I've put this script on a door that teleports from an interior cell to the outside world. It compiles and saves but weather isn't changed.

 

 

  Reveal hidden contents

Thanks for any help.

 

Motivation of this script not working might be 2

 

- The function "OnOpen" fires when the door has finshed the animation, not when you changed the cell, the weather might change but you changed it in the interior cell.

- If you know the location of the 2 cells use this function instead wich will fire when the location is actually changed https://www.creationkit.com/index.php?title=OnLocationChange_-_Actor

 

Let me know if it works

Posted

Nope - got nothing. here's what I scripted...

 

 

  Reveal hidden contents

 

Posted (edited)

An easy way to do this is, to create a trigger box around the exterior door's teleport marker that will have a script on it that "OnCellAttach" or "OnCellLoad" will execute the fanction. Or the script could also be put in the exterior door (exterior cell).

Edited by maxarturo
Posted

@maxarturo - Yep that works. Force or Set? If I 'Force' the weather will it change back to the world climate eventually? What's the difference between 'Force' and 'Set'?

Will this Force the weather for good?

 

 

  Reveal hidden contents

 

 

If so, how do I override it?

 

Hit a snag. Int. cell has 2 doors. 1 to 'Back Yard' an area walled off but still outside and the Main Exit door to the world in general. If player goes to the back yard to be nosey, as is expected, the script acts as it should. But then when player eventually decides to leave the house altogether, back through the house then out the main door and through another trigger box running same script, the weather doesn't always 'apply'. Going back in and out eventually gets the weather to 'conform'.

Another thing I am still baffled by is if I COC into a cell 2 cells away from The House and walk around, as expected the triggers never... triggered and script never ran. But as I approach the house, literally 1 cell away from The House's cell the weather (storm and rain) abruptly kicks in. No idea why.

Posted
If i remember correctly, "set" is use for occasions like yours, loading a cell then the script will use the script's "set" weather ignoring the pre fixed cell's weather set up.

The "force" is used when you are already in the exterior cell with a shine weather then you enter a trigger box that will "force" the weather to change to a rainy one.


I've noticed this COC issue with OnCellAttach in the past, never realy found an answer to this, so i assumed that is a script function - game engine related problem. For things like this (for testing) i always COC to the previous cell and use the "load door" that conects the two cells, and the "OnCellAttach" will always fire.

Posted
  On 6/7/2019 at 3:13 PM, antstubell said:

Nope - got nothing. here's what I scripted...

 

 

  Reveal hidden contents

 

Did you simply blindly copy a script hoping to work?

 

Your script is the example of the function and it fires still in the old location (the debug message fired while opening the door, or after you switched the location?). Try this.

 

Event OnLocationChange(Location akOldLoc, Location akNewLoc)

if (Game.GetPlayer().GetCurrentLocation() == akNewLoc)

Debug.Trace("We entered in the new location")

MyWeather.ForceActive()

endIf

endEvent

  • Recently Browsing   0 members

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