PDA

View Full Version : [AI] comunicating class - superclass


keeper1
05.08.2009, 15:11
i need to send a value from a class to its superclass, how?

Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 08-05-2009, 03:11 PM. Открыть источник (https://web.archive.org/web/20100324120650id_/http://www.postpacific.com:80/archive/index.php/t-992.html).

FidoW
05.08.2009, 15:29
You are getting the wrong idea.

AI is used by a npc, so use the vars of the npc to store data. You can't "comunicate class", at the end is all like a big class, thing is the code is writed in more than one place.

Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 08-05-2009, 03:29 PM. Открыть источник (https://web.archive.org/web/20100324120650id_/http://www.postpacific.com:80/archive/index.php/t-992.html).

kold
05.08.2009, 15:51
myself.i_ai0

myself.f_ai0

etc.

Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 08-05-2009, 03:51 PM. Открыть источник (https://web.archive.org/web/20100324120650id_/http://www.postpacific.com:80/archive/index.php/t-992.html).

FidoW
05.08.2009, 16:53
exactly.

Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 08-05-2009, 04:53 PM. Открыть источник (https://web.archive.org/web/20100324120650id_/http://www.postpacific.com:80/archive/index.php/t-992.html).

keeper1
05.08.2009, 19:06
what im trying to do is

father >son >mob

___________>mob

_______>son >mob

____________>mob

_______>son >mob

___________>mob

when one of the mobs die, its comunicated to the son with privatedied handler, but i need to send that info to the fater, ideas?

Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 08-05-2009, 07:06 PM. Открыть источник (https://web.archive.org/web/20100324120650id_/http://www.postpacific.com:80/archive/index.php/t-992.html).

kold
05.08.2009, 19:58
Wait wut...

Think you're confusing programming class inheritance with group mobs + NPC communication.

Main problem with NPC communication is L2NPC gives you very limited ways to designate the creature object to communicate with.

Private spawning is nice because PARTY handlers give the creature, and all privates can reference their summoner_id.

Another option if you have 1 main NPC you need to communicate with, is have it RegisterGlobalMap and any NPC can look it up.

Once you get the target creature you can send somewhat limited data with ScriptEvents.

Also, talking to my onjoin slogan script will get you nowhere

Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 08-05-2009, 07:58 PM. Открыть источник (https://web.archive.org/web/20100324120650id_/http://www.postpacific.com:80/archive/index.php/t-992.html).

FidoW
05.08.2009, 20:43
Wait wut...


Think you're confusing programming class inheritance with group mobs + NPC communication.


I already noticed that with his first post, he have the wrong idea in his mind. Let see if he understand what you said to him and get a good concept of how it works.

Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 08-05-2009, 08:43 PM. Открыть источник (https://web.archive.org/web/20100324120650id_/http://www.postpacific.com:80/archive/index.php/t-992.html).