Universal way to detect comanders in all games[SOLVED]

Universal way to detect comanders in all games[SOLVED]

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
wolas
Posts: 112
Joined: 30 Jul 2010, 20:40

Universal way to detect comanders in all games[SOLVED]

Post by wolas »

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
Last edited by wolas on 16 Apr 2012, 11:26, edited 1 time in total.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Universal way to detect comanders in all games[HALF SOLVED]

Post by smoth »

what are you going to do about games that don't have commanders?
wolas
Posts: 112
Joined: 30 Jul 2010, 20:40

Re: Universal way to detect comanders in all games[HALF SOLVED]

Post by wolas »

This is for lol map like a duck and when com dies some cool sound is a must.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Universal way to detect comanders in all games[HALF SOLVED]

Post by Jools »

The UnitDefs[unitDefID].customParams.iscommander works for xta too.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Universal way to detect comanders in all games[HALF SOLVED]

Post by Jools »

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.
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Universal way to detect comanders in all games[HALF SOLVED]

Post by SpliFF »

@jools: That's not a very reliable assumption. There are games and mutators where teams start with other unit types.
Post Reply

Return to “Map Creation”