neuntoter Posted August 5, 2010 Share Posted August 5, 2010 Okay I am still new to this scripting thing and am getting frustrated. I have this script I got from a post from here. I have added a ShowMessage to it too just to make sure it is not working. The script type is effect. ScriptName 00ArmorScript Begin ScriptEffectStart SetActorValue SpeedMult 300 End Begin ScriptEffectFinish SetActorValue SpeedMult 100 End I have a Base Effect Archtype Script and this script as it's Item. Flags being set to Self, Touch, Target, No Magnitude, No Area I have my armor which has an Object Effect, everything else from that object effect is working except for the base effect. Am I going about this wrong? Any clue why it is not working in game? Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted August 5, 2010 Share Posted August 5, 2010 One thing, I read somewhere that anything that starts with numerical characters won't work. Probably because it thinks it's an ID, not a text string. You are trying to make an armor that makes you fast when you equip it? I would try: scn scriptname Begin OnEquip Player player.setactorvalue speedmult 300 End Begin OnUnEquip Player player.setactorvalue speedmult 100 End You might also want to first save your speedmult to a variable in case it is not 100. Then you'll know what to set it back to. Link to comment Share on other sites More sharing options...
HugePinball Posted August 5, 2010 Share Posted August 5, 2010 Try adding something like DamageAV LeftMobilityCondition 0.01 RestoreAV LeftMobilityCondition 0.01...after each time you change the SpeedMult value. Link to comment Share on other sites More sharing options...
neuntoter Posted August 5, 2010 Author Share Posted August 5, 2010 But the way I am doing this with the Script attached to the Base Effect which is attached to an Object Effect which is then attached to a piece of body armor, is right? And thanks for the help. Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted August 5, 2010 Share Posted August 5, 2010 I would put it right on the armor. That's the only way the OnEquip block will work, anyway. Link to comment Share on other sites More sharing options...
neuntoter Posted August 5, 2010 Author Share Posted August 5, 2010 I would put it right on the armor. That's the only way the OnEquip block will work, anyway. Okay redoing it as an armor script simplifies everything.. Not sure why I didn't just go with that idea in the first place heh. So the only other thing I can think of is though that if an NPC equips my armor they will give me the buff. How can I get the wearer and run the onequip regardless if its player or npc? Just to show I am actually trying to do my own work... ScriptName 00ArmorScript ref Wearer Begin OnEquip set Wearer to GetSelf Wearer.SetActorValue SpeedMult 300 End Begin OnUnequip set Wearer to GetSelf Wearer.SetActorValue SpeedMult 100 End I will fix the restore of Speedmult and save the value later just trying to get some basic idea here. Link to comment Share on other sites More sharing options...
neuntoter Posted August 5, 2010 Author Share Posted August 5, 2010 Looks like I got it to work with GetContainer instead. Seems to work on NPCs and Player so all is good, sure I will end up with more questions but this solves it for now and gets me on the right track. Thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts