User:Twilight Sky

From the Fallout4 CreationKit Wiki
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.