Creating a Buddy System/onCustom Action limitations

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

Moderators: Lapo, Bax

fabianres@live.com.mx
Posts: 40
Joined: 14 Apr 2010, 17:40

Creating a Buddy System/onCustom Action limitations

Postby fabianres@live.com.mx » 23 Jan 2011, 15:37

Hi guys,

As some of you well know, in popular isometric games such as Yoville! you can click on a fellow user´s avatar, and a pop-up control display will show up, where you can choose "Add as a Buddy" from among other choices and have the user added to your buddy list if they agree to do so.

This is what I am trying to develop.

I am trying to do make this control display show up ON OTHER USER AVATARS.

I figured that I would store the control display movieclip on the avatar library, and on the main file code have the onAvatarClicked trigger a openSpace.setMyAvatarAction(avatarAction) which would have the avatar show the control display.

All this works fine, except that on tests whenever I click on ANOTHER user, the control display shows up ON MY AVATAR not on theirs.

I read that the onCustomAction works on the "main sprite only", which I figure is that I can only trigger actions on my avatar, not on others when I click on them

Is this a fact? Can I not trigger actions on other users when clicking on them? Is there a way to do this the way Yoville does?

I don´t want to have a listbox with the available room users AND the isometric environment to be able to create the Buddy System which I know is the way handled in some of the examples, cause its clunky. I wish to do it the Yoville way.

What do I need to do to make it this way?

If the current api (both op1 and 2) does not support this (triggering actions on other avatars when clicked) would I have to go all the way and buy the openspace source code to make this happen????

Please I need to know.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 25 Jan 2011, 07:28

Of course you can't trigger the actions on the other avatars. But you can still do what you need, and in a much simpler way. In the click event of an avatar you receive, in the parameters, a reference to the avatar movieclip. That's all: simply call your method to display that panel.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v1 discussions and help”

Who is online

Users browsing this forum: No registered users and 11 guests