UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

need help bad

broken avatar :(
Created 6 years ago
by AllMoDs
0 Members and 1 Guest are viewing this topic.
1,373 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 September 2015
Last active: 4 days ago
Posts
256
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Signature
×
AllMoDs's Groups
does anyone know how to get the save game to work
I got the menu to show up of all your saved games on the main menu to work
I'm trying to save devars that are set to keep track of how many gobblegums you have
I want to do it in the save so if you close the game or play another map and come back you can load your gum and how many liquid divinium you have back up
Marked as best answer by AllMoDs 6 years ago
broken avatar :(
×
broken avatar :(
Location: usEarth
Date Registered: 30 July 2015
Last active: 3 years ago
Posts
118
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Current project: Afterlife
Signature
"The only time you should look back, is to see how far you've come."
Afaik you use player stats to save information from game to game, not dvars. An example I found was from death_reaper's script for weapon lockers, https://ugx-mods.com/forum/index.php?topic=8448.0
Code Snippet
Plaintext
get_stored_gun()
{
wait 1;
self.stored_gun_ammo = self GetStat(3007);
self.stored_ammo_clip = self GetStat(3008);
self.has_stored_weapon = self GetStat(3009);
keys = GetArrayKeys( level.zombie_weapons );
self.stored_weapon = keys[ self GetStat( 3006 ) ];
}
Here he grabbed and set info.

Code Snippet
Plaintext
user SetStat( 3007, user.stored_gun_ammo );
user SetStat( 3008, user.stored_ammo_clip );
user.has_stored_weapon = 1;
user SetStat( 3009, 1 );
And here he set the weapon and ammo count etc. to the same stat.
Not sure how you have your entire GG setup, but hopefully it's helpful
Last Edit: December 04, 2017, 05:53:59 pm by StupidEdits
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 3 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Signature
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
to add to StupidEdits statement, DidUknowiPwn listed all of the available stat slots that are free to use. This can be found here: https://ugx-mods.com/forum/index.php/topic,11489.msg127382.html#msg127382

 
Loading ...