• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Problem with map

Status
Not open for further replies.
Level 7
Joined
Jul 20, 2009
Messages
295
I am having a problem with my map where it takes ages to load/save and load to play. It only has a size of 3MB while I even opened other people's maps and had a size of 6 MB which was faster than opening my map. A friend of mine said it maybe has something to do with the Map Script. I asked him what is that he told me that he was not sure. So.. if anyone knows the reason why "my" map is taking too long to open, then please help.

[Edit] - Oh also, in my map you start by choosing a hero, once a player chooses, it takes ~2 minutes for the game to unfreeze then create the hero... And about my map, it takes like 3 minutes to load to play in WC3FT.

Thank you.
+Reputation for the helper.
 
Level 17
Joined
Jun 28, 2008
Messages
776
That number of units and destructibles won't cause a problem. I seen maps with allot more and no long load.

How many Initialization triggers do you have? Try to use only 1. If you Initialize allot of variables in the Initialization trigger, it will increase loading time. The reason for the freezing when you pick a hero might be due to a very long loop with no wait. Or that a unit is created outside of the map boundries (If a unit is created outside the boundries your map might crash or freeze until the unit come beck in)
 
Level 7
Joined
Jul 20, 2009
Messages
295
  • Selecting Hero
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Buying unit)) Equal to Hero Selecter
    • Actions
      • Unit - Remove (Buying unit) from the game
      • Game - Display to (Player group((Owner of (Buying unit)))) the text: (You chose |cffffcc00 + ((Proper name of (Sold unit)) + |r! |cffff0000You can't load now.|r))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Buying unit)) is an ally of Player 1 (Red)) Equal to True
        • Then - Actions
          • Unit - Move (Sold unit) instantly to (Center of Team 1 <gen>)
          • Set Hero[(Player number of (Owner of (Buying unit)))] = (Sold unit)
          • Set Player_Hero_Array[(Player number of (Owner of (Buying unit)))] = (Sold unit)
          • Set Hero_Selected[(Player number of (Owner of (Buying unit)))] = True
          • Camera - Pan camera for (Owner of (Buying unit)) to (Position of Hero[(Player number of (Owner of (Buying unit)))]) over 0.00 seconds
          • Selection - Select (Sold unit) for (Owner of (Buying unit))
        • Else - Actions
          • Unit - Move (Sold unit) instantly to (Center of Team 2 <gen>)
          • Set Hero[(Player number of (Owner of (Buying unit)))] = (Sold unit)
          • Set Player_Hero_Array[(Player number of (Owner of (Buying unit)))] = (Sold unit)
          • Set Hero_Selected[(Player number of (Owner of (Buying unit)))] = True
          • Camera - Pan camera for (Owner of (Buying unit)) to (Position of Hero[(Player number of (Owner of (Buying unit)))]) over 0.00 seconds
          • Selection - Select (Sold unit) for (Owner of (Buying unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Buying unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Trigger - Turn off NPS Load P1 <gen>
          • Trigger - Turn on NPS Save P1 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Buying unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • Trigger - Turn off NPS Load P2 <gen>
          • Trigger - Turn on NPS Save P2 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Buying unit)) Equal to Player 3 (Teal)
        • Then - Actions
          • Trigger - Turn off NPS Load P3 <gen>
          • Trigger - Turn on NPS Save P3 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Buying unit)) Equal to Player 4 (Purple)
        • Then - Actions
          • Trigger - Turn off NPS Load P4 <gen>
          • Trigger - Turn on NPS Save P4 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Buying unit)) Equal to Player 5 (Yellow)
        • Then - Actions
          • Trigger - Turn off NPS Load P5 <gen>
          • Trigger - Turn on NPS Save P5 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Buying unit)) Equal to Player 6 (Orange)
        • Then - Actions
          • Trigger - Turn off NPS Load P6 <gen>
          • Trigger - Turn on NPS Save P6 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Buying unit)) Equal to Player 7 (Green)
        • Then - Actions
          • Trigger - Turn off NPS Load P7 <gen>
          • Trigger - Turn on NPS Save P7 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Buying unit)) Equal to Player 8 (Pink)
        • Then - Actions
          • Trigger - Turn off NPS Load P8 <gen>
          • Trigger - Turn on NPS Save P8 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Buying unit)) Equal to Player 9 (Gray)
        • Then - Actions
          • Trigger - Turn off NPS Load P9 <gen>
          • Trigger - Turn on NPS Save P9 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Buying unit)) Equal to Player 10 (Light Blue)
        • Then - Actions
          • Trigger - Turn off NPS Load P10 <gen>
          • Trigger - Turn on NPS Save P10 <gen>
        • Else - Actions
      • Unit - Create 1 for (Owner of (Buying unit)) at (Position of (Buying unit)) facing Default building facing degrees
      • Set Backpack[(Player number of (Owner of (Buying unit)))] = (Last created unit)
      • -------- NO SINGLE PLAYER HERE WHEN FINISHED! --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • No_Single_Player Less than or equal to 1
        • Then - Actions
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Game - Defeat (Picked player) with the message: NO SINGLE PLAYER!
          • Skip remaining actions
        • Else - Actions
  • Create Starting Items
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Entering unit)) Equal to
              • (Unit-type of (Entering unit)) Equal to
        • Then - Actions
          • Hero - Create |cffEC9900Normal Sword|r and give it to (Entering unit)
          • Unit - Set level of Delay (Skill) Weapon for (Entering unit) to 33
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Entering unit)) Equal to
              • (Unit-type of (Entering unit)) Equal to
        • Then - Actions
          • Hero - Create |cffEC9900Normal Axe|r and give it to (Entering unit)
          • Unit - Set level of Delay (Skill) Weapon for (Entering unit) to 42
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Entering unit)) Equal to
              • (Unit-type of (Entering unit)) Equal to
              • (Unit-type of (Entering unit)) Equal to
        • Then - Actions
          • Hero - Create |cffEC9900Normal Wand|r and give it to (Entering unit)
          • Unit - Set level of Delay (Skill) Weapon for (Entering unit) to 46
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Entering unit)) Equal to
        • Then - Actions
          • Hero - Create |cffEC9900Normal Bow|r and give it to (Entering unit)
          • Unit - Set level of Delay (Skill) Weapon for (Entering unit) to 13
          • Hero - Create |cffEC9900Normal Arrows|r [|cffff00001|r] and give it to (Entering unit)
          • Item - Set charges remaining in (Last created item) to 200
        • Else - Actions
There are also some other triggers which runs every second, e.g Setting Camera's Field of View for each Players (Using Integer 1-10) etc.., also every 3 seconds Backpack is moved instantly to the position of hero. (Also using Integer)

Would this create a problem for Selecting Hero to freeze game then unfreeze after 2 mins, also would that affect the time of loading to play?
 
Level 7
Joined
Jul 20, 2009
Messages
295
Anyway, I found out the problem by making copies of my map and deleting thing by thing, for example, delete all trigger, check if still takes to long to load, then delete all Imported Items, and check if it still takes to long to load etc.. until I cam up with that the Abilities that I have in my map are making my map load too long to play. I have 293 Custom Abilities, is that too many? When I delete half of it still takes too long, but the other half makes it okay. I do not know if it is an ability or several ones that are making my map slow or its the number of all the abilities.
 
Status
Not open for further replies.
Top