Welcome to the GameMaker: Studio user manual! This document is divided into three parts with the aim of getting you introduced to the interface and basic workings of GameMaker: Studio before going on to more advanced usage and the functions available through GML (the GameMaker Language). All this function does is loop through all instances of the object ' objWall' in the room, and then use their position to 'flag' a cell in the mpgrid. After that we then add the wall instances into the mpgrid. We call this a dynamic path, since it is one that will be created dynamically and change throughout the game (rather than a pre-defined path that is created in GameMaker: Studio Path Editor). We also make another global variable and assign a new dynamic path ID to that. You should note here that since mpgrids are quite resource heavy, you should never make the grid smaller than is absolutely necessary - the smaller the cell size, the more processing it requires and the more possible it is that your game will lag later. So, add the following into the Create Event now: With this code, we are creating a grid that is 40 x 30 cells in size (we divide the room width and height by 16 to get the number of cells since our 'base' block size in the game is 16) and we are assigning it's ID to a global variable.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |