Difference between revisions of "Talk:DamageActorValue - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>KainXavier
(Created page with "== DamageActorValue vs ModActorValue == ModActorValue() does not cause the UI to update in the same manner as DamageActorValue() Try calling ''Game.GetPlayer().ModActorValue(...")
 
imported>Egocarib
Line 3: Line 3:


Try calling ''Game.GetPlayer().ModActorValue("Stamina", -10.0)'' and ''Game.GetPlayer().DamageActorValue("Stamina", 10.0)''.  Notice the Stamina bar does not update when calling ModActorValue().--[[User:KainXavier|KainXavier]] ([[User talk:KainXavier|talk]]) 2014-04-10T23:28:20 (EDT)
Try calling ''Game.GetPlayer().ModActorValue("Stamina", -10.0)'' and ''Game.GetPlayer().DamageActorValue("Stamina", 10.0)''.  Notice the Stamina bar does not update when calling ModActorValue().--[[User:KainXavier|KainXavier]] ([[User talk:KainXavier|talk]]) 2014-04-10T23:28:20 (EDT)
:That's probably because ModActorValue() changes the stamina total, while DamageActorValue only changes the current value. Thus, if you Mod Stamina, by -10, you end up with 90/90 stamina (still 100%), but if you Damage Stamina by 10, you end up with 90/100 (90% stamina). Since the Stamina bar is only a percentage indicator, only Damaging Stamina will change it. [[User:Egocarib|Egocarib]] ([[User talk:Egocarib|talk]]) 2014-04-12T08:01:00 (EDT)

Revision as of 07:01, 12 April 2014

DamageActorValue vs ModActorValue

ModActorValue() does not cause the UI to update in the same manner as DamageActorValue()

Try calling Game.GetPlayer().ModActorValue("Stamina", -10.0) and Game.GetPlayer().DamageActorValue("Stamina", 10.0). Notice the Stamina bar does not update when calling ModActorValue().--KainXavier (talk) 2014-04-10T23:28:20 (EDT)

That's probably because ModActorValue() changes the stamina total, while DamageActorValue only changes the current value. Thus, if you Mod Stamina, by -10, you end up with 90/90 stamina (still 100%), but if you Damage Stamina by 10, you end up with 90/100 (90% stamina). Since the Stamina bar is only a percentage indicator, only Damaging Stamina will change it. Egocarib (talk) 2014-04-12T08:01:00 (EDT)