Clan TMMM
Would you like to react to this message? Create an account in a few clicks or log in to continue.


The official site of Clan TMMM
 
HomeHomeSearchLatest imagesRegisterLog in


Latest topics
» Kevkevqaz is back
Graveyard Library I_icon_minitimeby Eat_bacon_daily Wed Feb 22, 2023 7:22 pm

» Hey whats up
Graveyard Library I_icon_minitimeby seankly Tue Feb 04, 2020 10:32 pm

» Gotta click fast - WC3 Mazing #mildlyinteresting
Graveyard Library I_icon_minitimeby hoffmann Wed Jun 21, 2017 10:28 pm

» I'm getting married and you guys are invited
Graveyard Library I_icon_minitimeby Achilles.42 Wed Sep 07, 2016 11:00 am

» Server Photo Album 1
Graveyard Library I_icon_minitimeby Pat1487 Sat Aug 06, 2016 5:28 pm

» Legacy of The Void Beta
Graveyard Library I_icon_minitimeby Achilles.42 Sun Oct 18, 2015 3:21 am

» Hey guys!!!
Graveyard Library I_icon_minitimeby Eat_bacon_daily Fri Oct 16, 2015 11:20 pm

SC2 Links
SC2 Challenge/Tourney Info

Official SC2 Forums

SC2 Curse

SC2Mapster

Team Liquid

SC2 Replayed

SC2 Strategy
WC3 Links
Clan_TMMM[Host] Info

WC3 Challenge/Tourny Rules

Epicwar
Poll
What game does everyone play now?
Starcraft 2
Graveyard Library I_vote_lcap26%Graveyard Library I_vote_rcap
 26% [ 8 ]
Warcraft 3
Graveyard Library I_vote_lcap35%Graveyard Library I_vote_rcap
 35% [ 11 ]
League of Legends
Graveyard Library I_vote_lcap19%Graveyard Library I_vote_rcap
 19% [ 6 ]
World of Warcraft
Graveyard Library I_vote_lcap0%Graveyard Library I_vote_rcap
 0% [ 0 ]
Diablo 2
Graveyard Library I_vote_lcap0%Graveyard Library I_vote_rcap
 0% [ 0 ]
No games at all
Graveyard Library I_vote_lcap10%Graveyard Library I_vote_rcap
 10% [ 3 ]
Other game not listed
Graveyard Library I_vote_lcap10%Graveyard Library I_vote_rcap
 10% [ 3 ]
Total Votes : 31
Transparency

 

 Graveyard Library

Go down 
2 posters
AuthorMessage
SuPa_Link
Recruit
Recruit




Graveyard Library Empty
PostSubject: Graveyard Library   Graveyard Library I_icon_minitimeMon Nov 30, 2009 11:45 am

So I decided to help nomorholywar with his map and told him I would make him a graveyard system.

How it works:
It creates all the units in the map at once, and stores them in a variable. They are then killed and the corpses are stored somewhere in the map. (May be advised to do it one group of units at a time) When a new unit is needed it moves the first dead unit in the array to the spawn point, and is resurrected by a dummy unit.

Pros:
Your only using the set amount of units instead of creating more and more. The reason for this is because every time a unit is created it uses memory. When the unit is destroyed the memory is still there being used. (Less lag)

Cons:
A lag spike at beginning of game. You have to create them at some point.

Explanation of functions...
init: Creates all the units and dummy casters.
RecycleUnit: Creates an already recycled unit for you.
GarbageUnit: Gets rid of unit in the array and sets it to null. (Free up some space)
GarbageGroup: Gets rid of an entire group of units for player and sets them to null. (Free up some space)

Back to top Go down
nomorholywar
Sergeant
Sergeant




Graveyard Library Empty
PostSubject: Re: Graveyard Library   Graveyard Library I_icon_minitimeMon Nov 30, 2009 2:37 pm

hey supastar.

thanks ill check it out today
Back to top Go down
SuPa_Link
Recruit
Recruit




Graveyard Library Empty
PostSubject: Re: Graveyard Library   Graveyard Library I_icon_minitimeMon Nov 30, 2009 9:47 pm

That is probably, not certain, the best way to do that. The other graveyard systems need all units to be alive at one point. Which that can get terrible with 6000 units!
Back to top Go down
Sponsored content





Graveyard Library Empty
PostSubject: Re: Graveyard Library   Graveyard Library I_icon_minitime

Back to top Go down
 
Graveyard Library
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Clan TMMM :: Warcraft 3 :: WC3 Tutorials and Help-
Jump to: