• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Disable Load/Save

Status
Not open for further replies.
uhm my english is not enough to understand this how can i do that? i want to disable loading my game OR saving my game

i have a campaigns map but some of the players saving their games at the critical situations and loading from the critical position
 
i have a campaigns map but some of the players saving their games at the critical situations and loading from the critical position
So? They are meant to do that and there is no reason to stop people from doing so.

The only reason to disable loading a save game is because your map is using features not supported by WC3 save/load such as array index 8191 and periodic timers so loading would bug the map.
 
There are game load and game save events in triggers, if they work at multiplayer, you can finish game if the game is a loaded game.
 
No, but you can disable load game by simply booting everyone to menu in response to the load game event.
Uh? you can prevent saving the map instead of disabling load game by simply doing a crash:
  • test
    • Events
      • Game - The game is about to be saved
    • Conditions
    • Actions
      • Custom script: call SetPlayerStateBJ( ConvertedPlayer(17), PLAYER_STATE_RESOURCE_GOLD, 750 )
 
You can use this snippet:
https://www.hiveworkshop.com/forums/jass-resources-412/snippet-preventsave-158048/

To use it in your map:
  • Download JassNewGenPack (check our tools section).
  • Open NewGen WE.exe (JassNewGenPack Editor)
  • Open your map.
  • Create a new trigger. Edit -> Convert to Custom Text.
  • Copy the code in that thread and then paste it there.
  • Save the map, and you should be good to go! Although, you'll have to edit the map in the JNGP Editor from now on.

Alternatively, if you'd like to have a GUI implmentation, simply register the save event, and then display an empty dialog. Run a timer for one second, and then hide the dialog. So it would be something like this:
  • Prevent Save
    • Events
      • Game - The game is about to be saved
    • Conditions
    • Actions
      • Custom script: call DialogDisplay(udg_EmptyDialog, true)
      • Countdown Timer - Start SaveTimer as a One-shot timer that will expire in 0.00 seconds
  • Prevent Save Expire
    • Events
      • Time - SaveTimer expires
    • Conditions
    • Actions
      • Custom script: call DialogDisplay(udg_EmptyDialog, false)
EmptyDialog is a dialog variable without any buttons. SaveTimer is a timer variable. Those custom scripts are the same as "Dialog Show/Hide", but they will apply for all players.

I haven't tested it, but I believe it should work (assuming TriggerHappy's code works).
 
Status
Not open for further replies.
Back
Top