Similar to how the mothership is done. Now, the mothership uses a specific requirement, and as far as i know, you cannot create a requirement, unless im missing an area of the editor. I was trying to make a type of unit that is unique per player, does anyone know if the Mothership requirement scales to unit type? Is the SOP to just do this with triggers on death etc? Im sure someone has figured out the most optimal way to code this type of restriction, and searching didn't enlighten me.
You should definitely be able to create a requirement in the Data Editor. You might have to duplicate the Mothership's requirement, but it should definitely be possible.
Go into the data editor and select requirement nodes. Search for mothership and copy and paste CountUnit(Mothership,QueuedOrBetter) == {No Mothership}0 Liberty.SC2Mod. Now right-click and select add object. Name it whatever you want. Just hit suggest. Under Requirement Node Type select Unit Count. Leave everything else and hit OK.
Select the object that you just made. On the right double click the field next to Count - Link Count. Click Custom and add the name of your unit, exactly. Then double click the field next to Count- State Count. Choose Queued or better. So you can't create the custom unit if their is one in queue or alive.
Now go back to your copied Mothership requirement. Double click the Equals field on the right. Change the top field to your Unit Count that you created.
Similar to how the mothership is done. Now, the mothership uses a specific requirement, and as far as i know, you cannot create a requirement, unless im missing an area of the editor. I was trying to make a type of unit that is unique per player, does anyone know if the Mothership requirement scales to unit type? Is the SOP to just do this with triggers on death etc? Im sure someone has figured out the most optimal way to code this type of restriction, and searching didn't enlighten me.
Thank you in advanced.
@DarkShape80: Go
You should definitely be able to create a requirement in the Data Editor. You might have to duplicate the Mothership's requirement, but it should definitely be possible.
you actually can create requirements.
Go into the data editor and select requirement nodes. Search for mothership and copy and paste CountUnit(Mothership,QueuedOrBetter) == {No Mothership}0 Liberty.SC2Mod. Now right-click and select add object. Name it whatever you want. Just hit suggest. Under Requirement Node Type select Unit Count. Leave everything else and hit OK.
Select the object that you just made. On the right double click the field next to Count - Link Count. Click Custom and add the name of your unit, exactly. Then double click the field next to Count- State Count. Choose Queued or better. So you can't create the custom unit if their is one in queue or alive.
Now go back to your copied Mothership requirement. Double click the Equals field on the right. Change the top field to your Unit Count that you created.
Sorry if it was confusing.
@Gaurus: Go
Edit: NM.
Thank you for the help, im just blind some days it seems.