Edit 16.02: So i've just found out that the code actually works, but instead of:
UnitState.ModifyCurrentStat
there has to be:
UnitState.SetBaseMaxStat
So know I have a question, what are the current stats and what is the difference between them and base stats. My confusion comes from the functions found in XComGameState_Unit.uc:
native function ModifyCurrentStat(ECharStatType Stat, float Delta);
native function SetCurrentStat( ECharStatType Stat, float NewValue );
Any help appreciated, Thanks Original Post: Hello, help needed! I've tried to modify unit stats during a tactical combat by listening to an event of finished movement but even though I got no errors and the code seems to run (checked with `logs) - there is no change in stats. This compiles absolutely fine. If I add logs to tell me the unit current stats and stats after my code - they are the same. Also - I'm editing Aim skill to easiliy test by trying to shoot alien as it's immediate feedback so it's not just that my logs don't show correct stuff. I've also tried some other versions like: or like Teleportation function in XComCheatManager.uc: Of course doesn't make any difference. I'm beginning to think that I can't edit stats while in an EventListenerReturn or can I? This is my first trying UnrealScript and I'm kinda struggling... :ermm: Any help appreciated, Thanks