Page 1 of 1

ScriptCB_GetDifficulty() return value?

Posted: Tue Nov 13, 2012 2:21 am
by kinetosimpetus
How does ScriptCB_GetDifficulty() work?

I print the result of the function to the debug log, and it's always 2, whether I play Normal or Elite...

Code: Select all

print("Difficulty is " .. ScriptCB_GetDifficulty()) --always prints "Difficulty is 2"
What am I doing wrong that makes it not useful?

Re: ScriptCB_GetDifficulty() return value?

Posted: Wed Nov 14, 2012 1:56 am
by Marth8880
Try this:

Code: Select all

local GetDifficulty = ScriptCB_GetDifficulty()
print("Difficulty is " .. GetDifficulty)
I have a weird feeling though that some value may need to go between the parentheses in ScriptCB_GetDifficulty(), though... Maybe you could try a team ID or something? :o

Re: ScriptCB_GetDifficulty() return value?

Posted: Wed Nov 14, 2012 2:51 pm
by kinetosimpetus
Tried all of those suggestions, it still returned 2 every time.

Re: ScriptCB_GetDifficulty() return value?

Posted: Thu Nov 15, 2012 7:18 am
by Locutus
Have you tried changing the AI difficulty?
You could try sth. like SetAIDifficulty(-2, 3) and see if that affects your return value.

http://www.secretsociety.com/forum/down ... culty.html

Re: ScriptCB_GetDifficulty() return value?

Posted: Thu Nov 15, 2012 11:42 am
by kinetosimpetus
I'm not trying to adjust the AI difficulty, I'm trying to detect the profile difficulty setting.

Re: ScriptCB_GetDifficulty() return value?

Posted: Thu Nov 15, 2012 4:14 pm
by Marth8880
OOOOOOOHHHHHH, do you want to set the difficulty then based on the profile difficulty? :o If not, then hmm...

Re: ScriptCB_GetDifficulty() return value?

Posted: Thu Nov 15, 2012 4:51 pm
by kinetosimpetus
No, I don't want to change the AI difficulty level, just get the profile setting so I can do other unrelated things only on Elite difficulty.