Woverdude Posted March 18, 2012 Share Posted March 18, 2012 (edited) So, I'm working on a script that will modify the UnarmedDamage Actor Value. I need to figure out how to get the value for the Actor value, though. I tried using the code from the CK wiki, but it isn't working. The basic idea is that there are two variables: the UnarmedDamage AV and a Global Variable named Level. I want to multiply the AV by (1 + [Level/20]). Here is the code that I tried to use: Scriptname UnarmedDamageMulti extends ObjectReference {Scales the Unarmed damage according to player's Unarmed level.} GlobalVariable Property Level auto int UD = Game.GetPlayer().GetActorValue("UnarmedDamage") as int Event OnEffectStart(Actor akTarget, Actor akCaster) Game.GetPlayer().SetActorValue("UnarmedDamage", UD*(1 + Level.GetValue()/20)) EndEvent Please help? :smile: Edited March 18, 2012 by Woverdude Link to comment Share on other sites More sharing options...
fg109 Posted March 18, 2012 Share Posted March 18, 2012 OnEffectStart is an event for active magic effects, while your script extends ObjectReference. It won't work. Also, int UD = Game.GetPlayer().GetActorValue("UnarmedDamage") as int should be put inside an event or function. Link to comment Share on other sites More sharing options...
Woverdude Posted March 18, 2012 Author Share Posted March 18, 2012 Thank you for your help. The script works now. :smile: Link to comment Share on other sites More sharing options...
Recommended Posts