Difference between revisions of "IsOverEncumbered - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jlundin
(Created page with "Category:Scripting Category:Papyrus '''Member of:''' Actor Script ''(Requires SSE 1.5.3)'' Returns if the actor is currently over-encumbered. == Syntax == <sourc...")
 
imported>Antares
m (syntax)
 
(One intermediate revision by the same user not shown)
Line 21: Line 21:
   Debug.Trace("Player should drop some items, they're currently weighed down")
   Debug.Trace("Player should drop some items, they're currently weighed down")
endIf
endIf
</source>
== Using IsOverEncumbered in Skyrim Classic ==
<source lang="papyrus">
Bool Function IsOverEncumbered(Actor akActor)
  if akActor.GetActorValue("InventoryWeight") > akActor.GetActorValue("CarryWeight")
    Return True
  else
    Return False
  endif
EndFunction
</source>
The above function will return True if the Actor Form you pass in is over encumbered, or return False if they are not.
Example:
<source lang="papyrus">
if IsOverEncumbered((Game.GetPlayer()))
  Debug.Trace("Player should drop some items, they're currently weighed down")
endif
</source>
</source>


== See Also ==
== See Also ==
*[[Actor Script]]
*[[Actor Script]]

Latest revision as of 10:38, 3 August 2018

Member of: Actor Script (Requires SSE 1.5.3)

Returns if the actor is currently over-encumbered.

Syntax[edit | edit source]

bool Function IsOverEncumbered() native

Parameters[edit | edit source]

None

Return Value[edit | edit source]

True if the actor is over-encumbered

Examples[edit | edit source]

if (Game.GetPlayer().IsOverEncumbered())
  Debug.Trace("Player should drop some items, they're currently weighed down")
endIf

Using IsOverEncumbered in Skyrim Classic[edit | edit source]

Bool Function IsOverEncumbered(Actor akActor)
  if akActor.GetActorValue("InventoryWeight") > akActor.GetActorValue("CarryWeight")
    Return True
  else
    Return False
  endif
EndFunction

The above function will return True if the Actor Form you pass in is over encumbered, or return False if they are not. Example:

if IsOverEncumbered((Game.GetPlayer()))
  Debug.Trace("Player should drop some items, they're currently weighed down")
endif

See Also[edit | edit source]