Not logged in
Register | Login


Game Maker Extensions Menu:

av. 4/10 | Who rated

Credit to Jacob Clark

Downloads: 779


Get a refer button for this extension!


html [example]

Useful Functions Extension

Posted by tigerman on July 25, 2010

This extension allows full use to 45 functions and 127 constants. There are 7 groups of functions. The first group is the note group, this allows easy access to well, mostly note names and frequencies. The next group is the time group, including functions for finding the name of month, name of season, and name of weekday. The third group is the math group (called integer) it allows the creation of fractions, simplifying fractions, and the lowest common denominator stuff. The fourth group are some useful string unctions I've added. The fifth group are some new file text functions including file_text_read_string_all which reads all the lines. The sixth group are some easy sound functions. Note: they doesn't use the original game maker sound equation, it uses a more reliable equation I made. And last but not least, the miscellaneous group, including my favorite function: draw_flip_set_identity.
(The following are some of the functions used in this extension)

» Add a Screenshot


Notes {Constants (127)}

Notes are new to introduce to Game Maker, and very useful. The only way I found that could export them into sound was the function beep() that's somebody elses (you also need duration in milliseconds too). (note[group]_[key][letter])

Returns Note Values

time_get_month() {Function}

Returns Month Name

time_get_season() {Function}

Returns Season Name

time_get_weekday() {Function}

Returns Weekday Name

current_season() {Function}

Too bad this cannot be a constant...

Returns Season Number

note_get_frequency(note) {Function}

Really Helpful if you are using variables in frequency

Returns Frequency

note_get_name(note) {Function}

To make sure you have the right note

Returns Name of Note With Group Number

note_get_group(note) {Function}

Groups mostly mean pitches

Returns Group Number

integer_fraction_create(integer,constant,repeater,round,numerator) {Function}

This function creates a fraction , and could give it back to you as the numerator or the denominator. Argument0 is the integer [0=none], argument1 is the constant (The part that starts from the decimal and ends at the repeater. [-1=none]), argument2 is the repeater (The part that repeats it's self behind the decimal. [0=none]). (The equation is mine, actually everything is mine from scratch except for the 'text_to_speech_play')

Returns Numerator, or Denominator (Argument4)

integer_fraction_round(max,fraction,numerator) {Function}

This function rounds a fraction, and would give it back to you as the numerator or the denominator. (Argument0 has to be larger than the output numerator)

Returns Numerator, or Denominator (Argument2)

integer_round_grid(size,x) {Function}

Returns Rounds x to the Nearest Grid Marker

string_invert(string) {Function}

Returns Flips a String

file_text_read_string_all(file) {Function}

Returns Reads All Lines of a File

file_text_open_read_string_all(fname) {Function}

Returns Opens and Reads All the Lines of a File

mysound_create(file,kind,preload) {Function}

Returns Sound File

mysound_play(sound,loop) {Function}

Returns Plays a Sound With the Option of Looping it

mysound_volume(sound,volume) {Function}

Note: this doesn't use the original game maker sound equation, it uses a more reliable equation I made.

Returns Sets the Volume Percentage of a Sound

sound_stop_ext(sound0,sound1,...) {Function}

Returns Stops Each Sound

text_to_speech_play(string,voice) {Function}

I found this function on Google, e-mail me if you want it as a function, and not as an extension. (The only function that's not mine)

Returns Plays Voice

draw_flip_set_identity(begin,xt,yt,horizontal,verticle) {Function}

This was really hard to conjure up. It flips (Not rotates!) everything that follows. (Not fully tested) Note: Everything that follows has to have an x and y value of 0, while they appear on the function. In order to do separate sprites or backgrounds with different positional values, end it with 'draw_flip_set_identity(FALSE)' and restart it with 'draw_flip_set_identity(TRUE,xt,yt,horizontal,vertical)' Also, I think the images positional display values would be altered in relation to the flipping method (Like you would rotate a sprite with an margin of (0,0)).

Returns Flips the Following

chr_code(char) {Function}

Really handy in decryption

Returns Character Code of a Character

color_invert(color) {Function}

Returns Inverted Color

draw_text_centered(string,x,y,width,height) {Function}

Just because I use it a lot

Returns Draws Text at Centered Position

You not logged on! It is recommended you logon before commenting so we can tell who you are!

No comments