Hello. I'm wondering if there's a way to check what a player has in a certain attribute and then trigger something because of that. Like if intelligence is over 7, display some text.
To get a players attribute (in story editor) you can use the query CharacterGetAttribute (or in charScript with CharacterGetStat) but this is only a request for that attribute value. The real issue here is when do you trigger the look-up. You could have it check every N seconds (have a repeating timer). It would be better though to find another event that might be the trigger. ie: ability or potion that increases the stat is used, or CharacterLeveledUp (Osiris event).
The function looks pretty weird, CharacterGetAttribute([in](Character)_Character,[in](STRING)_Attribute,[out](INTEGER)_Value)
Never seen those [in] and [out] things, also what's the integer supposed to be?
Another thing i don't get is how to set up the actual code, can i do something like :
variable = CharacterGetAttribute(CHARACTER_MalePlayer_001, "Intelligence", _valee)
IF
variable > 7
THEN
code
?
[in] are the input values, and [out] is variable the result is output to
So you would want
IF
<some Event>
AND
CharacterGetAttribute(CHARACTER_MalePlayer_001, "Intelligence", _value)
AND
_value > 7
THEN
<step 3: profit>
Btw you
need an Event after the IF (before the first and) and those highlight as purple. And the following code block is
only executed when the event occurs.