User:Twilight Sky
Revision as of 17:48, 14 September 2016 by imported>Goggle (Created page with "ActorValue property Experience auto <source lang='papyrus'> Function KillEx(Actor akVictim, ActorValue akExperience, Actor akKiller = none, Bool abSetXPAmount = false, Int a...")
ActorValue property Experience auto
Function KillEx(Actor akVictim, ActorValue akExperience, Actor akKiller = none, Bool abSetXPAmount = false, Int auiSetXPAmount = 0, Bool abBypassMod = false)
Int VictimXP = akVictim.GetValue(akExperience) as int
if akKiller == none && abSetXPAmount
akVictim.Kill()
Game.RewardPlayerXP(VictimXP, abBypassMod)
elseif akKiller == none && !abSetXPAmount
akVictim.Kill()
VictimXP = auiSetXPAmount
Game.RewardPlayerXP(VictimXP, abBypassMod)
elseif !akKiller && abSetXPAmount
akVictim.Kill(akKiller)
Game.RewardPlayerXP(VictimXP, abBypassMod)
elseif !akKiller && !abSetXPAmount
akVictim.Kill(akKiller)
VictimXP = auiSetXPAmount
Game.RewardPlayerXP(VictimXP, abBypassMod)
endif
EndFunction
Working on this function.. Need to be tested.