Jump to content


Photo
* * * * * 2 votes

The Complete Beginners Guide To Gml Coding


  • Please log in to reply
78 replies to this topic

#61 TemplarX2

TemplarX2

    GMC Member

  • GMC Member
  • 93 posts

Posted 15 March 2010 - 04:17 AM

When the variable message_choice is assigned a random number then the message keeps flickering on the screen. But when i replaced the random number by a fixed integer, you get only one message as expected. I used the "draw" event to execute the script. Why isn't not working with the random function?
  • 0

#62 flexaplex

flexaplex

    GMC Member

  • Global Moderators
  • 4809 posts
  • Version:GM8

Posted 15 March 2010 - 09:32 PM

When the variable message_choice is assigned a random number then the message keeps flickering on the screen. But when i replaced the random number by a fixed integer, you get only one message as expected. I used the "draw" event to execute the script. Why isn't not working with the random function?

The draw event is executed continuously (every step) so it keeps generating a random message every time you go to draw it. So you need to set message_choice in a fixed location (like a creation event or key press event depending what you want).
  • 0

#63 B Factory LLC

B Factory LLC

    We're awesome!!

  • New Member
  • 511 posts

Posted 15 March 2010 - 09:47 PM

Very nice. This will help newbies. :)
  • 0

#64 peceecar

peceecar

    GMC Member

  • New Member
  • 321 posts

Posted 26 May 2010 - 10:42 AM

thanks for the guide just starting to learn GML
  • 0

#65 Quagsire

Quagsire

    GMC Member

  • New Member
  • 17 posts

Posted 25 July 2010 - 09:45 PM

WoooW

YOU GUYS ARE THE BEST =D!!! SERIOUSLY!!

I'm gonna start reading and going through everything! So be prepared for lots of noob questions =D!!!!
  • 0

#66 flexaplex

flexaplex

    GMC Member

  • Global Moderators
  • 4809 posts
  • Version:GM8

Posted 25 July 2010 - 11:54 PM

WoooW

YOU GUYS ARE THE BEST =D!!! SERIOUSLY!!

I'm gonna start reading and going through everything! So be prepared for lots of noob questions =D!!!!

Surprisingly there hasn't really been questions from any of the Novice FAQ sources. Hopefully perhaps they're just so well written noone needs to ask questions :)

Edited by flexaplex, 25 July 2010 - 11:55 PM.

  • 0

#67 trevorooski

trevorooski

    GMC Member

  • New Member
  • 31 posts

Posted 08 November 2010 - 03:49 PM

I am fresh of of using scratch... a beginner D&D that is very restrained. I am just learning how everything in the higher up systems work. I have recently acquired GM8 and RPG Maker VX. I am hoping to try and understand basic GML and furthermore finish a platformer type game i started on scratch. My quiestion is about the draw_text(x,y,string). I have a very basic platform thing that i have assembled so far. the character is a block and he can jump and move right and left. when i put:
name= "gooby"
draw_text(100,100,name)

Nothing happens when i play. The game works fine, but "gooby" doesn't appear. If you could help, it would be gratly appreciated. Also if you could lead me to some other places to find guides on GML and D&D i would be very happy. ;)
  • 0

#68 flexaplex

flexaplex

    GMC Member

  • Global Moderators
  • 4809 posts
  • Version:GM8

Posted 10 November 2010 - 07:30 PM

That code is fine. Try checking through this topic on why things might not draw: http://docs.google.c...7R6yw&hl=en_GB#

Another good place to learn is from the pinned FAQ in the Novice Q&A:
http://gmc.yoyogames...howtopic=417888

Edited by flexaplex, 11 November 2010 - 01:49 AM.

  • 0

#69 trevorooski

trevorooski

    GMC Member

  • New Member
  • 31 posts

Posted 11 November 2010 - 01:46 AM

