CharacterGetStat (OUT FLOAT statValue, CHARACTER character, CHARACTERSTAT statType)
Looks pretty self-explanatory, but for the life of me I can't seem to get it to output the value of any stat. Nothing seems to work for characterstat.
So I'm at a bit of a loss here as far as modding goes with the Enhanced Edition. Specifically with how CharacterGetStat() functions. I've been trying to get it to return _Char's Level, but it always seems to return 0.
The long and short of it is that I've attached this bit of code to NPCs and gotten it to fire off any time they take damage but because I can't get CharacterGetStat() to return the value of Level it fires off incorrectly on the first IF statement when somebody level 7 hits it.
[spoiler]
[code]
EVENT OnHitEffect
VARS
CHARACTER:_Char
FLOAT:_Level
ON
OnDamage(_,_,_Char,_)
ACTIONS
CharacterGetStat(_Level, _Char, Level) // Refuses to return any value other than 0. Level, Strength, Intelligence, ActPart nothing works.
CharacterHeal(_Char, _Level) // Always heals for 0% health because CharacterGetStat() always returns 0 for some reason.
IF "c1|c2" // Fires off incorrectly because Level == 0 when Level /should/ equal 7.
IsLessThen(_Level, 5)
IsEqual(_Level, 5)
THEN
CharacterConsume(__Me, damageTestOne)
ELIF "c1&(c2|c3)" // Never actually triggers due to CharacterGetStat() returning Level as 0
IsGreaterThen(_Level, 5)
IsLessThen(_Level, 10)
IsEqual(_Level, 10)
THEN
CharacterConsume(__Me, damageTestTwo)
ENDIF
[/code]
[/spoiler]
I've also been having to use CharacterHeal() as a makeshift debug log in-game to see when things fire off because I can't get DisplayText(), DisplayCombatInfoText(), StatusText(), DebugText(), or CombatLogText() to function correctly.
Any possible insight into how to use those properly or a better way to get some kind of log to debug these things would be fantastic if possible.
Last edited by Aria Boop; 02/12/15 06:40 PM.