Charas-Project

Game Creation => Requests => Tutorials => Topic started by: Vlad Shadeu on August 02, 2009, 08:26:46 PM

Title: Game Maker code snippets that DONT use GML
Post by: Vlad Shadeu on August 02, 2009, 08:26:46 PM
http://www.mediafire.com/?mm2jzzjimnm

It's useful for beginners. This will be on YoYoGames once they virus scan it but you guys get first look. Its just a few snippets of code ideal for people looking to make things with Game Maker. its a work in progress, this wont be the only one. If you have some suggestions that dont require GML, i'll do my best to add them. If you make something with it, credit would be nice but is not necessary, and i would REALLY like a link to it so i can see it.
Title: Re: Game Maker code snippets that DONT use GML
Post by: fruckert on August 02, 2009, 08:38:23 PM
I take it you made this, and it's not just a compilation of other peoples things?
Title: Re: Game Maker code snippets that DONT use GML
Post by: Vlad Shadeu on August 02, 2009, 08:41:49 PM
All the coding is mine, yes.
Title: Re: Game Maker code snippets that DONT use GML
Post by: fruckert on August 02, 2009, 09:02:57 PM
Well, it's definitely alright for a DnD tutorial, although the shruiken room is kinda buggy.
Probably would've been a good time to use a mask for the collisions, because when they collided with the wall, sometimes it wouldn't stop.
A square mask would've fixed that.
Title: Re: Game Maker code snippets that DONT use GML
Post by: Vlad Shadeu on August 02, 2009, 09:04:48 PM
Be honest, i dont understand how to do masks XD.
This is actually more of a learning experience for me than it is for anyone downloading it, but some of the stuff i did is cool.
Title: Re: Game Maker code snippets that DONT use GML
Post by: Vlad Shadeu on August 02, 2009, 09:55:10 PM
Oh, by the way, is it possible to calculate the direction of one point as relative to an object with drag and drop?
Title: Re: Game Maker code snippets that DONT use GML
Post by: fruckert on August 02, 2009, 10:06:22 PM
distance_to_object(obj)
Just use that in the test variable tile.
Title: Re: Game Maker code snippets that DONT use GML
Post by: Vlad Shadeu on August 02, 2009, 10:20:27 PM
actually, i meant the opposite of what you gave me the variable for. and i need direction, not distance. and i'm trying to avoid using a variable test, thats what most of the other examples used. Basically what i'm trying to do is make a compass that points to your objective/whatever, using, of course, the mouse_x and mouse_y variables. heres how it looks right now.

Step Event:
Change Sprite:
sprite: Compass Rose
subimage:point_direction(0,0,follow.x,follow.y)/10
speed:0