IsharaMeradin Posted September 23, 2012 Share Posted September 23, 2012 (edited) I have a script whose actions work properly, it updates once a minute to perform a specific task. However I do not want it to perform that task when combat is going on or when a weapon or spell is ready. Initially I was using IsWeaponDrawn along with IsInCombat That works except that when arrows are equipped it considers them to be 'readied weapons' So I tried using: If (Player.GetEquippedWeapon().IsBattleaxe() || Player.GetEquippedWeapon().IsBow() || Player.GetEquippedWeapon().IsDagger() || Player.GetEquippedWeapon().IsGreatsword() || Player.GetEquippedWeapon().IsMace() || Player.GetEquippedWeapon().IsStaff() || Player.GetEquippedWeapon().IsSword() || Player.GetEquippedWeapon().IsWarhammer() || Player.GetEquippedWeapon().IsWarAxe()) HasWeapEquip = 1 Else HasWeapEquip = 0 EndifIn exchange of using Player.IsWeaponDrawn() I used the defined variable HasWeapEquip. Well now the update task performs when nothing or only arrows are equipped (equipped for other weapons apparently means when hanging on the hip...) which isn't what I want and is actually worse... Anyone know a way around this? I need the update function to not process when weapons & spells are ready but still process when arrows are equipped without a readied bow, spell or other 'real' weapon. Do keep in mind everything needs to remain self contained in one script. I'm not going to drag in other objects to 'make it work' EDIT -- I guess chalk it up to Skyrim being fickle. I just reverted back to the original setup and my testing worked properly.... -.- still frustrating Edited September 23, 2012 by IsharaMeradin Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 23, 2012 Author Share Posted September 23, 2012 (edited) Same script new problem. I was under the impression from this http://www.creationkit.com/OnUpdate_-_Form that OnUpdate wouldn't function when menus were active. I figured that the crafting stations were menu interfaces... however the OnUpdate functions during it. That's not cool as the OnUpdate removes the crafting supplies -.- Any ideas on how to prevent OnUpdate from functioning if the player is using a crafting station? ********************* I don't really understand spells & powers.... but I'm wondering is it possible to set a global variable with a spell or ability? If so that would make things a little easier rather than trying to have the right combination of equipped/not equipped weapons etc... Edited September 23, 2012 by IsharaMeradin Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 24, 2012 Author Share Posted September 24, 2012 Turns out spells were the way to go to set my global variable for the updating. Don't have to worry about weapon status, etc... Since I'd already built the idea of a mage originally having and creating the object into the "lore" then using spells to access special features was more plausible than checking against weapons drawn and sneaking or not sneaking. As far as preventing transfer of items at the crafting station.... I just worked it into the "lore" that the one spell would do that, so to avoid it: cancel the spell :P Thanks for not helping.... :P but sometimes typing out thoughts helps cause then I can see what I'm thinking.... so then in a sense you did help, cause nobody shut me down LOL Link to comment Share on other sites More sharing options...
Recommended Posts