How to let Nonoba Server listen to chats by users.

diadasdiadas

很久以前 | 帖子#1
Hey guys,

I want to listen to keywords in the Nonoba chats. Like "yes" and "no" if I want to make polls. I know that a word game uses a similar function, because there you have to draw a word and the others have to enter their suggestions into the chat.

Regards,
Diadas
最后编辑很久以前

BIG KING 100BIG KING 100

很久以前 | 帖子#2
what??

diadasdiadas

很久以前 | 帖子#3
Do you know multiplayer games?
I think so.
Do you know the Chat in these multiplayer games?
I think so, too.

If you enter something into this chat, I want the server to search for keywords in the words you entered.

@BIG-KING-100: If you don't develop games or any other programming languages which uses events, you won't understand my question!

JoshuaJewellJoshuaJewell

很久以前 | 帖子#4
Hey diadas I think I understand what you are trying to accomplish and do not think it is currently possible, at least not easily.

I think the chat window code may be loaded into the flash file as your game loads. Also looking at the api documentation and through person experience I have seen no way to receive a message every time the users submits text into the chat window.

Hopefully a dev can give you a more definitive answer.

MysteryMystery

很久以前 | 帖子#5
Defining a HandleChatMessage() inside your NonobaGame seems to be what you needed to do. If you want to determine for which user, you can check the 'user' parameter before proceeding.

OliverOliver

很久以前 | 帖子#6
Woot Mystery!!!

I was just going to say that!

JoshuaJewellJoshuaJewell

很久以前 | 帖子#7
Thats a really good find Mystery where did you find that code?

MysteryMystery

很久以前 | 帖子#8
swoop

They're all in the documentation, http://nonoba.com/developers/documentation; I just copypasted the code from the NonobaGame::HandleChatMessage section.
最后编辑很久以前

JoshuaJewellJoshuaJewell

很久以前 | 帖子#9
Ok I see, when I was scanning the documentation I was only looking where there were public functions that had a url link to a spot on the page. These call was not in there so I over looked it.

Expecting the data to look a certain way can help when glossing over stuff, but in this case it burned me.

回复主题

现在就注册以回复主题

5dyouxi

5dyouxi.com是一个独立的游戏网站,在这里你将可以免费玩到各种好玩的单人和多人游戏。

开发者工具

如果你是一位flash游戏开发者,我们有一些非常强大的工具来帮助你开发更加优秀的游戏。

经典游戏

为什么不试试我们这里的一些最为优秀的在线flash游戏呢?这可是完全免费的!

Copyright ©2007-2012 5dyouxi™ - All rights reserved.343.2006ms on SERVER34096
注册 或者