You can then continue to use that randomx for the x position where you spawn your enemies. The value I filled in is 100, but in your case, it should be the maximum width of your game screen. )įor example in the Step Event: var randomx = random(100) //this will choose a random decimal number between 0 and 100 (If you want to use a different minimal value, use random_range(). With this, you can set a value to set a value of which random number it should make, between 0 and the value you set. Once you have an object, then use a random() value GameMaker is Object-oriënted, so understanding objects is a core mechanic to understand it's functionality. If you want to add functionality to a sprite, then use objects instead (and assing a sprite to that object). First off: Don't use just sprites for enemies, as sprites are just the image without functionality behind.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |