User:Twilight Sky

From the Fallout4 CreationKit Wiki
Revision as of 18: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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.