Ok I m not lua coder nor I m into game developing, I m creating map and all I need to know if it is commander or not, before life was easy .isCommander and easy way to detect coms in all mods? because currently I m detecting only zero-k coms.
if UnitDefs[unitDefID].customParams.commtype then
EDIT: if UnitDefs[unitDefID].customParams.commtype or UnitDefs[unitDefID].customParams.iscommander then
works on BA and zk and similar thanks nixtux.
is features now unatackable? Because I have big feature and even when I set manual fire where aoe would hit it unit refuses attack it. It wasnt like this in 82.0
Universal way to detect comanders in all games[SOLVED]
Moderator: Moderators
Universal way to detect comanders in all games[SOLVED]
Last edited by wolas on 16 Apr 2012, 11:26, edited 1 time in total.
Re: Universal way to detect comanders in all games[HALF SOLVED]
what are you going to do about games that don't have commanders?
Re: Universal way to detect comanders in all games[HALF SOLVED]
This is for lol map like a duck and when com dies some cool sound is a must.
Re: Universal way to detect comanders in all games[HALF SOLVED]
The UnitDefs[unitDefID].customParams.iscommander works for xta too.
Re: Universal way to detect comanders in all games[HALF SOLVED]
But I think the best way to do it would be to make a table of all the unist that all present frame 1, since those are commanders.
Re: Universal way to detect comanders in all games[HALF SOLVED]
@jools: That's not a very reliable assumption. There are games and mutators where teams start with other unit types.