Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

SetStatsToKeep not works for me

Here you can find answered ScriptAPI topics.
Forum rules
By using the forum you agree to the following rules.
Post Reply
kirill240
Fighter
Fighter
Posts: 18
Joined: Mon Jan 09, 2017 1:01 pm
SFD Account: Mr.A woman's heart

SetStatsToKeep not works for me

Post by kirill240 » Wed Jul 03, 2019 10:06 am

SetStatsToKeep not working :(
I'm trying StatsToKeepEnabled = true, no changes.
After the gameover, the map is reloaded. And weapons, life is not saved. How to make it works?
And why i can create weapon class with custom Ammo, but can't assign or give it to player?
Last edited by JakSparro98 on Wed Jul 03, 2019 6:58 pm, edited 1 time in total.
Reason: Slightly changed title
0 x

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 26

Post by JakSparro98 » Wed Jul 03, 2019 4:14 pm

kirill240 wrote:
Wed Jul 03, 2019 10:06 am
SetStatsToKeep not working :(
I'm trying StatsToKeepEnabled = true, no changes.
After the gameover, the map is reloaded. And weapons, life is not saved. How to make it works?
And why i can create weapon class with custom Ammo, but can't assign or give it to player?
I'm done some tests and it seems that StatsToKeep is a feature only applied when setting map type on survival.
0 x

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1885
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 34

Post by Gurt » Wed Jul 03, 2019 10:05 pm

It only works for Campaigns and Survival type maps.
I will update the summary in the RestAPI to reflect this better:

StatsToKeepEnabled:
Gets or Sets if stats should be kept when progressing on the same (map) playthrough.
This only applies to survival (clearing a wave or retrying a wave) and campaign (progressing to a new map part or dying).
0 x
Gurt

Post Reply