Necrogoroth Posted February 18, 2017 Share Posted February 18, 2017 Hello, 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: scn NecSatSpellScriptref SatTargetBegin ScriptEffectStartset SatTarget to GetSelfif (SatTarget.IsActor != 1) || (SatTarget.GetIscreature == 1)Message "This Spell works only for Humans!"SatTarget.dispel NecSatSpellendif end 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, Necrogoroth Link to comment Share on other sites More sharing options...
kastano Posted February 19, 2017 Share Posted February 19, 2017 Hallo ,its been a year since i last visited oblivion ,so i ve forget most about moddingfirst questionthere are three kind of scriptsQuest - object - magicSo you propably need a quest script -so make a new quest in the cs and atouch the scriptsecond questiondont mess with global variables .you can do your work with localthey are stored in the savegame.again a quest script is neededset myquest.varkill to myquest.varkill + 1varkill is a var declared at myquest quest scrpti hope i helped Link to comment Share on other sites More sharing options...
Necrogoroth Posted February 21, 2017 Author Share Posted February 21, 2017 Thanks, got it to run by setting a quest script reference to my spell target if it is a living human, and removing it on spell effect finish. Link to comment Share on other sites More sharing options...
Recommended Posts