What script controls SunlightDay?

Post » Mon Jun 18, 2012 10:59 pm

I want to script in a faction change and global event to mark the player as an enemy but I want this to happen ONLY during the day.

Is this possible you think?

I know the game somehow knows when a Vampire player is in the sun and then triggers their hidden SunDamager spell to hurt them. I'd like to find out where this is so I can add a faction change for the player vampire so that he is ONLY hunted and attacked during the day.
User avatar
Mark
 
Posts: 3341
Joined: Wed May 23, 2007 11:59 am

Post » Mon Jun 18, 2012 3:15 pm

There isn't a script controlling the passing of time - that's handled by the game engine. You can query this information via http://www.creationkit.com/GetCurrentGameTime_-_Utility.

Cipscis
User avatar
Sammi Jones
 
Posts: 3407
Joined: Thu Nov 23, 2006 7:59 am

Post » Tue Jun 19, 2012 4:26 am

EDIT: Nevermind, I would just listen to Cipscis. I am still noob at all this. :P
User avatar
des lynam
 
Posts: 3444
Joined: Thu Jul 19, 2007 4:07 pm

Post » Tue Jun 19, 2012 12:58 am

There isn't a script controlling the passing of time - that's handled by the game engine. You can query this information via http://www.creationkit.com/GetCurrentGameTime_-_Utility.

Cipscis

Thank you sir!
User avatar
Taylor Tifany
 
Posts: 3555
Joined: Sun Jun 25, 2006 7:22 am

Post » Mon Jun 18, 2012 4:24 pm

This turned into a new problem. How does the game know to use the SunDamage spells on a Vampire player when the game time turns to day?

It isn't scripted into the vampire quest or the sundamage spell. Though the sundamage spell does have this script:


Scriptname VampireSunISMDEffectScript extends ActiveMagicEffect  imageSpaceModifier Property VampireSunlightISMD01  AutoimageSpaceModifier Property VampireSunlightISMD02  AutoimageSpaceModifier Property VampireSunlightISMD03  AutoimageSpaceModifier Property VampireSunlightISMD04  AutoMessage Property VampireSunMessage Autoint property VampirismLevel = 1 autoevent OnEffectStart(Actor akTarget, Actor akCaster)    if aktarget == game.getPlayer()        VampireSunMessage.Show()        VampireSunlightISMD04.applyCrossFade(2.0)        MagVampireSunlight.Play(Game.GetPlayer())        utility.wait(2.0)        imageSpaceModifier.removeCrossFade();        if VampirismLevel == 2;            VampireSunlightISMD04.applyCrossFade(2.0);        elseif VampirismLevel == 1;            VampireSunlightISMD03.applyCrossFade(2.0);        elseif VampirismLevel == 1;            VampireSunlightISMD02.applyCrossFade(2.0);        else    ;aka level 1;            VampireSunlightISMD01.applyCrossFade(2.0);        endif    endifendEvent;event OnEffectStop(Actor akTarget, Actor akCaster);    if aktarget == game.getPlayer();        imageSpaceModifier.removeCrossFade(2.0);    endif;endEventSound Property MagVampireSunlight  Auto  
User avatar
W E I R D
 
Posts: 3496
Joined: Tue Mar 20, 2007 10:08 am

Post » Tue Jun 19, 2012 2:23 am

Take a look at the conditions defined for whatever damage health type effect is used in that spell. You'll probably find that both the current game time, whether or not the actor is in an interior cell, and the current weather conditions are all checked using http://www.creationkit.com/Category:Condition_Functions.

Cipscis
User avatar
WYatt REed
 
Posts: 3409
Joined: Mon Jun 18, 2007 3:06 pm

Post » Tue Jun 19, 2012 4:30 am

Thank you again sir.
User avatar
QuinDINGDONGcey
 
Posts: 3369
Joined: Mon Jul 23, 2007 4:11 pm

Post » Mon Jun 18, 2012 3:09 pm

VampireSunDamage01 through 04
User avatar
Campbell
 
Posts: 3262
Joined: Tue Jun 05, 2007 8:54 am


Return to V - Skyrim