GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 Community » Check for TUVAZ! » 2012-04-11 21:30:12

Big J
Replies: 3

I noticed some scripts require that "Treat Uninitialized Variables As Zero" (TUVAZ) be unchecked, such as collision_triangle_init().

Well, a simple way to check that is something like this:

Expandif (variable_global_exists(""))
    show_error("Error 0xn00b: You fail at using Game Maker. Treating unknown variables as zero is a disease", true);

EDIT: The indentation is not working.

#2 Re: Off Topic » How much memory can a human brain hold? » 2011-08-21 21:17:28

I think comparing human memory to computer memory is like comparing apples to oranges. What I can't remember today, I might remember tomorrow. With computer memory it either remembers something or it doesn't. Human memory is just a completely different beast in my opinion, too abstract to be compared to computer memory or measured. This is all just my speculation and opinion though.

#3 Re: Script Alumni » string_wordwrap() » 2011-02-08 22:37:48

Ah, I didn't know Game Maker was cross-platform.

#4 Script Alumni » string_wordwrap() » 2011-02-08 16:30:49

Big J
Replies: 2

I was looking at this script here: http://www.gmlscripts.com/script/string_wordwrap and something caught my attention:

Expandif (is_real(brk)) brk = "#";

Yes, a "#" is a newline in Game Maker, but wouldn't it be better to use a REAL new line by default?

Expandif (is_real(brk)) brk = chr(13)+chr(10);

or

Expandif (is_real(brk)) brk = "
";

Correct me if I am wrong. tongue I do realize that I could simply pass the desired brk argument.

By the way, it's nice to see GMLscripts.com back up and running. I don't know how long the site was down waiting for a domain name renewal, but long enough for me to notice. biggrin

#5 Re: Script Alumni » GM8 - Scripts that do not work » 2009-07-27 03:01:35

There's a typo in the collision_triangle() script:

Expand    // Bounding box check
    xmin = min(x1,x2,x3);
    xmax = maX(x1,x2,x3); //Typo is here, maX() you need max()
    ymin = min(y1,y2,y3);
    ymax = max(y1,y2,y3);
    if (not collision_rectangle(xmin,ymin,xmax,ymax,object,false,false)) return false;

EDIT: Oh, the code tag here auto highlights. biggrin I wish the GMC code tags did that.

Board footer

Powered by FluxBB