So I found a few threads on this when i searched, but none had the answer I was looking for. So basically I'm making a warfare map in which infantry will come in squads. to do this I'm attempting to use an arraylist and unit groups. The way it is supposed to work is that once you train a commanding unit, the trigger will create a number of units for his squad. The commander will be assigned a custom value and the squad units will be added to a unitgroup with the same custom value. Now this is the first time I'm using arraylist and custom value, so I'm having some problems. Whenever I train a commanding unit, an error message comes, so it clearly doesn't work.
I actually just solved this myself. I am however puzzled as to how to make a unit ( the commander) take damamge whenever one of the squadtroops are damaged
yea actually solved this too, my problem was that i couldn't figure out a way to call the specific commander unit. BUt I just used a unit array list with the commanders custom value matching his number on the list ^^
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So I found a few threads on this when i searched, but none had the answer I was looking for. So basically I'm making a warfare map in which infantry will come in squads. to do this I'm attempting to use an arraylist and unit groups. The way it is supposed to work is that once you train a commanding unit, the trigger will create a number of units for his squad. The commander will be assigned a custom value and the squad units will be added to a unitgroup with the same custom value. Now this is the first time I'm using arraylist and custom value, so I'm having some problems. Whenever I train a commanding unit, an error message comes, so it clearly doesn't work.
http://s943.photobucket.com/albums/ad279/mamastoast/?action=view¤t=tRIGGERS.png
I actually just solved this myself. I am however puzzled as to how to make a unit ( the commander) take damamge whenever one of the squadtroops are damaged
Something like this:
Any Unit Life changes
Triggering unit is in Squad
Triggering unit != Commander
Set Commander Life (Current) to (Commander Life (Current) - Triggering Damage Amount)
yea actually solved this too, my problem was that i couldn't figure out a way to call the specific commander unit. BUt I just used a unit array list with the commanders custom value matching his number on the list ^^