|
|
|||||
Topic, Path 4 Mouse Help | ||||||
| ||||||
You must register or log in to post a message.Are your sure I can just have it like this? 0010110300 And that I don't need something like: [0,0,1,0,1,1,0,3,0,0] Becareful if you plan to allow a lot of item combinations to stack on the same location in the grid. Because for each combination you need a character (a number or a letter). Is it a good way to use (will it be easy to unserealize the data)? I want loading the data and making a level out of it to be as easy as possible. onClipEvent(enterFrame){ trace("mouse="+_root._xmouse+","+_root._ymouse+" this="+this); if(this.hitTest(_root._xmouse,_root._ymouse,true)){ trace("hit"); Mouse.hide(); } } I'm writing the code on a movieclip inside another movieclip. Does that help? As you decided to make your source available, if ou have some spare time to learn SVN, I would recommend to use google code. google code provides you with a free and ready to use SVN server. It will be very easy to upload the latest version of your fla and for us to update with your latest version. Then we can have a look very easily at your code. You can install Tortoise SVN (client SVN). Also, please may somebody tell me what is wrong with this code? I'm trying to hide the mouse when you hit the invisible block. Basically, the level data is a string that represents the level. How its is constructed, is your choice. Examples : Sokoban level format. Another example of format. The separator is "_" and the values [..] are integers with their description inside. Carriage returns has been added to make the format clearer but they are not part of the format. first we start with the header describing the length and height of the tile grid, and the number of tile types that will follow after the header. [grid length]_[grid height]_[n = nb of tile types] _[tile type 0]_[nb of tiles]_[tile 0 grid index]_[tile 1 grid index] .... _[tile type 1]_[nb of tiles]_[tile 0 grid index]_[tile 1 grid index] .... .... _[tile type n]_[nb of tiles]_[tile 0 grid index]_[tile 1 grid index] .... This will form a string that is created in the editor (you can start with the basic text editor like theNinja did with his game). The game needs to make the reerse, ie interpret this string to create a grid and play it. Okay, I would like to know how to create the level data, and load it, and make all the objects work, and a lot of other stuff too. I think I might have started too early, but I was dying to make a game for BL, and I can't really give up now! So basically I would like to know how to make a tile based map, that opens up on the screen when you play the game, or something like that. I might be able to manage it myself if the game was not for BL, but using the API and making arrays are two completely new things to me! | Flash game developmentFirst post of the topicOkay, I would like to know how to create the level data, and load it, and make all the objects work, and a lot of other stuff too. I think I might have started too early, but I was dying to make a game for BL, and I can't really give up now! So basically I would like to know how to make a tile based map, that opens up on the screen when you play the game, or something like that. I might be able to manage it myself if the game was not for BL, but using the API and making arrays are two completely new things to me! |