Jump to content


Photo

Enhanced Constants


  • Please log in to reply
3 replies to this topic

#1 paul23

paul23

    GMC Member

  • Global Moderators
  • 4147 posts
  • Version:GM:Studio

Posted 03 January 2010 - 12:07 AM

Well this is a very small extension that simply enhances the constant list for gamemaker..

It gives names for all "numeric" types you have to fill in at certain places (path endaction, room transition, sound types to name a few). But it also adds a few extra constants (all html-colour names).

It's pretty self-explanatory, but just drives on the paradigm that number/string literals shouldn't be inside the code but instead be defined at start of the program.
yoyogames, gex (simply install this gex, and then load it for the games you want to use it) gm7 & 8
host-a, simple text file which you can import (copy this file to your desired location and then include the constants from their for each project) only gm8, not recommended
  • 2

#2 Krisando

Krisando

    GMC Member

  • New Member
  • 1351 posts

Posted 25 January 2010 - 02:45 PM

Has some very interesting room translation constants, surprised there were none to start with. P=

Those 250+ colour extensions had far too many colours, this has a sufficient amount for every type of colour.
  • 0

Posted Image


#3 xot

xot

    GMC Dismember

  • GMC Elder
  • 4785 posts
  • Version:GM:Studio

Posted 20 August 2010 - 03:58 PM

I guess the rest of the HTML colors is nice but I prefer to create my own color constants as needed. I think I'd prefer to see them in their own extension.

The other constants are great though. It's so annoying having to look up arbitrary values to use some of GM's built-in functions.

I'd like to suggest some others:

file_bin_open(fname,mod) The mode indicates what can be done with the file:
0 = reading
1 = writing
2 = both reading and writing.

registry_set_root(root) Sets the root for the other routines. Use the following values:
0 = HKEY_CURRENT_USER
1 = HKEY_LOCAL_MACHINE
2 = HKEY_CLASSES_ROOT
3 = HKEY_USERS

And possibly:

background_create_gradient(w,h,col1,col2,kind,preload) kind is a number between 0 and 5 indicating the kind of gradient:
0 = horizontal
1 = vertical
2 = rectangle
3 = ellipse
4 = double horizontal
5 = double vertical
  • 0
GMLscripts.com, rise from your grave!

If any of my posts contain broken images or links, I can probably supply them for you. PM with a link to the post.

#4 blackhawkrobbo

blackhawkrobbo

    GMC Member

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

Posted 04 July 2013 - 11:46 PM

Why not just submit this to the dev team so they can add it?


  • 0