• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Disable Load/Save

Status
Not open for further replies.
Level 17
Joined
Jun 2, 2009
Messages
1,193
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,232
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 26
Joined
Nov 18, 2012
Messages
1,913
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