avatarEvent

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

Moderators: Lapo, Bax

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

avatarEvent

Postby TiagoR » 11 Oct 2010, 14:52

Hi, i'm having a problem.

I'm using Sfs Pro 1.6.9 with the latest OpenSpace.
I'm setting

Code: Select all

openSpace.addEventListener(AvatarEvent.START_MOVEMENT, onAvatarMovementStart);
openSpace.addEventListener(AvatarEvent.STOP_MOVEMENT, onAvatarMovementStop);

private function onAvatarMovementStart(evt:AvatarEvent):void
{
   trace(" PLAYER AVATAR START MOVEMENT ")
}
      
private function onAvatarMovementStop(evt:AvatarEvent):void
{
   trace(" PLAYER AVATAR STOP MOVEMENT ")
}


but the events aren't dispatched! All other avatar events i'm using are dispatched fine, but these 2 events for some reason don't dispatch.
Avatar moves like it should, and there aren't any errors.
Are these events bugged? Or am i missing something?

Another question, is it possible to catch the '_os_move' on server side?

EDIT: all this is for NPC movement, so when the user avatar starts moving, his assigned NPC follows him. If there's a better method i would appreciate the help.
Another question, is there a way to get the path the user avatar will follow? Cause the best place for a assigned NPC would be 'one step' behind his owner.

Thanks in advance.
TR
TR
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 12 Oct 2010, 09:45

Did you add the proper triggers to the tiles which are supposed to fire those events?
Paolo Bax
The SmartFoxServer Team
TiagoR
Posts: 83
Joined: 15 Mar 2010, 11:42
Location: Portugal
Contact:

Postby TiagoR » 12 Oct 2010, 09:56

bax wrote:Did you add the proper triggers to the tiles which are supposed to fire those events?


Thanks for the reply.

Those events are tile related? I thought they were avatar related, and would fire on avatar movement start/stop ! If thats the case they're useless for what i had in mind.

Regarding the other question, is it possible to catch the _os_move on server side?
Or can only be catched on client side onExtensionResponse ?
Or is there any other event i can catch that tells me the user action, and target coordinates? Cause catching the _os_move seems to much heavy since every avatar in room throws it when it moves.
TR

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 15 guests