MMO Framework - Filter events from/to interest system
Options
Comments
-
Hi, syrka.
If I understand correctly, you have many subscribers of item.EventChannel. And your wish is filter some subscribers from receiving messages. if it is so. Then there is two ways:
- do not subscribe
- do not handle. i mean, it is normal way to handle in subscriber only what you need.0 -
ehm, its possible to have more than one EventChannel?
i use the basic mmo demo setup. I send position updates and local chat over the interest system. Now i want to filter somehow only the chat messages, but i don't know where.0 -
Use 1 IA per purpose and you will not have the problem. with that I mean: you should not mix the interest area for position handling and the one for chat messages. Its not like they are likely never to be of the same range anyway unless you want to invite spamers. For guild - team chats you will need to handle the chat this way anyway actually.0
-
syrka wrote:ehm, its possible to have more than one EventChannel?
i use the basic mmo demo setup. I send position updates and local chat over the interest system. Now i want to filter somehow only the chat messages, but i don't know where.
Of course you can have more. You can extend current functionality or change it completly0 -
my chat is working now
now i'm interested in the eventchannel thing ^^
in the mmo demo, you use one interest area and one item, if i want use a 2nd eventchannel, how do i add this? (basic steps)0 -
you need to add channel to item, add logic to send events to this channel
and add logic to subscribe handlers to this channel. if you are ok with current logic you can just add your code to ClientIterestArea::OnSubscribeItem, if you are not take a look on IterestArea.ReceiveItemSnapshot
and of course do not forget to read documentation for this sample0