exesinxmyxalias Posted May 16, 2009 Share Posted May 16, 2009 I'm writing a script for a set of armor that only has enchantments while the player is in Oblivion. This is what the script looks like scn 0eximagcabootsenchant Begin ScriptEffectUpdate if ( GetIsCurrentWeather OblivionDefault || GetIsCurrentWeather OblivionMountainFog || GetIsCurrentWeather OblivionSigil || GetIsCurrentWeather OblivionStormOblivion ) if ( IsSpellTarget 0eximagcaboots == 0 ) AddSpell 0eximagcabootsscript endif else if ( IsSpellTarget 0eximagcaboots ) RemoveSpell 0eximagcabootsscript endif endif end Begin ScriptEffectFinish RemoveSpell 0eximagcabootsscript end Yes, I'm aware that my spells have 'script' on the end of them instead of 'spell', but that's what happens when I'm up late working on stuff. Anyway, I tried to save the script and I got an error message for line 8 saying that "Magic item '0eximagcaboots' invalid parameter for magic item" or something along those lines. What am I doing wrong here? Link to comment Share on other sites More sharing options...
AzirAphale001 Posted May 16, 2009 Share Posted May 16, 2009 The item '0eximagcaboots' isn't being detected as the spell target.You would be better running a global script to detect when the player is wearing the armor, and adding the spell when you enter Oblivion. If you add a script to each piece of the armor that affects a custom global value (IsWearingBoots, IsWearingCuirass, IsWearingHelm etc), and a quest script that detects when you're in Oblivion AND wearing the armor by using the custom globals (If IsWearingCuirass == 1). Link to comment Share on other sites More sharing options...
Vagrant0 Posted May 16, 2009 Share Posted May 16, 2009 I'm writing a script for a set of armor that only has enchantments while the player is in Oblivion. This is what the script looks like scn 0eximagcabootsenchant Begin ScriptEffectUpdate if ( GetIsCurrentWeather OblivionDefault || GetIsCurrentWeather OblivionMountainFog || GetIsCurrentWeather OblivionSigil || GetIsCurrentWeather OblivionStormOblivion ) if ( IsSpellTarget 0eximagcaboots == 0 ) AddSpell 0eximagcabootsscript endif else if ( IsSpellTarget 0eximagcaboots ) RemoveSpell 0eximagcabootsscript endif endif end Begin ScriptEffectFinish RemoveSpell 0eximagcabootsscript end Yes, I'm aware that my spells have 'script' on the end of them instead of 'spell', but that's what happens when I'm up late working on stuff. Anyway, I tried to save the script and I got an error message for line 8 saying that "Magic item '0eximagcaboots' invalid parameter for magic item" or something along those lines. What am I doing wrong here?Use the form ID instead of the editor ID. Additionally, Editor ID's that begin with numbers are a bad idea since many functions do not recognize them. You should ALWAYS begin a definition with a few letters. Link to comment Share on other sites More sharing options...
exesinxmyxalias Posted May 16, 2009 Author Share Posted May 16, 2009 starting them off with numbers makes them easier to find as they show up at the top of the list and has not caused me a problem so far. so use the form id for the spells and stuff? I'm new to the whole scripting thing. I'm actually lucky I got this far. Does anyone have an example of what it should look like? Link to comment Share on other sites More sharing options...
exesinxmyxalias Posted May 16, 2009 Author Share Posted May 16, 2009 I changed the stuff over to form ID's and its still giving me the same error. Everything's been going fine and now I'm getting hung up on the scripts. Link to comment Share on other sites More sharing options...
Vagrant0 Posted May 17, 2009 Share Posted May 17, 2009 starting them off with numbers makes them easier to find as they show up at the top of the list and has not caused me a problem so far. so use the form id for the spells and stuff? I'm new to the whole scripting thing. I'm actually lucky I got this far. Does anyone have an example of what it should look like?Yeah, it makes them easier to find, but causes problems like this. But, believe the issue here is that you are using a script on an enchantment. Scripted effects don't work on constant effect enchantments. So azir's advice was also part of solving this problem. Link to comment Share on other sites More sharing options...
exesinxmyxalias Posted May 17, 2009 Author Share Posted May 17, 2009 Well I must not be smart enough to figure this out because I still can't figure out what I'm doing wrong here. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.