Exactly as the title states, I need some initial guidance on how to implement a barracks that will spawn 1 unit at 2 regions... lets call them left and right. Then the units will move depending on which team created the units to different parts of the map. I hope that was descriptive enough... I think I could do it if I knew how to link abilities with functions (I think this is how I would do it) but alas have no clue how to do this. Thanks in advance.
Well what I do as opposed to having it actually train the units is have a trigger that runs like every 60 seconds or so that creates units if the barracks is alive. Not sure if that works or not for what you're doing.
My first thoughts about doing this is setting a region on the barracks spawn point where trained units spawn, then set a trigger to fire when someone trains a unit from that barracks (ie: the trained unit enters the region you set at the barracks) then have the trigger remove that trained unit, and create copies of that unit at each other region you want them to spawn at.
This might work, however... cosmetically kinda unappealing. Is there a way to like... if unit is training, cancel it and spawn a unit?
and Seph, that wouldn't work for mine unfortunately I will give them a barracks that they will spawn units out of (different kinds) Where each one will cost minerals but increase income type of thing. But thank you for the input.
Thank you I would appreciate that... im still playing around with it and found that I can do this.... (Haven't tested it yet but getting to that :P)
Event: Any unit started training - then the actions set it to 100% completed and just have the barracks not actually spawn anything just pay minerals to train nothing (don't know if you can do this either but I SHALL TRY!) Although I am worried about it... because I have a left and right spawn (two entrances to the enemies base) and of course if I issue them commands to move... both spawns will need to move in different directions.
Also another dilema is that this (as far as I know) I will need to make 2 triggers per unit that I want to spawn... seriously? Is there a way to transfere information from a trigger to a function or something so that I can make the function once so that this will be a lot less work? lol
EDIT: Ahh we posted at the same time rofl... I didn't notice that I could remove triggered unit from game! I could finish it with the trigger and then remove it from the game me thinks... which would fix a lot of this 2 paragraph rant rofl Thanks again!
Well, I made it with all triggering units commands with a simple 4 triggers, one for left, right, and top team, then bottom team. It seems like it will work... however the unit I want to test it with (zergling) made from a barracks... just WILL NOT work rofl. Anyone know why this is? I tried to add the morph ability to the barracks and the button just won't be added... I keep trying and it just disappears when I click to add the button for the zergling.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Exactly as the title states, I need some initial guidance on how to implement a barracks that will spawn 1 unit at 2 regions... lets call them left and right. Then the units will move depending on which team created the units to different parts of the map. I hope that was descriptive enough... I think I could do it if I knew how to link abilities with functions (I think this is how I would do it) but alas have no clue how to do this. Thanks in advance.
Well what I do as opposed to having it actually train the units is have a trigger that runs like every 60 seconds or so that creates units if the barracks is alive. Not sure if that works or not for what you're doing.
My first thoughts about doing this is setting a region on the barracks spawn point where trained units spawn, then set a trigger to fire when someone trains a unit from that barracks (ie: the trained unit enters the region you set at the barracks) then have the trigger remove that trained unit, and create copies of that unit at each other region you want them to spawn at.
@currydevil: Go
This might work, however... cosmetically kinda unappealing. Is there a way to like... if unit is training, cancel it and spawn a unit?
and Seph, that wouldn't work for mine unfortunately I will give them a barracks that they will spawn units out of (different kinds) Where each one will cost minerals but increase income type of thing. But thank you for the input.
@Morne: Go
Potentially. You would need a trigger to check the unit build in progress. I'll have to take a look and see what's available for triggers.
I found this, give it a try and see what you get. Copy the last line for each additional region you want to spawn at.
@currydevil: Go
Thank you I would appreciate that... im still playing around with it and found that I can do this.... (Haven't tested it yet but getting to that :P)
Event: Any unit started training - then the actions set it to 100% completed and just have the barracks not actually spawn anything just pay minerals to train nothing (don't know if you can do this either but I SHALL TRY!) Although I am worried about it... because I have a left and right spawn (two entrances to the enemies base) and of course if I issue them commands to move... both spawns will need to move in different directions.
Also another dilema is that this (as far as I know) I will need to make 2 triggers per unit that I want to spawn... seriously? Is there a way to transfere information from a trigger to a function or something so that I can make the function once so that this will be a lot less work? lol
EDIT: Ahh we posted at the same time rofl... I didn't notice that I could remove triggered unit from game! I could finish it with the trigger and then remove it from the game me thinks... which would fix a lot of this 2 paragraph rant rofl Thanks again!
Well, I made it with all triggering units commands with a simple 4 triggers, one for left, right, and top team, then bottom team. It seems like it will work... however the unit I want to test it with (zergling) made from a barracks... just WILL NOT work rofl. Anyone know why this is? I tried to add the morph ability to the barracks and the button just won't be added... I keep trying and it just disappears when I click to add the button for the zergling.