This unit pool is something like a weighted array for unit types.
What does that mean?
It means you can add different unit types to a unit pool (which acts a bit like an array) and assign them a certain importance (the weight). Then you can randomly get a unit from this unit pool. The more important a unit is the more often it'll be randomed.
This is especially useful for random spawning systems, where you want a certain amount of your spawned units to be of a certain type.
How to use:
Look at the attached map for a small example that showcases all functions.
How to install:
Just open the attached map and copy over the Folder named "Unit Pool".
Got questions, suggestions or found a bug? Do tell me, please.
S3rius, I am working on an arena style map, where the player uses SCVs (or MULEs, haven't decided yet) to spawn units, much like your system. But, with my map, because it's multiplayer, I need it to send the units to different spawns depending on the player who currently has their unit next to the neutral unit. I was wondering if you could help me code, or show me how to create this sort of trigger? (Still new to developing, so sorry if i use the wrong terminology)
Any help would be greatly appreciated, and of course, credit would be given where due if/when the map is available.
I guess what you need to do is implement a spawning system that uses regions and all that good stuff. I'm in no position to test right now, but I'll give it a shot tomorrow! :)
Thank you. :D Someone commented on another post i made Spawning units and minerals and said that i should use an event like "unit enters region" and then the action of "create unit" My only question would be how to make the units go to the corresponding spawn locations for the different players.
Unit Pool
This unit pool is something like a weighted array for unit types.
What does that mean?
It means you can add different unit types to a unit pool (which acts a bit like an array) and assign them a certain importance (the weight). Then you can randomly get a unit from this unit pool. The more important a unit is the more often it'll be randomed.
This is especially useful for random spawning systems, where you want a certain amount of your spawned units to be of a certain type.
How to use:
Look at the attached map for a small example that showcases all functions.
How to install:
Just open the attached map and copy over the Folder named "Unit Pool".
Got questions, suggestions or found a bug? Do tell me, please.
@s3rius: Go
S3rius, I am working on an arena style map, where the player uses SCVs (or MULEs, haven't decided yet) to spawn units, much like your system. But, with my map, because it's multiplayer, I need it to send the units to different spawns depending on the player who currently has their unit next to the neutral unit. I was wondering if you could help me code, or show me how to create this sort of trigger? (Still new to developing, so sorry if i use the wrong terminology)
Any help would be greatly appreciated, and of course, credit would be given where due if/when the map is available.
Btw, the map I'm looking to create, is a spin-off of a CnC3 map (Can be found here: http://forums.mp-gaming.com/thread-2417.html)
@Thrasher25: Go
Wauw, a serious bump you did there :D
I guess what you need to do is implement a spawning system that uses regions and all that good stuff. I'm in no position to test right now, but I'll give it a shot tomorrow! :)
@Iamthecreeper: Go
@Iamthecreeper
Thank you. :D Someone commented on another post i made Spawning units and minerals and said that i should use an event like "unit enters region" and then the action of "create unit" My only question would be how to make the units go to the corresponding spawn locations for the different players.
@Thrasher25: Go
I'll post in the thread you linked. Let's keep this one for talk about the snippet :)