After playing Oblivion GOTY for quite a while, i wanted to modify it, so i began studying the concept of TESIV - Scripts and the CS, but being new to the Oblivion CS i ran into a problem and / or a few questions.
First, my Questions:
- Do scripts have to be attached to some kind of Actor / Object , or is it possible to make a script that runs like all the time, checking for conditions and running through the block if they are met?
- Do Variables work globally, i mean, can i use one variable in multiple scriipts or are they local and can only be used in the script in which they are created? And if they work only local, how may i store data worldwide?
What i'd like to create:
If the player kills another Actor which is affected by a certain spell, it increases a variable by one. Kinda like Soultrap. I've already created a spell with a scripted effect:
set SatTarget to GetSelf
if (SatTarget.IsActor != 1) || (SatTarget.GetIscreature == 1)
Message "This Spell works only for Humans!"
This should dispel the spell, if the target isn't human, but i have no idea, how to increase the variable which counts the people killed under the spell effect.
I'd appreciate it, if someone would be able to help me.
With best regards,