Jump to content

Scripting Help (Berserker Mod)


AlternaBase

Recommended Posts

Hey guys, I just need a little help to get the ball rolling. I had this script back in Oblivion that made you deal more damage the more you got hurt. Here is that script, for reference:

ScriptName SacrierBloodScript

Float FQuestDelayTime

Short BoostStr
Short ResetStr
Short BaseStr
Short BoostAgi
Short ResetAgi
Short BaseAgi
Short BoostInt
Short ResetInt
Short BaseInt
Short BoostWil
Short ResetWil
Short BaseWil
Short Booster
Short CurrentHP
Short LastHP
Short MaxHP


Begin GameMode
If (FQuestDelayTime != 1)
Set FQuestDelayTime to 1
EndIf

Set BaseStr to Player.GetBaseAV Strength
Set BaseAgi to Player.GetBaseAV Agility
Set BaseInt to Player.GetBaseAV Intelligence
Set BaseWil to Player.GetBaseAV Willpower
Set MaxHP to Player.GetBaseAV Health

If GetPCIsRace Sacrier
Set CurrentHP to Player.GetAV Health
If CurrentHP < LastHP
	Set Booster to (LastHP - CurrentHP)
	Set BoostStr to Booster
	Set BoostAgi to Booster
	Set BoostInt to Booster
	Set BoostWil to Booster
	Player.ModAV Strength Booster
	Player.ModAV Agility Booster
	Player.ModAV Intelligence Booster
	Player.ModAV Willpower Booster
ElseIf CurrentHP > LastHP
	Set ResetStr to (-Booster)
	Set ResetAgi to (-Booster)
	Set ResetInt to (-Booster)
	Set ResetWil to (-Booster)
		If Player.GetAV Strength >= BaseStr
			Player.ModAV Strength ResetStr
			Player.ModAV Agility ResetAgi
			Player.ModAV Intelligence ResetInt
			Player.ModAV Willpower ResetWil
		EndIf
ElseIf CurrentHP == MaxHP
	Player.ForceAV Strength BaseStr
	Player.ForceAV Agility BaseAgi
	Player.ForceAV Intelligence BaseInt
	Player.ForceAV Willpower BaseWil
EndIf
Set LastHP to CurrentHP
EndIf
End

 

Now, in Oblivion I was simply able to attach this to a quest script and let it run in the background. But in Skyrim, it appears that it needs to extend an object. So how do I get a script to attach to the player character and let it run in the background?

 

Similarly, is there a more efficient method of doing this? Or is what I got basically the best method for it? (As a small explanation, the script looks to see if the player gets hurt, then increases or decreases stats based off of the difference in health.)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...