Beruflich Dokumente
Kultur Dokumente
I hope that it would help beginners to understand the basic usage of Game Maker.
I would highly encourage anyone to edit this file to refine and or add to its wisdom.
All I ask is a simple recognition as the author of this article.
Note:
MAIN1
Objects
The “Create Instance” Function Page 27
The “Create Moving” Function Page 28
The “Create Random” Function Page 29
The “Change Instance” Function Page 30
The “Destroy Instance” Function Page 31
The “Destroy at Position” Function Page 32
Sprite
The “Change Sprite” Function Page 33
The “Transform Sprite” Function Page 34
The “Color Sprite” Function Page 35
Sounds
The “Play Sound” Function Page 36
The “Stop Sound” Function Page 37
The “Check Sound” Function Page 38
Rooms
The “Room” Functions Page 39
Control
Questions
The “Check Empty” Function Page 50
The “Check Collision” Function Page 51
The “Check Object” Function Page 52
The “Test Instance Count” Function Page 53
The “Test Chance” Function Page 54
The “Check Question” Function Page 55
The “Test Expression” Function Page 56
The “Check Mouse” Function Page 57
The “Check Grid” Function Page 58
Other
Code Scope Classifiers Page 59
The “Repeat” Function Page 59
The “Exit Event” Function Page 59
The “Call Parent Event” Function Page 60
Code
The “Execute Code” Function Page 60
The “Execute Script” Function Page 61
The “Comment” Function Page 62
Variables
The “Set Variable” Function Page 63
The “Test Variable” Function Page 64
The “Draw Variable” Function Page 65
Extra
Particles
The “Create Particle System” Function Page 78
The “Destroy Particles System” Function Page 79
The “Clear All Particles” Function Page 80
The “Create Particle” Function Page 81
The “Particle Color” Function Page 82
The “Particle Life” Function Page 83
The “Particle Speed” Function Page 84
The “Particle Gravity” Function Page 85
The “Particle Secondary” Function Page 86
The “Create Emitter” Function Page 87
The “Destroy Emitter” Function Page 88
The “Burst of Emitter” Function Page 89
The “Stream from Emitter” Function Page 90
CD
The “Play CD” Function Page 91
The “Stop CD” Function Page 91
The “Pause CD” Function Page 91
The “Resume CD” Function Page 91
The “If CD Exist” Function Page 92
The “If the CD is Playing” Function Page 92
Other
The “Set Cursor” Function Page 92
The “Open Webpage” Function Page 93
To put it bluntly:
This function makes your object moves.
A simplified version of the “Move Free” function that allows you to assign both speed
& direction to your object.
Elaboration:
When you drag and drop this icon into the “Actions” space, this dialog will appear.
In this particular dialog, the bottom left button is selected, meaning your specified
object will move along that very direction and the speed is how many pixels it is
going to move in that direction per frame.
If you want the object to choose a random direction, select all the direction buttons
like so:
This will make Game Maker decide randomly which side to move.
If you also select the center “stop” button, do not be surprise if your object doesn’t
move if it happens to choose that.
If the “Relative” checkbox was ticked, Game Maker will simply “increment” the
speed, please note, only the speed is incremented. If you want the direction to
influence the already establish direction of your object, you should be using the
“Move Free” function.
If you choose “Other”, this will affect the movement of the object it collides with.
The only place something like this will be of use is in the collision event.
Choosing “Object”, specifying which object, and placing it in the collision event will
produce some very cool effects like explosions, disintegration or even a simple
snooker ball game effect where a target hits a group of object and they starts moving
randomly in chaos, that is, if you specify the movement to be random by choosing
multiple directions.
To put it bluntly:
This is what you would normally use to specify or add to the already established
direction of your object.
Elaboration:
The direction is specified in degrees, the orientation of the angle is illustrated in this
diagram.
This single function is capable of behaving like the “Move Fixed”, “Speed
Horizontal” & “Speed Vertical” functions.
Executing the “Move Fixed” function with a moving object will cancel out its
direction.
You can do the same thing using the “Move Free” function by leaving the “Relative”
checkbox unchecked.
However ticking “Relative” in the “Move Fixed” function will ONLY increment the
already establish speed while doing the same thing in the “Move Free” function will
increment both the direction [instead of canceling it out] and the speed as well, this is
what you will usually wants, incidentally, this is also how the “Speed Horizontal” &
“Speed Vertical” will behave when their “Relative” checkbox is ticked.
The ONLY differences between the “Move Free” & the “Speed Horizontal”/“Speed
Vertical” functions is that the “Speed Horizontal” & “Speed Vertical” functions allow
you to add to the existing orientation of your object without incrementing the speed
by not ticking their “Relative” checkbox.
To put it bluntly:
Specify a point for your object to start moving towards but it WON’T stop there !
Elaboration:
The x and y textbox is where you specify a single point for your object to move
forward to.
The object will not stop when it reaches its destination, the function merely allows
you to set the “direction” of your object by referencing a point to move forward to.
To put it bluntly:
Add a “Horizontal” or “Vertical” tendency to the already established orientation.
Elaboration:
The “Speed Horizontal” and “Speed Vertical” dialog.
The only time you will use this function instead of the “Move Free” function is when
you want to add to the direction of your object without increasing the speed by not
ticking the “Relative”checkbox.
If you tick the “Relative” check box, you might as well use the “Move Free” function
with its corresponding “Relative” checkbox ticked as well. They will behave the same
way influencing both the already establish direction & speed of your object.
To put it bluntly:
Gravity
Elaboration:
This function allows you to declare to Game Maker a constant force in whatever
direction you’ve chosen to specify in the direction textbox.
The MAIN different between this function and all the other “Move” and “Speed”
functions is that the specified speed [in this case, renamed as gravity] is always auto
incrementing, giving the impression that the longer something falls, the faster it falls,
aka Gravity.
The most common thing beginner do, is place a ball with gravity effect on and let it
bounce [we’ll discuss this function later] thinking that it would behave like the real
world, that the ball would eventually stop.
Well, it doesn’t.
This is due to the simplified algorithm handling the bounce effect, the algorithm
simulates a perfect world where all the energy is completely transferred back to the
ball after it hits an object.
If you are aiming for physical realism, you might eventually want to incorporate more
accurate simulations via script involving material bounciness, force
absorbance/transference etc.
Note: Setting speed to zero in the “move free” function would NOT turn off gravity,
you have to implicitly declare gravity speed to be zero to stop it.
To put it bluntly:
Reverse the current Horizontal/Vertical direction of your object’s trajectory.
Elaboration:
This function flips the already established Horizontal/Vertical trajectory of your object.
To put it bluntly:
This function decreases your object’s speed over the course of time.
Elaboration:
Think of it as the direct opposite of the “gravity” function.
The “gravity” function increments the speed in a given direction over time while the “friction”
function decrease the speed over time [frames to be exact].
To put it bluntly:
Re-Specify your objects location.
Elaboration:
Remember, if your object already has a speed assign to it, it will continue to move after its
reallocation.
If you specify a location that will trigger a collision event, this function will simply not carry out
unless of course, you did not specify a collision handling event in which case Game Maker will know
it’s ok that two object occupies the same space.
To put it bluntly:
Move your object back to its original position specified during the room creation
stage.
Elaboration:
As does the “Jump to Position” function, if the object’s speed property is not zero, it will continue to
move even after this function is called.
To put it bluntly:
Relocate your object randomly.
Elaboration:
The “snap horizontal” and “snap” vertical textbox allows you to specify an overall “grid” for your
object to randomly reside in.
Remember, as does the “Jump to Position” function, if the random function randomized a location that
will cause a collision with another object, this function will simply not carry out unless of course, you
did not specify a collision event to begin with, then its ok.
To put it bluntly:
Snap your object to the nearest grid intersection.
Elaboration:
This function snaps your object’s registration point [origin] to the intersection point of the closest grid.
If you want your object to be inside a grid when this function is called, make sure your do not center
your object’s origin.
To put it bluntly:
Wrap your object around if it leaves the screen.
Elaboration:
This function wraps your object’s motion around the screen if it leaves the screen.
You can determine whether this function will take into consideration the Horizontal or Vertical motion
of your object or both.
You would most likely only place this function in the “Outside Room” event.
To put it bluntly:
Make sure after collision, your object sits right on your platform instead of floating
above or passing through it.
Elaboration:
You would normally place this function in the “Collision” event and right before this function would
normally be the “Move Free” function where you set the current speed of your object to zero, in some
cases you might also have to set gravity to zero too.
To put it bluntly:
This function makes your object bounces off collided objects.
Elaboration:
Under the “precise” textbox, you get to choose whether you want the collision calculation to be more
accurate instead of simple “Bounding Box” collisions, setting it to “precisely” enable relatively
accurate bounce effect resulting from curve surface collision.
Please note that this is a simplified “bounce” function, in the real world, energy would be released as
sound and heat and the resulting object would lost kinetic energy, you would normally not have to
worry about this but please take note of this when you are using this function with the “gravity”
function as it would not behave like reality.
To put it bluntly:
Set the path/guide where you want your object to follow.
Elaboration:
These are the options available for the “at end” textbox:
Stop:
Stop at the end of the path.
Please note that even if your object initially has a speed before you set a “path” for it, it will still stop if
you choose this option.
Continue from here: It will continue to travel along the same line pattern outlined by the path relative
to its end point. In the case of a circle or any close loop, setting this option will have the same effect as
the “continue from start” option.
If you were to pick “relative”, your object will start following the path pattern from where it’s at.
If you picked “absolute”, your object will “jump” to the path’s starting point & follow the path straight
on.
To put it bluntly:
Detach your object from the path.
Elaboration:
Please note that the speed your object possesses before it was set to follow the path is not reinitialized.
This is an extremely brutal way to stop your object from following a path, the more friendlier approach
is to use the “Path Speed” function for you can continue following the path again later on if you choose
to, but with the ”End Path” function, all is gone, you have to “Set” the path again.
To put it bluntly:
Reset the position of your object to the beginning or the end of the path.
Elaboration:
Entering “0” will place your object at the beginning of the path, “1” will put it at the end, you are free
to enter any digits in-between.
Please note that if the speed of your object is not zero, it will continue to move the minute it is
repositioned along the path.
To put it bluntly:
Speed up, slow down or stop your object along the path.
Elaboration:
This function allows you to modify the speed of your object along the path, zero to stop it.
To put it bluntly:
Similar to the “Move Towards” function, except that it does stop when it reaches its
destination.
Elaboration:
This function will move your object a certain amount of pixels specified by the “speed” towards the
destination coordinate.
If your object hits a solid object [or any instance if you select that] before it reaches its destination, it
will just stop there.
Remember to remove any speed if your object has any before engaging this command or else the two
separate properties would fight each other, example your object have reached its destination and has
stopped but the previously established speed would pull the object away from its destination, this
function would then again try to pull the object back to the destination creating an unsettling
movement.
To put it bluntly:
Move toward destination but avoiding obstacles.
Elaboration:
This is a SUPER AWESOME function that is sort of AI like in that it will move your object toward the
destination but make it smart enough to avoid obstacles.
It doesn’t always works, sometimes it would just go round & round without getting out of the “trap”,
but if you leave plenty of room for it to bump around, this function will eventually find its way.
Cool function. Think PACMAN Enemies.
Like the “Step Towards” function, make sure your object have zero speed before engaging this
command.
To put it bluntly:
Create instances of any object.
Elaboration:
The object textbox is where you choose what object this function will replicate.
When you turn on “Relative”, you will create the instance relative to your object’s current location.
To put it bluntly:
Create a moving instance.
Elaboration:
Now you can choose either to establish the motion of your object after creation by using this function
or to have the movement of the object established in its creation event.
To put it bluntly:
Create random objects
Elaboration:
This function allows you to specify four objects that you would like the random engine to pick one
from and create an instance of it.
If you only want the random engine to choose from two objects to make an instance out of, just leave
the other two textbox as “No object”.
To put it bluntly:
Change your current object to another.
Elaboration:
The only thing you will probably have some questions about is what is the “perform events” textbox
all about.
On every object, there is a “Create” and “Destroy” event which you might have designated some
actions in those events.
If you want your current object and the next object it’s changing into to carry out those actions, select
“yes” for the “perform events” textbox.
The most common use for this function is when your object encounters a missile, it changes into an
explosion and destroys itself.
To put it bluntly:
DESTROY your object.
Elaboration:
Use this function to destroy an instance, whether it’s the object that’s calling this function [Self], the
object that’s colliding with it [Other] or any object you specified [Object].
To put it bluntly:
Set a deadly coordinate where any object that is over it will perish.
Elaboration:
Setting the coordinates doesn’t staple that location as the location of death once and for all
That’s why you might want to place the action in the step event to make it permanent if that’s what
you’re after.
To put it bluntly:
Change the sprite of your current object.
Elaboration:
When you change the sprite, you are only changing the “look” of your object, not the nature of it, so
for example, your original object has a collision detection function, after changing the sprite, your
“new” sprite will also have collision detection based on the shape of the “new” sprite.
The speed we are talking about here is the speed of the sprite animation.
Zero means no animation, 1 is normal, more than 1 to speed up the sprite animation.
To put it bluntly:
Scale, rotate and/or flip your sprites with this function.
Elaboration:
It’s perhaps intriguing to note that “mirror and flip” behaves like a 180° rotation.
As there is no “Relative” checkbox here, don’t expect your object to rotate 90° again and again
everytime this function is called [that is…if you set it to rotate 90°], you’ll have to declare a variable
and increment that to rotate incrementally.
To put it bluntly:
Add a layer of color hue above your object.
Elaboration:
The “color” option allows you to choose a color to overlay on top of your sprite.
The “alpha” option allows you to set the transparency of your sprite, 1 is normal, 0 is totally
transparent.
To put it bluntly:
Play Sound…
Elaboration:
To put it bluntly:
Stop Sound
Elaboration:
To put it bluntly:
Check whether a certain sound is currently playing.
Elaboration:
To put it bluntly:
Room Navigation functions.
Elaboration:
The “Different Room” function allows you to choose a specific room.
For both the “Previous Room” and “Next Room” function, if there are no other rooms to move to, you
will receive an error, that’s why you should always use the two “Check if Room Exists” functions
when appropriate.
All of these functions [except the “check” functions] allow you to choose a transition to the designated
room of choice.
To put it bluntly:
Use this when you want something to happen after a certain time [step].
Elaboration:
The “number of steps” is based on frames per sec, for example if your room refresh rate is 30 frames
per sec, by typing “150”, you are asking Game Maker to set off event “Alarm 0” after 5 seconds, that
is, if you choose “Alarm 0” in the “alarm no” textbox, you can choose “Alarm 0” to “Alarm 11”.
Please note that setting this event once and for all doesn’t mean the event will intervally execute after
every whatever frames you have designated, you’ll have to reset the alarm continuously for that to
happen.
To put it bluntly:
HANGS your program for a designated amount of time.
Elaboration:
The redraw in this case allows you to decide whether you want the screen to update
and show you the event that caused the “sleep” event by setting redraw to true, or
straight away execute this event first.
To put it bluntly:
Appoint a timeline that you have created to your object.
Elaboration:
To put it bluntly:
Set how many frames into the timeline the code should start from.
Elaboration:
Contrary to popular belief, the “Position” doesn’t mean “moment” though it would
have made more sense.
No, the “Position” in this case means “frames”, for example during the timeline
creation stage, you set about the playing of a certain sound at 150 worth of frame
passing time[5 seconds in a 30f/s frame rate setting], by using this function to set the
timeline back to its 150’s state, it will replay that sound again.
To put it bluntly:
Display a message box.
Elaboration:
This is how the message box looks like for this text.
To put it bluntly:
This function will show the Game Info in another window.
To put it bluntly:
Supposably display a video.
Elaboration:
To put it bluntly:
These two functions perform exactly as they are named, there are no dialogs for them.
To put it bluntly:
A simple mechanism for you to save your game’s current status.
Elaboration:
Please experiment with this function to test whether the things you hope this function
would save are saved, if not, you might have to create your own saving mechanism.
To put it bluntly:
Replace selected sprite with another sprite loaded from file.
Elaboration:
Please note that the new change in sprite shape will be taken into consideration during
collision.
The “images” textbox is really neat, by providing an image strip other than gif that
contains multiple sprite images and specifying how many images are there, this
function will “separate” them and turn them into animated sprites like animated gif !
It’s a bit like the background “use as tile set” where a single image can be split.
To put it bluntly:
Replace your existing sound with an external one.
Elaboration:
To put it bluntly:
Replace your existing background with an external one.
Elaboration:
If you are replacing a background that was used for tiling, make sure the replacement
contains the same tile division and pixel size.
To put it bluntly:
Returns “True” if the coordinate you specify is free from objects.
Elaboration:
You can specify whether to detect “all objects” or “only solid objects”.
By checking the “NOT” checkbox, you are telling Game Maker to return “True”
when there IS something on the specified coordinate.
To put it bluntly:
Returns “True” if the coordinate you specify will give raise to a “Collision” event if
your object were to be there.
Elaboration:
If you tick the “NOT” checkbox, the opposite will return “True”.
To put it bluntly:
Returns “True” if the object you specify is in that coordinate.
Elaboration:
If you tick the “NOT” checkbox, this function will return “TRUE” if the object you
specify is NOT in that coordinate.
To put it bluntly:
Test the number of instances of your specified object in the room.
Elaboration:
To put it bluntly:
Designate a one out of whatever chance of an action being carried out that is assigned
to it.
Elaboration:
By typing 6, I’m calling this function to return “True” under the chance of 1 out of 6
times it’s being called, more “sides” decreases the probability, the opposite would
increase it.
To put it bluntly:
Display a dialog with a “Yes/No” button.
Elaboration:
If you want this function to return “True” if the user click “No”, tick the “NOT”
checkbox.
To put it bluntly:
A very generic expression test function.
Elaboration:
To put it bluntly:
Detect which mouse button is down.
Elaboration:
Returns “True” if the current mouse button pressed matched the option that was
chosen.
To put it bluntly:
Detects whether your object is aligned with a certain grid.
Elaboration:
This function detects whether your object’s position aligns with the grid’s spacing.
To put it bluntly:
The complete “if then else” program control package.
Elaboration:
Every programming language has them in one form or another.
Think of the “Triangles” as brackets.
To put it bluntly:
Allows you to repeat a section of code a specified number of times.
Elaboration:
Just make sure that if you have more than one action for this function to carry out, put
them within the code scope triangles .
To put it bluntly:
This function will stop executing any codes if there are any left in the “Event” that
triggers it.
It doesn’t matter whether it is inside a triangle code scope or not, any actions
outside that scope will also not execute.
To put it bluntly:
Call the parent’s actions associate with the same event.
This is only applicable if your object has a parent associated with it in the first place.
To put it bluntly:
Dragging this icon into the “actions” section will bring out this dialog
Where you can type in functions using the Game Maker Language.
To put it bluntly:
Let you select the script to execute.
Elaboration:
You can also choose to pass arguments to the script if you need any, up to five of
them.
To put it bluntly:
Allows you to place comments in your action.
To put it bluntly:
Set the value of a variable or create one.
In this case, I’m setting the value of the build-in “score” variable.
To put it bluntly:
Test the value of a variable.
Elaboration:
In this example, I’m testing whether the variable “score” equals to 0, this function will
return “True” if it is.
You can also test whether it’s “smaller than” or “larger than” your indicated value.
To put it bluntly:
Print out the value of a variable on screen.
Elaboration:
To put it bluntly:
Change the value of the score.
Elaboration:
Check the “Relative” checkbox if you wish this function to increment the existing
score value.
To put it bluntly:
Test the value of the build-in score variable.
Elaboration:
To put it bluntly:
Print out the value of score on the screen.
Elaboration:
This function will print out the value of the score variable on screen when place under
the “Draw” event.
To put it bluntly:
Show the high score table.
Elaboration:
A 366 by 432 pixels “score board” will appear upon the calling of this function.
If the background you’ve selected did not match the 61:72 ratio of the high score
board, it will be “scaled to fit”, resulting in visual distortions.
The “new color” is the color of the text when you are typing in your new score, that
is…if you made it to the top ten scores.
The “other color” is the color of the past scores and the names that belongs to them.
To put it bluntly:
This function kills the old score board.
To put it bluntly:
Set the lives of your object.
Elaboration:
Check the “Relative” Checkbox to increment the value instead of dead-on setting it.
To put it bluntly:
Test the value of the “lives” variable.
Elaboration:
Check the “NOT” check box if you want this function to return “True” upon a
negative result.
To put it bluntly:
Print out the number of lives on screen.
Elaboration:
To put it bluntly:
A beautiful function that draws out the number of life you have as images.
Elaboration:
With this function, you can choose a sprite that will be used as the symbol for “Life”
and it will be printed on screen in a horizontal manner incrementally depending on
how much life you’ve got.
This is a wonderful function, but do note that as with all “drawing” functions, this is
to be placed in the “Draw” event.
To put it bluntly:
Set the value of Health.
Elaboration:
As does all “set value” functions, if you check the “Relative” checkbox, you will
increment the existing value.
If the value of health is zero the “No More Health” event would execute.
To put it bluntly:
Test the value of “Health”.
Elaboration:
As does all “Test” functions, checking the “NOT” checkbox will inform the function
to return “True” upon a negative result.
To put it bluntly:
Draw a “Heath” Progress Bar.
Elaboration:
This function allows you to indicate the size of the progress bar and the look of it.
To put it bluntly:
Allows you to decide what you want to show on the program’s title bar.
Elaboration:
To put it bluntly:
Get Game Maker ready to do the whole particle thing.
Elaboration:
For some very un-intuitive reasons, you have to TELL Game Maker to “get ready” to
display particles before you execute any particle generation.
One would expect Game Maker to “get ready” the minute we call the emitter to start
emitting particles but nooooo.
To put it bluntly:
Destroy the particle system overhead.
Elaboration:
Use this to free all memory that had been allocated for the whole particle system
generation procedures.
To put it bluntly:
Remove all traces of particle that are currently on screen.
Elaboration:
Please note that new particles will still be generated, hence appear on screen, if the
emitter is not destroyed.
To put it bluntly:
Set the type of particle you want to create in this function.
Elaboration:
Snow:
To put it bluntly:
Set the color of the generated particles.
Elaboration:
Choose “Mixed” to have your emitted particles randomly inherent to one of the two
colors you specify.
Choose “Changing” to tell you particles to gradually change from color1 to color2
during birth to death.
The “Alpha” setting allows you to specify the transparency of your object from birth
to death. The dialog presented shows a typical alpha setting of opaque to transparent
during birth to death of your particle.
To put it bluntly:
Allows you to set the lifespan of the particles.
Elaboration:
The lifespan of the particles will be between the numbers you specified in the “min
life” and “max life” textboxs.
To put it bluntly:
Set a speed and direction for your particles.
Elaboration:
Your particle speed will be a random pick between the two values you put in “min
speed” & “max speed”.
Same goes for the speed orientation for the two textboxes “min dir” and “max dir”.
The friction is the amount of speed deduction per step for your particle.
To put it bluntly:
Associate gravity with a given particle id.
Elaboration:
Use this function to set or change the gravity/wind force that is acting on your
particles.
To put it bluntly:
Create secondary particles from your initial particles.
Elaboration:
You specify which particle id you wish to “secondary generate” from in the type id.
You specify the type of secondary particles you want to generate per step of the initial
particles under “step type”.
You specify the number of secondary particle generated per step of the initial particle
in the “step count”, by specify a negative in front, you are specifying the particle to
generate every x step you indicate after the negative sign.
The “death type” indicates the type of secondary particle you want to generate upon
the death of the initial particle.
The “death count” specifies the number of secondary particles you want to generate
upon the death of the initial particle.
To put it bluntly:
Create the particle emitter.
Elaboration:
This function allows you to set the size of the particle emitter.
To put it bluntly:
Destroy the particle emitter.
Elaboration:
To put it bluntly:
Create a one-time generation of particles.
Elaboration:
To put it bluntly:
Keeps on generating a specified number of particles per step.
Elaboration:
This function will keep on generating the specified number of particles per step from
the specified emitter.
To put it bluntly:
A very simple function to start your audio CD playing.
Elaboration:
To put it bluntly:
Stop the Audio CD if it’s playing.
To put it bluntly:
Pause the CD.
To put it bluntly:
Resume Playing the CD.
To put it bluntly:
This function returns “True” if CD exist.
The “If the CD is Playing” Function
To put it bluntly:
Returns “True” if CD is currently playing.
To put it bluntly:
Change your cursor or hide it.
Elaboration:
You can choose what sprite you want your cursor to change into in the “sprite”
textbox.
If you choose the “No sprite” and “don’t show” options, you will essentially hide your
cursor.
Please note that all cursor change effect will only remain valid inside your game
window.
To put it bluntly:
Open your default Web Browser to point to the designated website.
Elaboration:
This command can also act as a shell command, it can essentially open any file format
if you computer have the program associated to open them, but if your computer
don’t, Game Maker will give you an error message.
This action does not work in secure mode.
To put it bluntly:
Draw Sprite
Elaboration:
Please note that if the sprite you want to “draw” do not match the “rect” size of your
original sprite, collision events will NOT work correctly as the collision “rect” will be
taken from the original sprite.
To put it bluntly:
Draw the Background on screen.
Elaboration:
To put it bluntly:
Draw Text on the screen
Elaboration:
If you did not use the “Set Font” function to change the font, the default font will be
“Arial” 12 points.
To put it bluntly:
A more advance form of “Draw Text”.
Elaboration:
This function gives you the added option to scale and rotate your text.
To put it bluntly:
Draw a rectangle on screen.
Elaboration:
You specified the size of the rectangle and whether it is to be filled or outlined.
You set the color in the “Set Color” function.
To put it bluntly:
Draw a Left to Right Gradient Rectangle.
Elaboration:
“Color 1” specifies the starting color of the gradient from left to right.
To put it bluntly:
Draw a Top to Bottom Gradient Rectangle.
Elaboration:
“Color 1” specifies the starting color of the gradient from top to bottom.
To put it bluntly:
Draw an ellipse.
Elaboration:
You get to choose whether you want to draw a filled or outline-only ellipse.
To put it bluntly:
Draw a gradient ellipse from the center outward.
Elaboration:
“Color1” is the starting color of the ellipse from the center, “Color2” is the final color
of the Ellipse’s exterior.
To put it bluntly:
Draw a line.
Elaboration:
To put it bluntly:
Draw an arrow.
Elaboration:
The “Line” of the arrow will always be one pixel but you can adjust the size of the
arrow head in the “tip size” textbox.
To put it bluntly:
Set the color of your drawn objects.
Elaboration:
This function sets the color for your Texts, Rectangles, Ellipses, Lines and Arrows.
This function can be placed outside the “Draw” event.
To put it bluntly:
Set the font of your drawn text.
Elaboration:
To put it bluntly:
Toggle between “FullScreen” and “Window” State
Elaboration:
To put it bluntly:
Take a snap shot of your program.
Elaboration:
Even if your program had been set to fullscreen, the snapshot function will still only
capture your program at its original resolution without the title bar.
To put it bluntly:
An extremely simple way to create a variety of particle effects.
Elaboration:
This function does not need to be placed in the “Draw” event to work as it is
essentially based on the particle system.
Firework: Smoke:
Flare: Cloud:
Rain: Snow:
When you choose “below objects”, the effect will be drawn behind your object.
As with all things, with simplicity comes limitation, when you are no longer satisfied
with prebuild effects, feel free to use the native particle system.