NPC animationTime

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

Moderators: Lapo, Bax

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

NPC animationTime

Post by ffourcad »

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: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

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

Post by ffourcad »

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

Post by ffourcad »

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

Post by cyli »

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

Post by ffourcad »

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

Post by Bax »

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
Post Reply