GBHis Posted May 17, 2009 Share Posted May 17, 2009 As Vagrant0 pointed out, it's not really certain that the setting has any effect at all. You're right that a work-around could be to change the speed of the player. Have an effect run on a ring and check if player.isswimming == 1(reference: http://cs.elderscrolls.com/constwiki/index.php/IsSwimming ) You change the title in the CP. Link to comment Share on other sites More sharing options...
apocalypse1138 Posted May 17, 2009 Author Share Posted May 17, 2009 That sounds right... but I don't know how to put that into the script as I have never scripted an if/endif situation before. (I am rather new at scripting, but very interested in what I can do with it). Link to comment Share on other sites More sharing options...
jefe323 Posted May 17, 2009 Share Posted May 17, 2009 That sounds right... but I don't know how to put that into the script as I have never scripted an if/endif situation before. (I am rather new at scripting, but very interested in what I can do with it). I would highly recommend checking out the tescs wiki (google it). It is where I go to find out information on various commands and functions in the CS. Link to comment Share on other sites More sharing options...
apocalypse1138 Posted May 17, 2009 Author Share Posted May 17, 2009 I have spent considerable time on the CSwiki, it just doesn't explain exactly what I need to know. Is it like.. if player.isswimming == 1 then (modify speed here)endifElseif player.isswimming == 0(modify speed same amount as a negative)endif Or is it something totally different..?Also have no clue what to put on the UnEquip part... Link to comment Share on other sites More sharing options...
jefe323 Posted May 17, 2009 Share Posted May 17, 2009 I have spent considerable time on the CSwiki, it just doesn't explain exactly what I need to know. Is it like.. if player.isswimming == 1 then (modify speed here)endifElseif player.isswimming == 0(modify speed same amount as a negative)endif Or is it something totally different..?Also have no clue what to put on the UnEquip part... an if-else block looks sorta like this: if ( condition ) Do thiselseif ( condition ) Do thiselse Do thisendif you only need to be an endif at the end of the if-elseif-else block Link to comment Share on other sites More sharing options...
apocalypse1138 Posted May 17, 2009 Author Share Posted May 17, 2009 I have spent considerable time on the CSwiki, it just doesn't explain exactly what I need to know. Is it like.. if player.isswimming == 1 then (modify speed here)endifElseif player.isswimming == 0(modify speed same amount as a negative)endif Or is it something totally different..?Also have no clue what to put on the UnEquip part... an if-else block looks sorta like this: if ( condition ) Do thiselseif ( condition ) Do thiselse Do thisendif you only need to be an endif at the end of the if-elseif-else block Alright, figured out the if/else block, got that working... But there must be a problem with when the block runs... As if I am not swimming when I equip it, speed drops by 100 and obviously I move very slow. If I equip it while swimming, speed increases by 100 but it is stackable... As if I re-equip it it continues to increase speed by an additional 100 points. Here is my revised script so far... comments are in parenthasesscn SwiftSwimItem Begin OnEquip PLayer (probably must do a get value/origvalue) Message "You can now swim faster!", 5 If Player.IsSwimming == 1 Player.ModAV speed 100 (origValue +100?) ElseIf Player.IsSwimming == 0 Player.ModAV speed -100 (origValue?) EndIf end Begin OnUnEquip Player (set to origValue here?) Message "You can no longer swim twice as fast...", 5 EndI expected this problem, I am just unsure of how to script it so this doesn't happen. Link to comment Share on other sites More sharing options...
jefe323 Posted May 17, 2009 Share Posted May 17, 2009 the code is set up so that whenever you are not swimming, your speed is decresed by 100. Link to comment Share on other sites More sharing options...
apocalypse1138 Posted May 17, 2009 Author Share Posted May 17, 2009 the code is set up so that whenever you are not swimming, your speed is decresed by 100.I almost have this figured out... Only problem left is that when I unequip in water speed stays at the modified value. Link to comment Share on other sites More sharing options...
jefe323 Posted May 17, 2009 Share Posted May 17, 2009 the code is set up so that whenever you are not swimming, your speed is decresed by 100.I almost have this figured out... Only problem left is that when I unequip in water speed stays at the modified value. can you post what you have so far? Link to comment Share on other sites More sharing options...
apocalypse1138 Posted May 17, 2009 Author 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.