Commanding your troops

Hi @Burkay_Ozdemir! Currently the simple say commands are listed in the default code: 'move', 'defend', 'follow', and 'attack'. If you want to have only a subset of your units obey the command, add type: 'archer' to the data, like:

this.say("Attack " + throwers[0].id, {type: 'archers', target: throwers[0]});

But there isn’t more fine-grained control than this in Dungeon Arena. However, in Brawlwood, you can not only write all the logic for all the soldiers, but also their hear(speaker, message, data) callbacks, so you have full control. Give it a try: http://codecombat.com/play/ladder/brawlwood

1 Like