NPC animationTime

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

Moderators: Lapo, Bax

ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

NPC animationTime

Postby ffourcad » 01 Apr 2010, 15:55

Hello,

I'd like to know if it's possible to change NPC's animationTime, in order to increase or decrease npc movement speed ?
I changed avatar.currentAnimTime, but it doesn't seem to really change.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 01 Apr 2010, 23:28

The avatar speed is saved in a User Variable. If you change that variable for the NPC user, you will change its speed on the client-side.
I think we will have to add a document describing all the User Variables involved in OpenSpace, so you know what you have to set when creating an NPC user.
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 02 Apr 2010, 07:44

That would be great ! Thank you
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 07 Apr 2010, 09:07

I'd really like to know the name of the UserVariable that controls the avatar animation Speed.

Thank you.
cyli
Posts: 16
Joined: 09 Mar 2010, 18:39

Postby cyli » 08 Apr 2010, 03:12

I set "_os_aTime" to change the movement speed. The higher the number, the slower the avatar moves across the map, but I'm not sure what exactly that represents (milliseconds to move across one tile maybe?). 800-1500 makes my avatar move across my map at a fairly reasonable speed.
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Postby ffourcad » 08 Apr 2010, 07:40

ok, thanks, I'll give it a try.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 12 Apr 2010, 16:50

Yes, as cyli said _os_aTime is the "animation time" variable: it is the duration in milliseconds of the avatar movement from tile to tile along N/E/S/W directions. This parameter is used by OpenSpace to set the avatar speed when moving on the map. A correction is applied automatically for the other directions.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 31 guests