I've been looking into this for a few hours now, mostly looking at solutions found through Google, and either the solution generates an error I don't understand or it simply does nothing. Quest Objects: _BloodThirst_MainQuest - Start Game Enabled and is used to store experience and level int properties _BloodThirst_KillUpdate - Kill Actor Event Enabled, the quest resets to allow it to be re-obtained, and is used to update the experience and level int properties in the MainQuest Basic Mod Description: Every time the player kills an NPC the player gains X Bloodthirst experience. Current Script Setup: Quest/Script: _BloodThirst_MainQuest, BloodThirst_MainScript
Scriptname BloodThirst_MainScript extends Quest
Int Property thirstLevel Auto
Int Property thirstExp Auto
Function UpdateThirst()
thirstExp = thirstExp + 1
debug.notification("Bloodthirst Exp: " + thirstExp)
EndFunction
Event OnInit()
Debug.Notification("Bloodthirst Loaded")
EndEvent
Quest/Script: _BloodThirst_KillUpdate, BloodThirst_UpdateScript
Scriptname BloodThirst_UpdateScript extends Quest
Quest Property ThisQuest Auto
BloodThirst_MainScript Property MainScript Auto
Event OnStoryKillActor(ObjectReference akVictim, ObjectReference akKiller, Location akLocation, int aiCrimeStatus, \
int aiRelationshipRank)
MainScript.UpdateThirst()
ThisQuest.Reset()
endEvent
Issue with setup: The current setup compiles fine, but in game when a kill happens the function UpdateThirst() does not run. I have tested it in game with "Debug.Notification(MainScript.thirstExp)" and it displays the exp value, which is 0; however, for some reason it will not run the function. I have tried using full properties with the Quest.GetQuest"xxxx" function get(), and the setup using GetLinkedRef() which gave an error about not being able to cast a none to a quest I believe. This has been the only setup that doesn't give a compiler error. After a bit I started looking at the source scripts of some of the mods I have installed and found that XPMSE uses the same setup and is able to call their functions fine; this confused me even more. So, if you know what I'm doing wrong or know of another way that works, let me know. Thanks, P.S. C++ was easier to learn than this...