HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dummy Unit Recycling - what is the best/most efficient way?

04-11-2009, 02:08 PM#1
Vestras
So I'm making a map heavily based on dummy units. I want to keep the amount of dummies constant so the game won't get sudden shocks of shitloads of dummies being created.

Now, I know xe has a dummy recycler, and I know moyack made one, but I'd like to make my own.

So therefore I'm asking you: what would be the most efficient and overall the best way to recycle dummy units? My idea was to create maybe like 500 dummy units at map init and then create a function to return the unit... bla bla, let me illustrate it:

Expand JASS:

Will that work? If not, any help?
04-11-2009, 02:26 PM#2
akolyt0r
take a look at xe's xecast or xefx...
04-11-2009, 02:31 PM#3
Vestras
Quote:
Originally Posted by akolyt0r
take a look at xe's xecast or xefx...

I did, didn't really help me.
04-11-2009, 02:33 PM#4
Captain Griffen
What are you going to do with the dummies?

Missile system - stack, create if stack empty, linked list
Cast without DoT - single caster
Cast with DoT - caster for each player
04-11-2009, 02:47 PM#5
Vestras
Quote:
Originally Posted by Captain Griffen
What are you going to do with the dummies?

Missile system - stack, create if stack empty, linked list
Cast without DoT - single caster
Cast with DoT - caster for each player

Most of them are just used as projectiles, but some of them (very few) are used as dummies for 'attaching' lightning to and some for facing (SetUnitLookAt)
04-12-2009, 08:39 PM#6
Seshiro
So called a dummy recycling system...I made one, thats very easy weesy to use ;)
Expand JASS:

It uses a similar algorithm to all other recycling systems like TimerUtils, but with the postivie thing called group ;) mybe, i have to add something like a group refresher or so^^ and mybe some day, I'll gotta add a function which checks if the released dummy is still a usable dummy ;) to cusomize it a bit^^

Greez