Russian AI Cup

Расширенный поиск  
Страницы: [1]

Автор Тема: How to set the production of vehicles in the facilities?  (Прочитано 300 раз)

leloy

  • Newbie
  • *
  • Сообщений: 6
How to set the production of vehicles in the facilities?
« : Ноября 28, 2017, 02:47:38 pm »

How can I set the production of new vehicles in the facilities?

Additionally, how can I be notified when I capture a new building?
Записан

Jeners

  • Full Member
  • ***
  • Сообщений: 86
Re: How to set the production of vehicles in the facilities?
« Ответ #1 : Ноября 28, 2017, 03:26:03 pm »

if getOwnerPlayerId=me.id
Записан

Sanda

  • Jr. Member
  • **
  • Сообщений: 12
Re: How to set the production of vehicles in the facilities?
« Ответ #2 : Ноября 28, 2017, 03:32:40 pm »

How can I set the production of new vehicles in the facilities?
Rules, #2.6.:
SETUP_VEHICLE_PRODUCTION. Configures the production of equipment in the captured factory. You should specify the type of vehicle and factory identifier. At the same time, the progress of production will be reset, even if this type of vehicle is equal to the type of equipment, produced at the factory at the moment.
Записан

spacistor

  • Jr. Member
  • **
  • Сообщений: 12
Re: How to set the production of vehicles in the facilities?
« Ответ #3 : Ноября 28, 2017, 03:40:18 pm »

1. To setup production:
setAction(model::ActionType::SETUP_VEHICLE_PRODUCTION);  //action type - setup production
setFacilityId(facilityId);         //on which facility (must be owned by you)
setVehicleType(vehicleType); //what to produce

2. All owned by you buildings has getOwnerPlayerId() = me.getId(). There will be no additional notifications. If you want, you can mantain table of your facilities and notice changes by yourself.
Записан
Страницы: [1]