ScriptCB_GetDifficulty() return value?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

ScriptCB_GetDifficulty() return value?

Post 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?
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: ScriptCB_GetDifficulty() return value?

Post 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
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: ScriptCB_GetDifficulty() return value?

Post by kinetosimpetus »

Tried all of those suggestions, it still returned 2 every time.
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: ScriptCB_GetDifficulty() return value?

Post 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
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: ScriptCB_GetDifficulty() return value?

Post by kinetosimpetus »

I'm not trying to adjust the AI difficulty, I'm trying to detect the profile difficulty setting.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: ScriptCB_GetDifficulty() return value?

Post by Marth8880 »

OOOOOOOHHHHHH, do you want to set the difficulty then based on the profile difficulty? :o If not, then hmm...
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: ScriptCB_GetDifficulty() return value?

Post 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.
Post Reply