Basically, you want to avoid the player saving and loading by the classic way of opening the menu and clicking Save/Load, right?
Well, that's easy, I did this in my proyect. You have to detect when a player tries to save or load, then you have to show a dialog in screen. This will interrupt the saving or the loading. Then, you have to remove that dialog (otherwise, it'll interrupt the gameplay).
This is the trigger:
To avoid loading is basically the same, you just have to change the event.
- Avoid Saving
- Events
- Game - The game is about to be saved
- Conditions
- Actions
- Dialog - Show YOUR_DIALOG for Player 1 (red)
- Wait 0.00 seconds
- Dialog - Hide YOUR_DIALOG for Player 1 (red)
I also asked this once in the forums.
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/possible-prevent-player-saving-218205/
Regards
Simply check if the "Player is playing" and "Playerslot equal to Player" not Computer..
Just do a check with those two things at beginning with all of your players (so if you use 10 Human players you have to go through all)
While checking you could easily store true values within a variable. So if Player 1 equal to is playing and Playerslot equal to Player/used then Set Variable XYZ + 1
At the end you just check if the variable XYZ is higher than 1 (means more than 1 player) else you can simply disable all save/load triggers.. that's all
basicly it's something like this, you can adjust it, and add the other players.. I've just used Player 1 and 2 for showing you how it works, just add the other players if needed.
- Disable SaveLoad
- Events
- Map initialization
- Conditions
- Actions
- -------- Check all Players, and add them to a variable to get total players in Game --------
- -------- You need both conditions, else Computer Slots will be counted, too --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Player 1 (Red) controller) Equal to User) and ((Player 1 (Red) slot status) Equal to Is playing)
- Then - Actions
- Set PlayersInGame = (PlayersInGame + 1)
- Else - Actions
- Do nothing
- -------- ------------------------------------ --------
- -------- you can either use multiple IF/Then/Else or this simple version for checking --------
- -------- ------------------------------------ --------
- If (((Player 2 (Blue) controller) Equal to User) and ((Player 2 (Blue) slot status) Equal to Is playing)) then do (Set PlayersInGame = (PlayersInGame + 1)) else do (Do nothing)
- -------- ------------------------------------ --------
- -------- if we only have 1 player (or less) we disable save/load functions --------
- -------- ------------------------------------ --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- PlayersInGame Less than or equal to 1
- Then - Actions
- Trigger - Turn off SaveTrigger <gen>
- Trigger - Turn off LoadTrigger <gen>
- Else - Actions
- Do nothing