jefe323 Posted May 17, 2009 Share Posted May 17, 2009 I also have a few new problems...Re-equipping in water stacks +100 changeNo matter what, my speed is 0 upon load script, as usualscn SwiftSwimItem short worn short origValue short origval2 Begin OnEquip Player set origvalue to player.GetActorValue speed set origval2 to origValue + 100 Message "You can now swim faster!", 5 set worn to 1 end begin gamemode If PLayer.IsSwimming == 1 Player.SetActorValue speed origval2 Elseif player.ISSwimming == 0 Player.SetActorValue speed origValue EndIf End Begin OnUnEquip Player if worn == 1 Player.SetActorValue speed orifvalue Message "You can no longer swim as fast...", 5 set worn to 0 endif End Begin OnDrop Player if worn == 1 Player.SetActorValue speed oigvalue set worn to 0 endif end You got a couple spelling mistakes on variables, that might be the reason it's stacking (not reverting to the original value). Also, you don't necessarily need the elseif in the gamemode block, an else statement would work better (less code to right). That part would look something like this: If player.IsSwimming == 1 Player.SetActorValue speed origval2Else Player.SetActorValue speed origValueEndIf Link to comment Share on other sites More sharing options...
apocalypse1138 Posted May 17, 2009 Author Share Posted May 17, 2009 Well the spelling mistakes that I made were due to fast typing, and if I made those same mistakes in the script, it won't save it. (know from experience). It seems to work backwards now... when unequipped, it speeds up, when equipped, it slows down... Link to comment Share on other sites More sharing options...
Pronam Posted May 17, 2009 Share Posted May 17, 2009 Try this.... scn SwiftSwimItem short worn short origValue short origval2 ref tempref Begin OnEquip Player If worn == 0 set tempref to player set origvalue to player.GetActorValue speed set origval2 to origValue + 100 Message "You can now swim faster!", 5 set worn to 1 endif end begin gamemode If worn == 1 If PLayer.IsSwimming == 1 Player.SetActorValue speed origval2 Else set tempRef to GetContainer tempRef.unequipitem ( Your Item without the )and( ) Endif Endif End Begin OnUnEquip Player if worn == 1 Player.SetActorValue speed origvalue Message "You can no longer swim as fast...", 5 set worn to 0 endif End Begin OnDrop Player if worn == 1 Player.SetActorValue speed origvalue set worn to 0 endif end Link to comment Share on other sites More sharing options...
apocalypse1138 Posted May 17, 2009 Author Share Posted May 17, 2009 Where did you come from? Lol, this was an extremely big help, out of nowhere! There is just one problem with the script, the item cannot be used out of water. Great job otherwise and definate kudos. Link to comment Share on other sites More sharing options...
buddah Posted May 17, 2009 Share Posted May 17, 2009 On the title question, your can change it a custom title in the user control panel....but not until you have reached 500 posts. Buddah Link to comment Share on other sites More sharing options...
Pronam Posted May 17, 2009 Share Posted May 17, 2009 About the unequip outside of the water...I though you wanted it to be ? At least that seemed to be the intention?----------------Nevermind ;) Link to comment Share on other sites More sharing options...
apocalypse1138 Posted May 17, 2009 Author Share Posted May 17, 2009 On the title question, your can change it a custom title in the user control panel....but not until you have reached 500 posts. BuddahThanks buddah! Looks like we finally got it figured out here...On our very own TESNexus forums! The item and all of the scripting works without a hitch, here is the final script...scn SwiftSwimItem short worn float origValue float origval2 ref tempref Begin OnEquip Player If worn == 0 set origValue to player.GetActorValue speed set origval2 to origValue + 100 Message "You can now swim faster!", 5 set worn to 1 endif end begin gamemode If worn == 1 If Player.IsSwimming == 1 Player.SetActorValue speed origValue2 Else Player.SetActorValue speed origValue EndIf EndIF End Begin OnUnEquip Player If worn == 1 Player.SetActorValue speed origValue Message "You can no longer swim as fast...", 5 set worn to 0 EndIf end Begin OnDrop Player if worn == 1 Player.SetActorValue speed origValue set worn to 0 endif endThank you everyone who helped me on this, as there are quite a few of you who contributed greatly.Hopefully everyone who reads this learns something. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.