|
-
leight.com.au
[help] iso - collect - tonypa's tbw tuts
hey guys,
for a project in ITS we need to create something for a client (one of the teachers) in flash. what I have to do is create an interactive movie/game for my teacher.
what it is meant to be at the end
It is meant to be an isometric view of the workshop, where you wander around into different sections of the workshop (woodwork room, metalwork room, etc). there are tools and machines lying around and when the character walks up to them, a screen pops up asking them whether they want to watch a tutorial on how to use that tool/machine or if they actually want to use it.
well what i have done so far is created the woodwork and metalwork rooms with walls and benches.
what i am stuck on is actually placing things (machines and tools) onto the map properly. I have done it with normal tile based, but cannot seem to figure out how to do it properly with iso :S it seems to place it in a different spot! however it does collect the item at the specified spot by myItems, but the graphic isnt in the right spot!
here is my map:
code: workshop1 = [
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], // 0
[ 1, 0, 0, 0, 0, 0, 0, 0, 0,10], // 1
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], // 2
[ 1, 0, 0,40, 0, 0,40, 0, 0, 0], // 3
[ 1,55, 0, 0, 0, 0, 0, 0,44, 0], // 4
[ 1, 0, 0,40, 0, 0,40, 0,44, 0], // 5
[ 1,55, 0, 0, 0, 0, 0, 0,44, 0], // 6
[ 1, 0, 0,40, 0, 0,40, 0, 0, 0], // 7
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], // 8
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0] // 9
];
here is my script for placing the items:
code: myItems = [
[0],
[[1,1,8]]
];
here is my script in the buildMap function:
code: game.items = myItems[game.currentMap];
for (var j=0; j<game.items.length/2; ++j){
for (var i = 0; i<game.items.length; ++i){
var name = "item" + game.items[i][2] + "_" + game.items[i][1];
game[name] = new game["Item" + game.items[i][0]];
game[name].position = i;
game.clip.attachMovie("items", name, 10001+i);
game[name].clip = game.clip[name];
game[name].clip._x = (game.items[j-i][1]*game.tileW);
game[name].clip._y = (game.items[j+i][2]*game.tileW/2);
game[name].clip.gotoAndStop(game.items[i][0]);
}
}
_root.tuts = game.tuts;
thanks guys!
leighton
ps: been doing tonypa's tuts, theyre excelent!
ps2: sory for the long post
Last edited by leight; 05-09-2004 at 02:01 AM.
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
|