GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 Re: Script Submission » draw_self() » 2009-06-08 22:51:38

Oh! That makes sense. Hmm... Good point.

#2 Re: Script Submission » draw_self() » 2009-06-08 16:10:09

Marchal_Mig12 wrote:

Tell me if I am wrong but such a script is maybe useful but is also considerably slower than writing this in the draw event. I think everyone should take 30 more seconds to write this down instead of using a script.

What? All you have to add in the draw event with this as a script is 'draw_self();'. Could you please better explain what you mean by the

slower than writing this in the draw event

#3 Re: Script Submission » draw_self() » 2009-06-08 14:10:33

AAAGH!! I looked for a duplicate before I posted! I could not find one! It would appear that I overlooked it. I apologize for that.

#4 Script Submission » draw_self() » 2009-06-08 03:20:28

EneilShade
Replies: 9

I really cannot believe that I am submitting something this simple: but it really will save a lot of time. Those of you out there whom have played with Game Maker more than a little bit will be familiar with Game Maker's trait of not drawing the current sprite when any code is put in the draw event. While this is a good feature, occasionally, it can get a little annoying. If, for some debug reason, you want to draw a value on top of your sprite (to see the value of some variable) you need to put in code similar to this: draw_sprite_ext(sprite,subimg,x,y,xscale,yscale,rot,color,alpha); (the values would of course be filled in). But once you do this a few times, while you quickly memorize the code, gets a little annoying. So one day I decided to create a little, very simple script that any newbie could figure out:

draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha);

(pardon me for not using the proper submission rules, but this is just too simple to waste that effort).

Have fun!

EneilShade

Board footer

Powered by FluxBB