SaveMaxValue should be equal to the highest value possible for that given thing. For example, if you have 10 savable items in the game, and their values range from 1 to 10, then the SaveMaxValue for that should be 10.
Also, why did you redesign the AutoSave trigger to work like that? All of the variables inside use the Player number of SaveLoadEvent_Player, so there's no reason to have any redundancy. You can Pick through every player, Set them as SaveLoadEvent_Player, and Run this trigger.
- Loop - Actions
- Set Variable SaveLoadEvent_Player = (Picked player)
- Trigger - Run AutoSave (ignoring conditions)
I recommend using a Player Group that only contains active USERS and not computers/leavers.
Anyway, this Save/Load system seems to have issues all of the time. It just doesn't want to play nice and there's a limit to how much you can save.
I think you're misunderstanding a lot of things going on here. SaveMaxValue should not be 100000 for everything, because most things won't even come close to that value. It's not the SaveCount that it's the max value of, it's the thing that you're saving (Skins, Items, Kills, Gold, etc). Also, you should have only one Save trigger and it needs to contain every value that you want to Save. You can't split the Saves up into different sections and Save some stuff now and some stuff later. It's either ALL or nothing.
You can ALWAYS get access to the Active Players and their Player Numbers. There's never a time that you cannot do this. You just have to use a Pick Every Player action and Set SaveLoadEvent_Player = (Picked player), then run AutoSave.
You shouldn't be checking the Player slot status of your players every single time you run Calculate. At the start of the game you want to Add all of the active Users to a Player Group. Then when a Player leaves the game you remove them from said Player Group. The result will be a Player Group that gives you access to all of the active users at any given moment.
- Set Active Players
- Events
- Time - Elapsed game time is 0.50 seconds
- Conditions
- Actions
- Set VariableSet ActivePlayers = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)).)
- Player Leaves
- Events
- Player - Player 1 (Red) leaves the game
- Player - Player 2 (Blue) leaves the game
- Player - Player 3 (Teal) leaves the game
- Conditions
- Actions
- Player Group - Remove (Triggering player) from ActivePlayers.
Now you can save all active players whenever you want using these actions:
Or if you want to save a specific player, skip the Pick Every Player action and reference them directly.
- Actions
- Player Group - Pick every player in ActivePlayers and do (Actions)
- Loop - Actions
- Set VariableSet SaveLoadEvent_Player = (Picked player)
- Trigger - Run AutoSave <gen> (ignoring conditions)
You're making things WAY harder on yourself by not using the Pick Every Player action. You should be using Pick Every Player in ActivePlayers in most if not all of your triggers that reference more than 1 Player at a time. You should rarely need to reference a specific player. That's the beauty of an Array and this Player Number design, one Action can work for ALL of your players.
When you run into situations where one Array [Index] isn't good enough because you need Variables like these:
You can use Hashtables which enable you much greater control. I recommend taking a look into them.
- Set Variable PlayerItem1[X] = Some value
- Set Variable PlayerItem2[X] = Some value
- Set Variable PlayerItem3[X] = Some value
Why would their Max value be 1? There's certainly more than 1 Skin and more than 1 Item. The Max value is a limit to how much of that thing you can save, so if you Set the Max value of Gold to 5000, then the player can only save up to 5000 gold. Even if the player had 99999 Gold, the system would only allow them to Save 5000.yeah making it harder on my self than it has to be, makes sense, anywho i did set the item and skin int max to 1, but it then gives u 100000 score for some reason when u load
Why would their Max value be 1? There's certainly more than 1 Skin and more than 1 Item. The Max value is a limit to how much of that thing you can save, so if you Set the Max value of Gold to 5000, then the player can only save up to 5000 gold. Even if the player had 99999 Gold, the system would only allow them to Save 5000.
I think you're still misunderstanding how this stuff works. It took me a while to wrap my head around it all but eventually I got it. I'm sure if you keep trying you'll eventually get it working as well. Keep in mind that this Save and Load system has caused many headaches before, I've helped many people use it before and they seem to always have issues. It could be a Reforged thing, maybe it used to work properly in older versions.
My friend, read my explanation as to how SaveMaxValue works. It's a limit to the VALUE of your SaveValue variable.as theres 10 different skins, all different intergers, and u can only unlock skin once therefore max u be getting is 1
basically if u unlock a skin, it sets ur skin int to 1, so confirm u unlocked the skin, so all it needs to save is 1 for unlocked 0 for locked
is no reason to go above 1 as u can only unlock that skin id once.
also not a reforged thing, it works perfectly in my other map still and that was made in reforged.
My friend, read my explanation as to how SaveMaxValue works. It's a limit to the VALUE of your SaveValue variable.
So using Skins as an example:
SaveMaxValue should be 3 because there's 3 total Skins.
- Set Variable Skin[1] = X
- Set Variable Skin[2] = X
- Set Variable Skin[3] = X
It doesn't matter if a player can only unlock 1 skin, the save system doesn't care about that. All it wants to do is save these integers in a text file. All SaveMaxValue does is limit the size of these Integers.
That makes sense. There's always a lot of confusion surrounding this system.@Uncle - yeah the issue was I didn’t have the load code in reverse dunno why took me so many hours to remember that.
And for Casting Unit, I can’t change the wait time without it it doesn’t reset the skin, so just change that to Triggering Unit I Assume by your post.