View Full Version : Spawning Units from Buildings
Hotshot
06-14-2006, 11:10 PM
This has probibly been answered before (or maybe not) but I can't seem to figure out how to spawn monsters from buildings, like in maps such as WarChasers. If anyone could explain the way it is done that would be great.
Nevermind, I figured it out... eventually.
Already tried pressing F6 - the Object Editor - on your WE or at the editor you use (read, Unlimited WE is the more common alternative) and fiddle with it? Then edit the units it produces by adding the ones you'd like to join over that building. ;)
Hotshot
06-15-2006, 6:47 PM
Oh, actually I wasn't talking about producing units from a building - thats childs play. What I meant was to be able to spawn units periodically at a building/other unit so they keep spawing until they reach a limit, say 4 per 'generator', or until the 'generator' is destroyed (see WarChasers map for example). I figured it out a few hours after posing this thread using WarChasers as a guide.
So u mean like a trigger to 'spawn' certain units in a certain spot.
(im at school so this isnt exact) If u mean that then create a trigger,
You will have to create a region and then place it somewhere on ur map, this will be where u want ur units to be 'spawned'.
Event
Time-Every x Seconds
Action
Unit-Create 'Your Unit' unit at center of 'Your Region' (then it will have unit facing such angles and such, u can leave it the way it is)
You should know how to do the other bit.
So u have already figured it out well ohwell :)
Hotshot
06-19-2006, 9:32 PM
Yeah, but the way I did it, it dosen't require a region. It spawns from a targeted unit/structure. It also lets you create multiple 'generators' with minimum trigger coding (~4 triggers for virtually infinate 'generators').
Well if u use regions, it gives u a lil bit of experience using regions because u will have to use em heaps soon.
Hotshot
06-20-2006, 4:46 AM
lol, Its ok, I'm a Starcraft Mapping Guru, have made heaps of SC maps, and have to deal with locations (SC's version of regions) all the time. Regions are no different from my prespective, except for extra features. The real challenge is being able to understand the various triggers. A lot of them are very vague, but thats beside the point. Anyway, your concept is a good idea, but I'm using 50+ generators in my map so having that many regions will be hard to keep track of and sluggish. Also, the WarChasers way means you don't need to have 50+ triggers and can move the generators around without moving locations too.
If anyone is interested in knowing what map I'm making, it's based on Midway's famous game "Gauntlet Legends".
Oh, actually I wasn't talking about producing units from a building - thats childs play. What I meant was to be able to spawn units periodically at a building/other unit so they keep spawing until they reach a limit, say 4 per 'generator', or until the 'generator' is destroyed (see WarChasers map for example).
*Errm* More detail (on your intentions) next time? :P
And yeah, I also agree that some triggers at WC3-TFT are too vague for my taste at 1st glance. But nothing that seeing a few Blizz' maps and comparing it to SCMDraft 2/SCXE/SF for a somewhat distant editing reference. ;)
Hotshot
06-21-2006, 5:18 AM
*Errm* More detail (on your intentions) next time? :P
... That's why I used WarChasers as an example, because I knew people would make that mistake. It was hard to describe before I figured it out.
Can't you use the Unit's Custom Value feature to handle how many units it has to spawn?
Use locals to keep track or set a custom value to a code (e.g. Custom Value = 100*Building Code + Unit Code).
(This is in brief, a person having a little knowledge of Programming can get it)
Hotshot
06-23-2006, 2:30 AM
Can't you use the Unit's Custom Value feature to handle how many units it has to spawn?
Use locals to keep track or set a custom value to a code (e.g. Custom Value = 100*Building Code + Unit Code).
(This is in brief, a person having a little knowledge of Programming can get it)
Nice try, but if I modify the actual units functions I wouldn't be able to spawn different units. In general, the way I did it was to use 2 triggers (1 for a list of units, their spawning objects, frequency, maximum, etc. and a trigger to make sence of the frequency) so I choose an object (most logically a building) that will spawn the units periodically every frequency time until it has produced X number of spawned units, so if 1 is killed it gets replaced within the frequency time until it is at the maximum again or until the building doesn't exist anymore (destroyed). Notice no region use? Thats the beauty of it; I can make as many generators as I want and not use a single region to worry about and only ever 2 triggers (maybe a few more that do other minor functions I may have forgot to mention). And by the way, I am a programmer and I still had a bit of trouble understanding your concept. :concern:
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.