Removing Objects?
Moderator: Cheaters
-
- Newcomer
- Posts: 17
- Joined: February 12th, 2011, 8:02 pm
- Title: Just Another Newbie
- Location: Behind You
Removing Objects?
I was wondering this time.... if you can remove all the custom created units in a map a faster way than pressing DELETE all the time or right clicking. It lags when you try to delete a map with a lot of custom units or abilities. Is there a way to remove all of it faster?
You do not have the required permissions to view my awesome signature.
-
- Super Moderator
- Posts: 1943
- Joined: February 3rd, 2009, 11:28 pm
- Been thanked: 1 time
-
- Crusader
- Posts: 4236
- Joined: January 27th, 2007, 4:46 pm
- Location: Greece, Veria
-
- Super Moderator
- Posts: 1943
- Joined: February 3rd, 2009, 11:28 pm
- Been thanked: 1 time
Re: Removing Objects?
Doesn't delete. It just stores them in a different file.
But if you want them all just not visible, then yes that would work.
But if you want them all just not visible, then yes that would work.
-
- Crusader
- Posts: 4236
- Joined: January 27th, 2007, 4:46 pm
- Location: Greece, Veria
-
- Spice Pirate
- Posts: 862
- Joined: January 29th, 2009, 5:35 pm
- Title: LHC
- Location: Canada
Re: Removing Objects?
http://www.eeve.org/board/viewtopic.php?f=23&t=1102
Use that, create this script:
You'll have to change ... to the file name of the map, but that script should remove all custom units from the map.
Use that, create this script:
Code: Select all
Map map = loadMap(...);
for(string s: map.objects){
Wc3obj obj = map.objects[s];
if(!(obj instanceof Unit)) continue;
if(isIdPredefined(s)) continue; //Object is not custom but predefined? then skip!
unset(map.objects[s]);
}
Spoiler: