The Very basics of GML (Probably needs DnD experience)

View previous topic View next topic Go down

The Very basics of GML (Probably needs DnD experience)

Post  Marky on Thu Jun 13, 2013 5:52 am

Hello every one, I feel as I haven't been around much, and I haven't due ot work but I though I would come up with something for the small community of WarCryStudio's. In this tutorial I will put SOME of the very basics of GML (game maker Language) for any one who wants to learn GML, these tips and pointers will also work in JUST about any other programing language...

Some key words.
Variable
Global variable
string
object (strictly Gamemaker)
script (mostly Gamemaker)

I will go over these terms and explain them as well as possible.

Object - An object in gamemaker is most usually the sprites, buttons, or anything else that has any kind of function. Most objects have functions rather its A wall for other objects to bounce against, A simple item for the main object to find and collect, or the main character itself.

Variable - A variable is something that holds a value, this certain variable is called a local variable in gamemaker, it only pertains to a Single object. in use it would look like so variable_name = x (X can be anything numeric/alphanumeric.)

Global.variable - A global variable effects everything in the room (unless its Persistent). Global variables could be anything from Ammo in an FPS/TDS or health. They are used like so Global.Variable_name = X (X is anything numeric/alphanumeric)

Strings - A string is basically A sentence. "This is a String." They are used to display messages, or variables.

Scripts - Scripts in GML are much different then scripts in RM, they are separate scripts (separate scripts then the ones in the objects.) maybe used at certain times, or used with certain systems that don't need the script built inside the objects. As an example when I built my save system in my game, I used scripts for what to save/load cause it was alot, and I didn't want to bog down the speed of my game with saving multiple variables so I made the object call on my save and load scripts.

That is all for now, Like I said above the info about variables can be used in other languages other then GML. I may also write more but for now this is enough and I'm out of time.

Marky
moderator
moderator

Posts : 9
Join date : 2012-10-16

Character sheet
Race: Human
class: warrior
skills:

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum