sigh... im so happy ppl atleast wait til going over to sc2mapster before asking these questions.
Ok so basicly i would like to say that u have to sstart WAAAAY more at the begining since this is a level 2 trigger (meaning it includes variables). It is better to do all things though data editor ( or atleast cleaner) but more LOGIC to do it in a trigger. And since its easier to understand i will explain triggerwise. before we start i would like you to not only do, but to try and understand.
Basicly, if i understand correctly u want to spawn a unit every sec IF (a condition) you have a factory (or a structure of some sort)
Since i dont have time with a fuckin guide ill just print out what i would do in 3 easy tiggers. First one (Player makes a factory) Second one (Spawn units) third (Factory dies)
Now first u need 2 varaibles:
Step 1: variables
First one- Call it.. FactoryExcist - (make it global (meaning your NOT making inside the trigger, but in the left spalt (where all your triggers and varaibles are)) should be a boolean type. Its auto made to false (which is ok). Under the type (as u just set to boolean) there is something called "array". check the box and set the array = numbers of players (if 2 players, then set it to 2).
This trigger is very usefull. It can be set as false and true and used in triggers to open let a specific player pass a condition, while another doesnt. (false, true.. very logic)
The SECOND - call it Factory unit - trigger should be a global one aswell (opposite would be if u made it WITHIN the trigger making it local - but dont do this). Make this global trigger a unit type of variable and set the array to number of players.
This trigger can store a specific unit (structures are counted as units, and be used to pin out what unit we refear to when telling the map where to.. for example spawn certain units).
Step 2: Building a factory
Events
Unit - Any Unit construction progress is Completed
Local Variables
Conditions
(Unit type of (Triggering unit)) == Factory
Actions
Variable - Set FactoryUnit[(Owner of (Triggering unit))] = (Triggering unit)
Variable - Set FactoryExcist[(Owner of (Triggering unit))] = true
Step 3: Spawning units (this trigger has to be under the first one in the list to the left)
Events
Unit - Any Unit construction progress is Completed
Local Variables
Conditions
(Unit type of (Triggering unit)) == Factory
Actions
General - Wait 2.0 Game Time seconds
General - While (Conditions) are true, do (Actions)
Conditions
FactoryExcist[(Owner of (Triggering unit))] == true
FactoryUnit[(Owner of (Triggering unit))] != No Unit
Actions
General - Wait 1.0 Game Time seconds
Unit - Create 1 Siege Tank (Tank Mode) for player (Owner of (Triggering unit)) at (Position of FactoryUnit[(Owner of (Triggering unit))]) facing 270.0 degrees (No Options)
Step 4: Factory dies..
Unit dies
Events
Unit - Any Unit dies
Local Variables
Conditions
(Unit type of (Triggering unit)) == Factory
Actions
Variable - Set FactoryExcist[(Owner of (Triggering unit))] = false
Variable - Set FactoryUnit[(Owner of (Triggering unit))] = No Unit
--------------------------------------------------------------------------------------
There.. Havent tried it but should work.. Now If the dude need help how to do the action and functions, please just help him..
As i said: This is a trigger way to do it, and often more simple to understand then data editor. But for next time, try reading guides..
None.