NPC Example

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

sidigrid
Posts: 7
Joined: 24 Mar 2010, 04:18

NPC Example

Postby sidigrid » 16 Nov 2010, 17:34

Hi OS Team,
I have been trying to implement an NPC which requires me to implement a custom Extension on the server side. But due to my limited knowledge in Eclipse and the language, I am finding it difficult to code one. It would greatly help the whole community if an example Extension can be posted.. Either by the OS team or anyone from the community. It would greatly help a lot of new comers..

ThankYou..

Regards,
Sid.
TiagoR
Posts: 83
Joined: 15 Mar 2010, 11:42
Location: Portugal
Contact:

Postby TiagoR » 17 Nov 2010, 07:26

Hi
if you check your sfs install folder/examples you got there an NPC example, its a good place to start.
TR
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: NPC Example

Postby Bax » 17 Nov 2010, 08:48

sidigrid wrote:Hi OS Team,
I have been trying to implement an NPC which requires me to implement a custom Extension on the server side. But due to my limited knowledge in Eclipse and the language, I am finding it difficult to code one. It would greatly help the whole community if an example Extension can be posted.. Either by the OS team or anyone from the community. It would greatly help a lot of new comers..

ThankYou..

Regards,
Sid.

Check this document: at the bottom of the "Creating a custom extension" paragraph you will find a link to download an example of custom OpenSpace extension which shows how to create an NPC too.
Paolo Bax
The SmartFoxServer Team
sidigrid
Posts: 7
Joined: 24 Mar 2010, 04:18

Sending from Client to Server

Postby sidigrid » 22 Nov 2010, 03:47

Hi,
Sorry for being a noob..

I went through the extension code and it was good to understand..
How would I communicate from the client with the extension.

Lets say I am using the extension provided by you and I want to test if I am able to communicate with it. How do I send parameters from Client to Server.?

If it was a smartFox extension then I would have used smartFox.sendXtMessage("parameters");..Similarly how would I do it from client to the openSpace Extension?

Plz help out..
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 22 Nov 2010, 08:12

The OpenSpace extension IS a SmartFoxServer extension, so you communicate with it as you normally do with SmartFoxServer extensions.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 20 guests