![]() In the description comment change the description to Set up variables.Click Add Event button in the Events box and add a Create event.If you want to setup the game to work on most desktops and laptops, on the left side, under room settings change the width to 960 and the height to 640 Code the player object to move Drag the objPlayer object into the room.For example, random (100) will return a value from 0 to 100.00, but that value can be 22.56473 You can also use real numbers and not integers in this function like this - random (0.5), which will return a value. This can be seen in the Room Editor’s Layers panel. This function returns a random floating-point (decimal) number between 0.0 (inclusive) and the specified upper limit (inclusive). Make sure you are in the Instances layer of the room.From the Assets Browser, double click room0 or whatever the default room setup is called in GameMaker. ![]() To do this click on the 3 dots in the box beside No Sprite. Assign it the sprPlayer sprite you should already have created.Name the object objPlayer – note: You should always prefix your objects with the letters obj.In the Asset Browser / Resource menu area, right-click Object and click Create object.Tutorial 3: Create a player object, movement & animation
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |