Durai Posted April 24, 2013 Share Posted April 24, 2013 So I'm working on a mod that'll give players an amulet that'll boost their stats when becoming a Werewolf (seriously underpowered at higher levels). I have two scripts: one on the actaul amulet, and one on the player. It works well except for one thing; modding the healrate actor value does nothing while being a Werewolf. I've used the ingame commands to view my healrate and it shows it being at 1.5. However, after taking some damage, my health never regenerates. If anyone can tell me what I'm doing wrong, please let me know. Here's the script for the amulet: Scriptname WerewolfAmulet002 extends ObjectReference Race Property WerewolfBeastRace AutoGlobalVariable Property WasWerewolf AutoEvent OnEquipped(Actor akActor) If akActor == Game.Getplayer() If WasWerewolf.Value == 0 WasWerewolf.SetValue(1) Debug.Notification("Blessing recieved.") endif endifEndEventEvent OnUnequipped(Actor akActor) If akActor == Game.GetPlayer() If akActor.GetRace()==WerewolfBeastRace akActor.ModActorValue("Health", 100.0) akActor.ModActorValue("DamageResist", 200.0) akActor.ModActorValue("UnarmedDamage", 25.0) akActor.ModActorValue("MagicResist", 35.0) Else WasWerewolf.SetValue(0) Debug.Notification("Blessing removed.") endif EndIfEndEvent And here's the one on the player: Scriptname WerewolfEquipItem001 extends ReferenceAliasRace Property WerewolfBeastRace autoGlobalVariable Property WasWerewolf AutoEvent OnRaceSwitchComplete() If Game.Getplayer().GetRace() == WerewolfBeastRace If WasWerewolf.Value == 1 Debug.Notification("Your strength has been enhanced.") WasWerewolf.SetValue(2) endif Else If WasWerewolf.Value == 2 Debug.Notification("Strength enhancements removed.") Game.Getplayer().ModActorValue("Health", -100.0) Game.Getplayer().ModActorValue("DamageResist", -200.0) Game.Getplayer().ModActorValue("UnarmedDamage", -25.0) Game.Getplayer().ModActorValue("MagicResist", -35.0) WasWerewolf.SetValue(0) endif endifEndEvent Link to comment Share on other sites More sharing options...
Recommended Posts