I'm trying to use the setStat function in the plugin based on
the documentation here, but it doesn't seem to work. For example say in the Steam stat config, the API name for the stat is "name", I tried a bunch of variations of the code in the script input, such as:
greenworks.setStat(name, 1)
greenworks.setStat('name', 1)
greenworks.setStat("name", 1)
greenworks.setStat(name, 1);
greenworks.setStat('name', 1);
etc
None of these seem to affect the progress stat on the Steam Achievements page, but I'm not familiar with scripting so I might be missing something. I'm pretty sure I configured everything right, because the activateAchievement and clearAchievement functions grant/removes the achievement just fine. And while I'm asking, is there a way I can increase the stat by 1 instead of setting a specific value? Thanks in advance!
EDIT: Solved! Turns out I needed to change greenworks to OrangeGreenworks, and define the stat name with a variable first (i.e. name = "statname"). In case anyone else needs the script for increasing the stat by 1 instead of setting a specific value, here it is:
name = "statname"
value = OrangeGreenworks.getStatInt(name) + 1
OrangeGreenworks.setStat(name, value)