I would love to say that your reply has solved my problems, but woe is me. (is that right?) The 1st link wont open correctly and the seconed link, your FAQ, doesn't seem to have anything helpful for this example... I guess coding just doesn't like me :( . I can live without or use a D&D to GML converter or have someone write code for me. THNX anyways. Bye
  • 0

#70 NestoFlo

NestoFlo

    GMC Member

  • GMC Member
  • 460 posts

Posted 11 November 2010 - 11:17 PM

Amazing Tut Flexaplex!!! Extremely well written! I am a semi-noob (:P) on GML coding so this will help me out,


Hopefully I would understand the codes and where they go (_8^(l)- "D'Oh" -Homer simpson!
  • 0

#71 Arenya

Arenya

    GMC Member

  • New Member
  • 26 posts

Posted 28 February 2011 - 11:00 AM

hey friend can you tell me where to get all there toolbar?
Where is toolbar and other things from where we can do and make games?
How to download all these toolbar?
  • 0

#72 flexaplex

flexaplex

    GMC Member

  • Global Moderators
  • 4809 posts
  • Version:GM8

Posted 28 February 2011 - 11:03 AM

hey friend can you tell me where to get all there toolbar?
Where is toolbar and other things from where we can do and make games?
How to download all these toolbar?

What toolbar?
  • 0

#73 Seven Stars Spirit

Seven Stars Spirit

    TheBigDipperInterArt

  • GMC Member
  • 40 posts
  • Version:Unknown

Posted 03 March 2011 - 05:54 PM

I want to show my appreciation: Thank You, flexaplex! This is really informative!!!

I wonder, why mods didn't pick it and put it in the "staff choice" tutorials, because it is excellent. <-

I learn a lot of things I didn't know and it filled some gaps(you always have gaps in knowledge, even after reading this or any tutorial) in my knowledge about programming. ^_^ However, I need to read it again sometime, because soon I'll forget some things. The usefulness of reading this tutorial is of great value.

Edited by Seven Stars Spirit, 03 March 2011 - 05:56 PM.

  • 0

#74 iplay2020

iplay2020

    GMC Member

  • New Member
  • 8 posts
  • Version:GM8

Posted 07 February 2012 - 05:23 PM

Excellent tutorial. Thanks.
  • 0

#75 Travisgm

Travisgm

    GMC Member

  • GMC Member
  • 53 posts
  • Version:GM:Studio

Posted 15 February 2012 - 02:45 AM

This expanded my bubble by alot, thanks!
  • 0

#76 1-800-thewolf

1-800-thewolf

    GMC Member

  • GMC Member
  • 35 posts
  • Version:GM8.1

Posted 27 December 2012 - 08:54 PM

So useful! Thank you so much! I have a question though. I'm not sure if you already answered it and I just couldn't understand it but here it is:

I want to effect a variable that is put in as an argument

for example:
argument[0]=1

And I put global.head as argument 0

right now it just ignores my line "argument[0]=1"
  • 0

#77 chihebaouledahmed

chihebaouledahmed

    GMC Member

  • GMC Member
  • 3 posts
  • Version:Unknown

Posted 06 January 2013 - 04:52 PM

  • Title: The Complete Beginners Guide To Gml Coding
  • Description: Thorough guide covering; functions, variables, if / else statements, with statements, for loops, arrays and scripts
  • GM Version: The GML covered is the same for GM5/6/7/8
  • Registered: Nothing requires pro/registered version
  • Tags: complete, beginners, guide, help, gml, d&d, dnd, coding, help, learn, learning, start, starting, tutorials, examples, flexaplex, faq, game maker, gmc, yoyogames, functions, variables, for loops, with statements, if statements, switch statements, arrays, scripts, functions, best, global, local, easy, teach, how, use, index, id, other, name, reference, instance, help
If you are new to programming the prospect of using gml may seem like a daunting one however this guide is written so the mindset of a beginner should be able to understand all the basic concepts they need to know. How easily you take to gml will depend on your experience you have already gained with drag & drop and your ability to think logically. However with some practice and reading most people will be able to grasp the general concepts behind coding.

The guide will be best suited for people who have been messing around with drag & drop for a little while and are now looking to move onto using gml, however it can be very useful for all beginning levels. I am of course always interested in suggestions people have on changing / adding content to the guide and any feedback in general.

CONTENTS


  • 0

#78 chihebaouledahmed

chihebaouledahmed

    GMC Member

  • GMC Member
  • 3 posts
  • Version:Unknown

Posted 06 January 2013 - 04:52 PM

thanks , u helped me a lot
  • 0

#79 vonflare

vonflare

    GMC Member

  • New Member
  • 1 posts
  • Version:GM8

Posted 13 April 2013 - 11:06 PM

I got GM8 a week ago, and I had no idea how to use GML. Now I can program instructions, and I have started to create an AI.

 

You helped a lot, and I think that this topic really improved the quality of my games.

 

Thanks!


Edited by vonflare, 13 April 2013 - 11:07 PM.

  • 1




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users