SupermassiveBlackHole Posted June 5, 2010 Share Posted June 5, 2010 Hello. I've been modding oblivion for quite some time but i've never really managed to get my head around scripting. I understand basic scripting techniques but putting it together I'm no good at. I'm trying to create a script for a weapon so that once the players health falls below 25 points they're able to hit very high. Here is the script so far: scn WeaponScript Begin GameMode if player.getav health <=25 player.setav strength 255 player.setav blade 255 else endifend But once my health regenerates past 25 poitns the strength and blade value stay the same, what can I do to fix this? Link to comment Share on other sites More sharing options...
ub3rman123 Posted June 5, 2010 Share Posted June 5, 2010 Try adding a spell to the player that fortifies their strength and blade skills, instead of directly modifying them. Then make it so that the spell is removed from the player when their health is higher. Begin GameModeif player.getav health <=25player.addspell SomeAbilityelseplayer.removespell SomeAbilityendifend I'm not sure about how well the gamemode blocks would work for this, you could experiment with begin OnHit. Link to comment Share on other sites More sharing options...
GreatLucifer Posted June 5, 2010 Share Posted June 5, 2010 The CS might have trouble with the simple 'else' in some cases... best to specify every time, as in elseif [...Works for me :) Lucifer Link to comment Share on other sites More sharing options...
SupermassiveBlackHole Posted June 12, 2010 Author Share Posted June 12, 2010 Try adding a spell to the player that fortifies their strength and blade skills, instead of directly modifying them. Then make it so that the spell is removed from the player when their health is higher. Begin GameModeif player.getav health <=25player.addspell SomeAbilityelseplayer.removespell SomeAbilityendifend I'm not sure about how well the gamemode blocks would work for this, you could experiment with begin OnHit. Hi, Thanks for replying. Sorry for the late reply :biggrin: I've got the script working now and it's running fine. Thanks for the help guys. Link to comment Share on other sites More sharing options...
Recommended Posts