code-disaster / steamworks4j

A thin Java wrapper to access the Steamworks API
https://code-disaster.github.io/steamworks4j/
MIT License
468 stars 64 forks source link

IndicateAchievementProcess not working #98

Closed Superwutz closed 2 years ago

Superwutz commented 3 years ago

Hi guys,

I am trying to bring up a popup indicating achievement process. I made a little function for it:

    public boolean indicateProgress(String name) {
        int curProgress=0;
        int maxProgress=0;
        boolean result = stats.indicateAchievementProgress(name, curProgress, maxProgress);
        System.out.println("Indicating progress for "+name+" ("+curProgress+"/"+maxProgress+")");
        return result;
    }

Both curProgress and maxProgress stay at zero and also the popup does not fire..

code-disaster commented 3 years ago

I think you misunderstood the purpose of this function. You are supposed to provide these parameters, so you need to calculate them by yourself, using your game's values and what you receive from the achievement/stats callbacks.

Also, as far as I remember you may need to call storeStats() right after that to trigger the Steam overlay popup.

Superwutz commented 3 years ago

Ah lol in that case I really misunderstood it. I am going to try it out!