Difference between revisions of "GetCreatureProperty"
From Dragon Age Toolset Wiki
BryanDerksen (Talk | contribs) (looks okay, removing tag, formatting, adding a link) |
m (Fixing parameters) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{dafunction | {{dafunction | ||
− | |name=GetCreatureProperty | + | |name = GetCreatureProperty |
− | |brief= | + | |brief = Returns the value of the specified property from a creature. |
− | |param1type=object | + | |param1type = object |
− | |param1name=oCreature | + | |param1name = oCreature |
− | |param1desc=the creature whose | + | |param1desc = the creature whose property is being requested |
− | |param1default= | + | |param1default = |
− | |param2type=int | + | |param2type = int |
− | |param2name=nProperty | + | |param2name = nProperty |
− | |param2desc=the property | + | |param2desc = the property whose value is being requested |
− | |param2default= | + | |param2default = |
− | |param3type=int | + | |param3type = int |
− | |param3name=nValueType | + | |param3name = nValueType |
− | |param3desc=the type of value | + | |param3desc = the type of property value to be returned (TOTAL, BASE, CURRENT, MODIFIER) |
− | |param3default=PROPERTY_VALUE_TOTAL | + | |param3default = PROPERTY_VALUE_TOTAL |
− | |returntype=float | + | |returntype = float |
− | |returndesc=Returns | + | |returndesc = Returns a creature's property value |
− | |sourcefile=script.ldf | + | |sourcefile = script.ldf |
− | |sourcemodule= | + | |sourcemodule = |
}} | }} | ||
− | |||
== Description == | == Description == | ||
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. --> | <!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. --> | ||
− | Get oCreature's | + | Get oCreature's property value. |
− | Property types have slightly different definitions of each of the 4 value types | + | Property types have slightly different definitions of each of the 4 value types: |
− | *A SIMPLE or DERIVED property has a BASE and TOTAL value as the same number and doesn't have CURRENT or MODIFIER. | + | * A SIMPLE or DERIVED property has a BASE and TOTAL value as the same number and doesn't have CURRENT or MODIFIER. |
− | *An ATTRIBUTE property has a BASE value and a MODIFIER value. Its TOTAL value is the clamped (between its min and max) sum of the BASE | + | * An ATTRIBUTE property has a BASE value and a MODIFIER value. Its TOTAL value is the clamped (between its min and max) sum of the BASE plus the MODIFIER. |
− | *A DEPLETABLE property is similar to an ATTRIBUTE property but in addition has a CURRENT value, which must be between the property min and the TOTAL value. | + | * A DEPLETABLE property is similar to an ATTRIBUTE property but in addition has a CURRENT value, which must be between the property min and the TOTAL value. |
Properties are defined in [[Properties.xls]]. | Properties are defined in [[Properties.xls]]. | ||
− | |||
<!-- == Remarks == --> | <!-- == Remarks == --> | ||
<!-- This section contains additional comments, observations and known issues. --> | <!-- This section contains additional comments, observations and known issues. --> | ||
− | |||
<!-- == Examples == --> | <!-- == Examples == --> | ||
<!-- This section contains examples transcluded from the snippet library. --> | <!-- This section contains examples transcluded from the snippet library. --> | ||
− | |||
== See also == | == See also == | ||
<!-- This section contains links to articles, functions or constant groups. --> | <!-- This section contains links to articles, functions or constant groups. --> | ||
+ | * [[SetCreatureProperty]] | ||
+ | * [[UpdateCreatureProperty]] | ||
+ | * [[PROPERTY_VALUE_*]] | ||
− | [[ | + | [[Category:Creature functions]] |
− | + | [[Category:Stats functions]] | |
− | [[Category: Stats functions]] | + |
Latest revision as of 14:02, 11 January 2015
Returns the value of the specified property from a creature.
- Parameters:
- oCreature
- the creature whose property is being requested
- nProperty
- the property whose value is being requested
- nValueType
- the type of property value to be returned (TOTAL, BASE, CURRENT, MODIFIER)
- Returns:
- Returns a creature's property value
- Source:
- script.ldf
Description
Get oCreature's property value.
Property types have slightly different definitions of each of the 4 value types:
- A SIMPLE or DERIVED property has a BASE and TOTAL value as the same number and doesn't have CURRENT or MODIFIER.
- An ATTRIBUTE property has a BASE value and a MODIFIER value. Its TOTAL value is the clamped (between its min and max) sum of the BASE plus the MODIFIER.
- A DEPLETABLE property is similar to an ATTRIBUTE property but in addition has a CURRENT value, which must be between the property min and the TOTAL value.
Properties are defined in Properties.xls.