I wanted all burrowed units to receive an armor bonus for being underground, so that's pretty easy to implement. Except, rather than having to go through every burrowed unit and change the value every time I want to change it, could I make it so I can change the value in some file or unit, and all the other units inherit the value from that location or unit?
I know you can do something similar in the UI:Tooltips of a button by doing <d ref="Unit,Lair,Food"/> (I know this will give me the supply value of the Lair, just an example). But is there something similar you can do in the numerical data fields of units? I tried various combinations of <d ref="Unit,Lair,Food"/> just as a test, but they all gave errors when switching out of XML view (the data editor wont accept non numeric values)
I found the following page, and I understand units inherit from CUnit, but I still dont understand how to make my specific case work, because there doesnt seem to be a hierarchy, its just every unit inherits from CUnit. Meaning I would need to create a BurrowedUnit, have it inherit from CUnit, and then change the life armor, and then make every burrowed unit a type of BurrowedUnit. Would that even work? Surly they already have something like this.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I wanted all burrowed units to receive an armor bonus for being underground, so that's pretty easy to implement. Except, rather than having to go through every burrowed unit and change the value every time I want to change it, could I make it so I can change the value in some file or unit, and all the other units inherit the value from that location or unit?
I know you can do something similar in the UI:Tooltips of a button by doing <d ref="Unit,Lair,Food"/> (I know this will give me the supply value of the Lair, just an example). But is there something similar you can do in the numerical data fields of units? I tried various combinations of <d ref="Unit,Lair,Food"/> just as a test, but they all gave errors when switching out of XML view (the data editor wont accept non numeric values)
I found the following page, and I understand units inherit from CUnit, but I still dont understand how to make my specific case work, because there doesnt seem to be a hierarchy, its just every unit inherits from CUnit. Meaning I would need to create a BurrowedUnit, have it inherit from CUnit, and then change the life armor, and then make every burrowed unit a type of BurrowedUnit. Would that even work? Surly they already have something like this.