I'm trying to make an Oblivion mod very similar to my Skyrim mod. Skyrulianfield which makes armies of undead hunt the player at night if you go without a torch outside of cities and outside of player houses. Because Oblivion has no LocationTypeKeyword setting unlike Skyrim, I had to do it slightly differently, where these undead can't open doors. Consequently these type run on a follow player package similar to their Skyrim counterparts, however, where as their Skyrim counterparts AI package conditions prevent them from following a torch carring player, it just does not work the same for Oblivion. I tried both something like Player.Getequipped Torch0 =0 as well as Player.HasTorchOut=0- and neither for the AI packages has worked, even though the exact same thing worked easily for Skyrim. I suppose it's just Skyrim's Creation Kit being more convenient than the Oblivion Construction Set.
Anyways here's the script, I use a total of 7 different script. Each day has it's own unique army of undead where Morndas/Monday is replaced with the other days of the week, so one specific army of undead is scripted to pursue the player each day, with 7 total armies.
scriptname AAATehZomberStalkern
begin gamemode
if gamehour >= 19 || gamehour < 7
GetDayOfWeek(1) == 1 ; Morndas
enable
else
disable
endif
end
I want to alter this script, and the 6 other nearly identical scripts, where these undead get disabled if the player has their torch out, and then get re-enabled if you put down your torch AND it is the specific day/hour of the script. After doing a forum search of a GetEquipped script here is how I attempted to alter it, as I do make use of searches before asking questions.
scriptname AAATehZomberStalkern
begin OnEquip
If ( player.GetEquipped Torch02 == 1 )
Disable
else
Enable
endif
end
begin gamemode
if gamehour >= 19 || gamehour < 7
GetDayOfWeek(1) == 1 ; Morndas
enable
else
disable
endif
end
Good news: Not a single compiling error. Bad News: I tested this script, and the torch had no effect, equipping it didn't disable them. My goal with these scripts is for these undead to ONLY be enabled at a specific time on their own respective day and ONLY when the player isn't holding a torch. If you equip a torch they should remain disabled, or disappear suddenly if you are holding one if you unequip the torch and it's night time they become enabled again, but if you unequip it during the day, or on the day another undead army is active, they won't show up.
Anyways... Can someone please help me make this script work successfully? I'll highly appreciate it, and I'll be sure to credit you for scripting help when I release this mod.