Prevent friendly robots in a team to shoot themselves when on line of sight

19 views
Skip to first unread message

germanta...@gmail.com

unread,
May 14, 2020, 10:16:08 AM5/14/20
to robocode
Hi
I'm preparing a team for 3vs3, but I am running into a problem

When 2 of them are shooting at the same enemy, they still shoot even if there is a tank of the same team in the line of sight.

This is what I mean

Team1Tank1 ---BULLET---> Team1tank2  --BULLET--> Enemy

Would it be possible to program them in such a way that Team1Tank1 knows that Team1Tank2 is in the way between himself and the enemy so that he stops shooting?

Thanks

fnl

unread,
May 14, 2020, 4:51:54 PM5/14/20
to robocode
If you have a look at the API for TeamRobot, you'll see that the main difference is about communication with team mates:


For example, you can broadcast messages, and also check if a bot with a specific name is a teammate.
So you should let your robot communicate with each other to and figure out how the coordinate attacks etc. ;-)
Reply all
Reply to author
Forward
0 new messages