Post: Getting current challenge progress
01-05-2016, 02:37 AM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); I need a function which returns the number of times I completed a certain challenge. For example the master cook challenge which says that you have to kill 50 enemies with a cooked grenade. The stat name for this is
    kill_with_cooked_grenade

I can successfully add to that stat as follows:
    self addPlayerStat("kill_with_cooked_grenade", 1);

Now I want to figure out the total value of that stat using code. I tried using
    self.pers["kill_with_cooked_grenade"]
but it returned undefined therefore the variable doesn't exist. Also I tried
    self getDStat("ChallengeStats", "kill_with_cooked_grenade")
but the result was undefined as well. Overall I believe that getDStat() is right however, I don't exactly know which arguments to give.

Any ideas?

I need this in order to know when to stop adding towards the stat. A getPlayerStat() function doesn't exist though.
(adsbygoogle = window.adsbygoogle || []).push({});
01-05-2016, 10:10 AM #2
oCmKs_4_LiFe
< ^ > < ^ >
sorry i no idea bro
01-05-2016, 05:11 PM #3
BullyWiiPlaza
Climbing up the ladder
Originally posted by LiFe View Post
sorry i no idea bro

Well, I realized that adding 1 at a time multiple times is working fine so I don't really need this solved anymore but it would be cool to know either way. Smile
01-09-2016, 08:11 PM #4
SyGnUs
Give a F*** About Your Lifestyle
Originally posted by BullyWiiPlaza View Post
I need a function which returns the number of times I completed a certain challenge. For example the master cook challenge which says that you have to kill 50 enemies with a cooked grenade. The stat name for this is
    kill_with_cooked_grenade

I can successfully add to that stat as follows:
    self addPlayerStat("kill_with_cooked_grenade", 1);

Now I want to figure out the total value of that stat using code. I tried using
    self.pers["kill_with_cooked_grenade"]
but it returned undefined therefore the variable doesn't exist. Also I tried
    self getDStat("ChallengeStats", "kill_with_cooked_grenade")
but the result was undefined as well. Overall I believe that getDStat() is right however, I don't exactly know which arguments to give.

Any ideas?

I need this in order to know when to stop adding towards the stat. A getPlayerStat() function doesn't exist though.


The arguments are basically like this from what I can tell -

getDStat( baseName, item, dataName, statName, statType );

Looking in the original scripts is your best though for it.
01-09-2016, 08:36 PM #5
BullyWiiPlaza
Climbing up the ladder
Originally posted by SyGnUs View Post
The arguments are basically like this from what I can tell -

getDStat( baseName, item, dataName, statName, statType );

Looking in the original scripts is your best though for it.

I did look but I didn't quite figure it out so how would you set each of the arguments to retrieve the value of a challenge data?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo