PDA

View Full Version : Boundaries and Scrolling



tsuakai
December 10th, 2006, 04:12 AM
At the bottom will be links to both the .swf and .fla file.

The current question I want to ask is how to make it so that when my character (girl_mc) touches one of my walls with hit-tests on them, the background stops scrolling. As of right now if you hold down the arrow keys it looks as if the camera eventually just leaves the character behind. Thanks in advance.

http://pixelcandy.net/Flash/Background_test.fla

http://pixelcandy.net/Flash/Background_test.swf

tsuakai
December 11th, 2006, 01:59 PM
Bump?

SacrificialLamb
December 11th, 2006, 06:06 PM
I have fixed what you have asked. You had every thing that you can hit telling _root.x and y to move against the unit so I removed that and added it to the units code and on the hit test made it repel the unit and return the _root

http://rapidshare.com/files/7097505/Background_test_h.fla

Dazzer
December 11th, 2006, 11:03 PM
also just so you know i managed to get the sprite to go through the rocks on some occasions.:)

SacrificialLamb
December 11th, 2006, 11:23 PM
the code is done so it only works from the inside of the path. I don’t know if this was intentional so did not fix it. I figured that tsuakai would ask if it was a concern. Or was this happening in another situation

Dazzer
December 11th, 2006, 11:26 PM
I guess the game is designed to be extremely linear. So coming in from the other side wouldn't be a problem