• 🏆 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!

[request]Save disabler

Status
Not open for further replies.
Level 14
Joined
Oct 6, 2008
Messages
759
Can someone show me is there a way to disable saving while playing? I tried with the classic triggers but I guess there is no way to do this with them. I want to disable save for my map and enable it on certain points ingame.
 
Level 6
Joined
Jan 6, 2006
Messages
204
this script should do it's purpose. Make sure you use lastest JassHelper (0.A.2.7)
JASS:
//! zinc

library noSave
{
    dialog d=DialogCreate();
    timer t=CreateTimer();
    
    public boolean allow=false;

    function preventSave()
    {
        if(allow==false)
        {
            DialogDisplay(GetLocalPlayer() , d, true);
            TimerStart(t,0.00,false, function (){
            DialogDisplay(GetLocalPlayer(), d, false);});
        }
    }

    function onInit()
    {
        trigger t=CreateTrigger();
        TriggerRegisterGameEvent(t, EVENT_GAME_SAVE);
        TriggerAddAction(t, function preventSave);
    }

}

//! endzinc
no need to credit

ps: this might look like you can save the game, but due to the dialog warcraft III is not actually saving the map.
To enable saving in your map change the boolean allow to true with event triggers, ect
 
Level 19
Joined
Aug 16, 2007
Messages
881
Can someone show me is there a way to disable saving while playing? I tried with the classic triggers but I guess there is no way to do this with them. I want to disable save for my map and enable it on certain points ingame.

Have you ever searched here? > http://www.hiveworkshop.com/forums/spells.php then should you have found > http://www.hiveworkshop.com/forums/...-disable-game-saving-149329/?prev=r=20&page=2 a prevent save system created by TriggerHappy187.
 
Status
Not open for further replies.
Top