Page 1 of 1

Need Help!! Please Help ME!!!

Posted: 15 Jan 2007, 14:21
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?

Posted: 15 Jan 2007, 14:42
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.

Posted: 15 Jan 2007, 23:41
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.

Posted: 17 Jan 2007, 06:46
by rene
Thank for replying :D