Grid for scenerio combat

Talk about making games.

Grid for scenerio combat

Postby phractus » Wed Jul 21, 2004 3:46 pm

Ok so Im starting to work on a scenerio combat engine to put into a game. The question I have is can you set up a grid and then reference cells withen it for movement and sutch? I was thinking of just cloning a number of cells and make them transparent then use them as reference points. But need to figure out how wide a drawn cell is so can have coordinate of the middle of eatch cell. So is there any to just have a function thats like move_to(cell#) Instead of having to actually tell it what coordinates to go to? Im not sure if this is clear...

Ill work on it and let ya know if I have any luck.
phractus
 
Posts: 77
Joined: Mon Mar 08, 2004 1:25 am
Location: Rochester, NY, USA
Score: 0 Give a positive score

Postby phractus » Wed Jul 21, 2004 11:22 pm

ok I think this will hafta be done with an array and pointers....

If anyone thinks of anything let me know Ill continue working.

~peace~
phractus
 
Posts: 77
Joined: Mon Mar 08, 2004 1:25 am
Location: Rochester, NY, USA
Score: 0 Give a positive score

Postby makslane » Thu Jul 22, 2004 1:42 pm

You can create a array of Wire Frame actors (don't draw in game mode)
See the breakout demo, to see how create the array

To move:
In a Script Editor action, use something like this:

MoveTo("your actor", array[i].x. array[i].y, velocity);
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron