View Full Version : problem scrolling with depth enabled
zedetach
January 19th, 2008, 06:08 AM
i've been trying 2 get scrolling with depth enabled based on tonypa's tile based tutorial bt had little success in doing so.
The prob is after adding the codes to add depth, i'm nt too sure as to hw i'm suppose to determined the position of the new tiles as the tiles scroll.
Any help would be much appreciated.
zedetach
January 20th, 2008, 01:16 AM
walkable tiles are stored in the '_root.tiles.back' movieclip where as unwalkable tiles are stored in '_root.tiles'. Only tiles that are visible are attached and this initialization takes place only once when the map is loaded.
i believe the problem lies in the number of movieclips that are available for the walkable and unwalkable tiles because as the screen scrolls, the type of tiles to be displayed would vary depending on the map layout.
for example : -
initial state :-
_root.tiles - 13 unwalkable tiles
_root.tiles.back - 35 walkable tiles
after character moves two steps up :-
_root.tiles - 23 unwalkable tiles (lacking 10 spaces)
_root.tiles.back - 25 walkable tiles (has extra 10 spaces)
so, does anyone know of a way to dynamically attach tiles should the existing slots run out of space?
or is there another way to add depth using just one movieclip?
any help would be very much appreciated.
thank you.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.