Need Help!! Please Help ME!!!

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
rene
Posts: 16
Joined: 13 Dec 2006, 03:00

Need Help!! Please Help ME!!!

Post by rene »

Hi all,

I really need some help here. I want to create a game from the AvatarChat example. Something like a map where you can explore around, there are some plants here n there. I try to use hitTest to detect if there is any object(plant) blokcing the path. My character do detect there is an object and will stop, but will get stuck there unable to move away when i click other position. Please Help!!!

How do i edit the easingEquation.as so that my character start, move and end at constant speed instead of easin in and out?
Dr_Malito
Posts: 18
Joined: 13 Dec 2006, 20:52
Location: Chile
Contact:

Post by Dr_Malito »

that's not so easy, but I think you need to make the avatar "bounce" 2 or 3 pixels when the hittest is detected.
Carl
Posts: 36
Joined: 22 Dec 2006, 20:40
Location: New York
Contact:

Post by Carl »

What you have to do is this.

1. Each hittest you do that is negative (not hitting), save the _x and _y positions in some variables, for that movieclip (avatar).

2. Then, when the hittest is positive (you are hitting a plant), use the variables to jump back to the last position you were in that wasn't hitting.

This should definitely work to keep you from getting stuck. The way you have it now the avatar can't move because the hittest imobilizes it, and the next frame you're still hitting. The method I have above doesn't imobilize your avatar, just sends it back to last previous "safe' position.

Not really a Smartfox question, but hope it helps.
Carl Lydon
Illustrator, animator, programmer
----------------------------------------
www.gametrust.com
www.chamberofchat.com
rene
Posts: 16
Joined: 13 Dec 2006, 03:00

Post by rene »

Thank for replying :D
Post Reply