Jump to content


Photo

Tim's Script Collection


  • Please log in to reply
No replies to this topic

#1 Timmeh

Timmeh

    GMC Member

  • New Member
  • 358 posts

Posted 24 May 2008 - 10:09 AM

With the few years I have spent with GM, I've written a number of scripts I use regularly, be it to save me time, or to add functionality to Game Maker. I decided recently that they weren't really doing a whole lot of good sitting lost on my computer until the day I finally get somewhere with a project... however, given that I decided to release them open-source instead of putting them in a .gex I would appreciate it if you sharred any modifications you made to them with me and the community. Credit for the scripts is very much appreciated, but there isn't much I can do to stop you from claiming the scripts as your own. Anyways, I have the files in a .gmk (as well as an .exe, for people who can't run some of them with the Lite version) and the .gml file.

Download .gmk
Download .exe
Download .gml


Function List:
mode)

draw_health_circle(x, y, radius, color1, color2, percent, drawmode, direction, rotation))
draw_health_circle_tex(x, y, radius, texture, color, percent, direction, rotation)

instance_nth_nearest(x, y, obj, n)
instance_nth_farthest(x, y, obj, n)

intercept_direction(start_object, target_object, speed)

collision_triangle(x1, y1, x2, y2, x3, y3, obj)

create_grid(cell_width, cell_height, cells_x, cells_y)
draw_grid(x, y, grid)

get_3d_x(x, y, z, camera_height)
get_3d_y(x, y, z, camera_height)
_linenums:0'>autotile(mode)draw_health_circle(x, y, radius, color1, color2, percent, drawmode, direction, rotation))draw_health_circle_tex(x, y, radius, texture, color, percent, direction, rotation)instance_nth_nearest(x, y, obj, n)instance_nth_farthest(x, y, obj, n)intercept_direction(start_object, target_object, speed)collision_triangle(x1, y1, x2, y2, x3, y3, obj)create_grid(cell_width, cell_height, cells_x, cells_y)draw_grid(x, y, grid)get_3d_x(x, y, z, camera_height)get_3d_y(x, y, z, camera_height)

Enjoy.

[EDIT]: Almost forgot, the .exe and .gmk both have examples of the scripts.

New Version.

Updated Autotile script.
Added get_3d_* functions.
Examples (.exe, .gmk) and script file updated.

The get_3d_* function will return the x/y point to draw something if the camera is at camera_height, and the point is at x, y at z in the air. See the example to get a better understanding.

Edited by Timmeh, 27 May 2008 - 05:39 AM.

  • 0
I have started teaching myself C++, and do not use Game Maker regularly any more. You can follow my current project either on my DevBlog or in my topic on the Bay12 forums.

GENERATION 195G: EVERYTIME YOU SEE THIS DIVIDE YOUR MOTHERS MAIDEN BIRTHDAY BY WHAT YOU HAD FOR DINNER LAST NIGHT AND ADD Q. (ANTI-SOCIAL EXPERIMENT)

LINKS: My Script Collection - My Autotile Script - My Random Number Generator - My Process Runner Extension - My Detailed TDS Tutorial