Jump to content

Recommended Posts

Posted

I just want to get the value of a global variable so I can multiply it with an int. But I don't understand how to and the wiki has multiple syntaxes on different pages all of which fail to compile with Papyrus.

Posted

There are heaps of ways as long as you cast correctly. I am doing these right now where pSKK_HWDifficulty is a GlobalVariable note the explicit cast on each calculation

Float fMoreDamageValue = (pSKK_HWDifficulty.GetValue() * 100) as Float 

Int iTargetActorCount = (pSKK_HWDifficulty.GetValue() * iMaxWorkshopActors) as Int

Int iGlobalValueAsInt = pSKK_HWDifficulty.GetValue() as Int

I dont use GetValueInt() as it has caused issues.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...