• 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.

Disable Load/Save

Status
Not open for further replies.
Level 18
Joined
Jun 2, 2009
Messages
1,205
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
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
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.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
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.
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,994
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:
http://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.
Top