This random number will be a decimal, though that's not important in your scenario, but keep it in mind when you want to compare a random number with an integer number, that it'll need to be rounded first. (and then set the y position to 0 to make them appear on top of the screen) 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 1 Answer Sorted by: 0 First, in the create event, set imagespeed 0 Then you have to play the animation once. 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. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |