Half-Life и Adrenaline Gamer форум

Всё об игре в Халф-Лайф и АГ
Текущее время: 29 мар 2024, 03:02

Часовой пояс: UTC + 5 часов [ Летнее время ]




Начать новую тему Ответить на тему  [ Сообщений: 6 ] 
Автор Сообщение
 Заголовок сообщения: make bots ignore attack some models (players) ?
СообщениеДобавлено: 10 ноя 2017, 16:41 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
Hello
I have changed the model for the team players (each player has his own model in the same team)
In this case I have some bots who are cheak to that player in the same team through the models
So they shoot the players in the same team because they do not has the same model
I checked it out when I gave all the players god Mod would ignore it (mean dont shoot players in the same team who has different model)
From here I thought that if given godmodes among the team players only I'll get rid of this problem .
or is there another way to do it?

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: make bots ignore attack some models (players) ?
СообщениеДобавлено: 10 ноя 2017, 21:54 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
26 мар 2024, 21:42
Сообщения: 6864
Hi.
Probably there is no easy way. Only to change bots code to use not models, but some other thing to detect teams and fix gamedll too (this part can be done thru the amxx).


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: make bots ignore attack some models (players) ?
СообщениеДобавлено: 10 ноя 2017, 22:34 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
thank you for replying.
Maybe I will not do it at all since it is not easy at amxx :unknown:
I used several attempts but failed:
http://codepad.org/DCHjjGlA
http://codepad.org/GmpOCD0f
http://codepad.org/U2Fn28nT

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: make bots ignore attack some models (players) ?
СообщениеДобавлено: 11 ноя 2017, 02:33 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
26 мар 2024, 21:42
Сообщения: 6864
You can handle it this way, but this will be normal for humans only. Bots will continue to try to shoot teammates with different models.
Probably it could be done with metamod plugin. If you will hook all g_engfuncs.pfnInfoKeyValue(buffer, "model") calls and return appropriate values while keep them different on engine and client sides.


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: make bots ignore attack some models (players) ?
СообщениеДобавлено: 12 ноя 2017, 00:49 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
What about if i could hook addtofullpack and check whether the receiving host is a bot. If he is, myb i can set entity state model to same model as bot, so he will not shoot. so i think in this case i can ignore regular players in the function ?

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: make bots ignore attack some models (players) ?
СообщениеДобавлено: 12 ноя 2017, 02:47 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
26 мар 2024, 21:42
Сообщения: 6864
Bots working differently. For example, jkbotti thinks in StartFrame.
Код:
static void StartFrame(void)
{
      for (bot_index = 0; bot_index < gpGlobals->maxClients; bot_index++)
      {
         if (bots[bot_index].is_used)   // is this slot used
         {
            if (gpGlobals->time >= bots[bot_index].bot_think_time)
            {
               BotThink(bots[bot_index]);
So, I suppose they shoot players in there. And addtofullpack doesn't relates here at all.


Вернуться к началу
 Профиль 
  
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему  [ Сообщений: 6 ] 

Часовой пояс: UTC + 5 часов [ Летнее время ]


Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 8


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Найти:
Перейти:  
Создано на основе phpBB® Forum Software © phpBB Group
Русская поддержка phpBB