I'm trying to port my favorite weapon from Oblivion--Dawnfang/Duskfang--into Skyrim. The mesh and texture port occurred without a hitch; I am, however, experiencing some difficulties perhaps beyond my scripting expertise (This would be only my third script ever.), and I seek the communities assistance. Keeping with my lazy copy-and-paste tactics, I took the scripts from a posted mod (http://skyrim.nexusmods.com/mods/10550), scanned them over, and then created the objects that were, as far as I could tell, the only ones not already in the ObjectReference: DawnfangKC and DuskfangKC--which I created as global variables, short, value 0, non-constant. Here's what I have for DawnfangScript (and, as it only involves substituting instances of "Dawnfang" for "Duskfang," DuskfangScript): Scriptname DawnfangScript extends ObjectReference
{The script controlling Dawnfangs behavior}
Actor User
GlobalVariable Property DawnfangKC Auto
GlobalVariable Property DuskfangKC Auto
Weapon property Duskfang auto
Weapon property DuskfangS auto
Float FUNCTION getCurrentHourOfDay()
float temp = Utility.GetCurrentGameTime() * 24
return ((temp as int) % 24) + (temp - (temp as int))
ENDFUNCTION
event onequipped(Actor akActor)
User = akActor
if User == Game.getplayer()
RegisterForUpdateGameTime(1)
DuskfangKC.setValue(0)
endif
endEvent
event OnUpdateGameTime()
if getCurrentHourOfDay() < 6
if getCurrentHourOfDay() > 18
if DawnfangKC.GetValue() >= 12
User.EquipItem(DuskfangS, false, true)
else
User.EquipItem(Duskfang, false, true)
endif
Delete()
unregisterForUpdateGameTime()
endif
endif
endEvent
event OnUnEquipped(Actor akActor)
UnregisterForUpdateGameTime()
endEvent And here's what I have for DawnfangKC (and DuskfangKC): Scriptname DawnfangKCheck extends activemagiceffect
GlobalVariable Property DawnfangKC Auto
event onEffectFinish(Actor akTarget, Actor akCaster)
if akTarget.isDead()
if akCaster == akTarget.GetKiller()
DawnfangKC.setValue(DawnfangKC.getValue()+1)
endif
endif
endevent I have identified two problems: (1) there is no way to determine the current Kill Count, as no messages have been implemented, and (2) the sword does not transform upon change from day to night. Any help and/or suggestions toward the end of getting the magnificent weapon into Skyrim would be much appreciated.