1 means there is no sprite, in which case the dimensions may be reported as zero and/or infinity. Sprite_index: id of sprite assigned to object. Self: the current instance - you do not need to say "self" in object actions, just use the self variables directly The rest of these are built-in instance variables. Each instance of the object will have its own value. You can create custom instance variables simply by setting a value to an undeclared variable name. If you name a sound file "music" and you also have an included file called "music.ogg", the sound file will be set to "undefined" and will not run. Put all initialization code in this room's creation event to guarantee it is run before anything else. Start with an empty Initialization Room and make sure it is the first in the list so it is run first. You'd have to recreate the whole sprite to "move" it in the organization structure. GameMaker does not allow drag-n-drop to move sprites into or out of a folder. If there is no logical script to make the parent, create a well-named dummy script to provide a name for the group.Ĭreate a sprite folder per category, such as Buttons, Labels, Animations.Įdit: maybe not. Organize scripts into logical groups under parent scripts. Exception: event_inherited() stays in the object That way you don't have to remember what is in the object and what is in a script. Have all objects call scripts even for simple tasks. Thoughts on keeping code organized within GameMaker:ĭo not put event code into objects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |