PDA

View Full Version : instantly changing tiles (walkable to non-walkable)



meatbag
May 24th, 2004, 08:49 AM
hello, everyone!

this question applies to a game i'm working on in Flash MX. the hero is centered on an isometric, scrolling map.

first, are there any good tutorials on turn-based combat in flash? i haven't been able to find any.

please note that i am new to actionscript, and i don't plan on using pathfinding in this project.

i'm just trying to figure out how i can change all walkable tiles on the map to non-walkable except for two tiles in each direction around the hero (or around the enemy, depending on who's turn it is.

does this make any sense? thanks so much in advance for any guidance.

meatbag
May 24th, 2004, 05:53 PM
anyone?? pleaaaase! i'm really stuck on this!

Blackspirit
May 25th, 2004, 09:15 AM
I havent done a tileable game, did you create the tile through an array? Can you work out the x,y coords of the area around your guys and then work out which tile lies under it.
Something like
if(tile._x<guy._x+20 && tile._y<guy._y-20){
make inactive;
}