|
-
Who needs pants?
Tile Movement Arrow.
I have been trying hard to get this working but it just seems to go wrond somewhere and i cant get it to work. What i have is a tilebased map. What i want is when i select a character his movement area to show up. Eg a maximum of 10 tiles. And once the character is selected the user can select which tile he wants to move to and draw an arrow between the character and the tile.
Heres an example i whiped up. Its not tilebased its just an example.
Click Here
-
So then, something like that Tactics Flash demo w/ the 3d characters?
Well, if you have your tile based engine setup then create a function... are you just going to alter the tiles? Say, give them a blue tint? So, say you want to move forward. Take the tile your on, then find out what the tiles are infront of you (from the array). Then, if you cant walk on the tile, go left or right. Youll have to do some simple pathfinding. Then you can just add the tiles that your theoretical path walked over to another array, and tint them or just tint as you go. Just an idea, I too have to do this, but not visually.
-Tyler
-
Neoteric
Welcome to my bomberman! this is exactly how I placed bombs in bomberman. What I did is do a loop for each direction that attaches the proper explosions, so, in your case, juse make a loop (like drawing a map). I.E. your character is at [5][5]. he can move 2 in any direction, so, start the loop at [3][3], then run it to [7][7], and in each, make sure that only 2 steps were taken from the starting tile, and if less were taken, tint the tile. Next only allow you to command movement on a tinted tile. I dunno. I'm rambling. it's not too hard
-
Who needs pants?
I sort of understand what you are try to say but not totally. Do you have anything you would be able to show me ?
-
Neoteric
ummmm ugh..... hold on lemme rip open bomberman....
Code:
for (ix=1; ix<=range; ix++) {
//
for (iy=1; iy<=range; iy++) {
//blow the x axis
name1 = "t"+x+"_"+(y+iy);
if (down) {
if (map[y+iy][x] == 0) {
if (iy == range) {
attachflash(x, y+iy, name1, "down");
} else {
attachflash(x, y+iy, name1, "vertical");
}
} else if (map[y+iy][x] == 2) {
down = false;
var A = random(3);
if (A == 1) {
addPowerUp(y+iy, x,1);
_root.cont[name1].gotoAndStop(1);
}else if(A==2){
addPowerUp(y+iy,x, 2);
_root.cont[name1].gotoAndStop(1);
} else {
_root.cont[name1].brick.play();
}
map[y+iy][x] = 0;
} else if (map[y+iy][x] == 1) {
down = false;
}
}
if you can make any sense of that s**t. It blows the the right side of the bomb on the x-axis. I'm sorry If this doesn't help. I'm sick. I'm tired. I'm going to sleep.
-
Who needs pants?
Thanks Lukstr, i should have a finished demo in the next few weeks
-
Who needs pants?
Ow and if anyone else had some other ways of doing it please do tell 
Lukstr Hope you get better
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|