Character Walk Change
-
mrnothersan
- Posts: 226
- Joined: 24 Jan 2010, 18:38
Character Walk Change
When the character walks, how can I get it to change direction that it is facing?
Also, how can I add music to my virtual game?
~mrnothersan
Also, how can I add music to my virtual game?
~mrnothersan
-
mrnothersan
- Posts: 226
- Joined: 24 Jan 2010, 18:38
-
EmpireGames
- Posts: 28
- Joined: 09 Feb 2009, 18:42
-
mrnothersan
- Posts: 226
- Joined: 24 Jan 2010, 18:38
-
EmpireGames
- Posts: 28
- Joined: 09 Feb 2009, 18:42
Then I would ask on the forums for Flash if they have any which I am sure they do.mrnothersan wrote:Im using SmartFoxServer and flash...EmpireGames wrote:those topics are prob. more client related then SmartFox (Server) related. If your using a game engine for the client then it would prob. be better to ask those questions on the Game Engine's forums.
-
mrnothersan
- Posts: 226
- Joined: 24 Jan 2010, 18:38
-
mrnothersan
- Posts: 226
- Joined: 24 Jan 2010, 18:38
Re: Character Walk Change
You can add music to the game by putting it outside of where the character walks (for example in the avatar chat example) this would do it for every room. If you add music to the room you can have it so each room has different music. I'm not sure if the music would stop if you left the room or you would have to put a script when the client leaves the room. I'm not sure 100%, but I'm almost positive that would work.mrnothersan wrote: Also, how can I add music to my virtual game?
~mrnothersan
You can use this code:
Code: Select all
var angle=Math.atan2((-y2),(x1-x2))
if (angle<0) {
angle +=3
}
angle=angle*(180/Math.PI)
//Now you can use some other code to get what frame to turn to
--
Flappi282
Flappi282
-
mrnothersan
- Posts: 226
- Joined: 24 Jan 2010, 18:38