Not logged in
Register | Login

Menu:

Game Maker Extensions Menu:

av. 9/10 | Who rated

Credit to Kyle_Solo

Downloads: 4131

Tags:

Get a refer button for this extension!

BBcode

html [example]
download
[download]

Instance Nearest Extended

Posted by Kyle_Solo on October 14, 2007

Version 1.3
This is my instance nearest extension.


» Add a Screenshot


Functions:

instance_xth_nearest(x,y,obj,n,variable,value,operator)

This one took me a little while to make, but it is very useful. It returns the id of the nth closest instance with expression (variable operator value) = true. If no instances fitting the criteria are found, it returns -1. Operator is optional, if left blank it will return the id of the nth closest instance with variable equal to value. Accepted operators are: "<" ">" "<=" ">=" "!=" "="

Returns id

instance_nth_nearest(x,y,obj,n)

Returns the id of the nth closest instance (n=1 is same as instance_nearest)

Returns id

instance_nth_furthest(x,y,obj,n)

Returns the id of the nth furthest instance (n=1 is same as instance_furthest)

Returns id

instance_xth_furthest(x,y,obj,n,variable,value,operator)

Returns the id of the nth furthest instance with "variable" equal to value.
Be sure to have the variable name in quotes!

Returns id

instance_xth_number(obj,variable,value,operator)

Returns the number of instances that meet the requirements

Returns id





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

Comments:

1:53pm, 14 Nov 2007
Guest

Sounds awesome! This can really make a few things easier. Thanks!

1:55pm, 14 Nov 2007
Guest

This is cool But I hate that I will have to memorize the functions or find the page again if I ever use it. Needs a help file!

4:40pm, 24 Dec 2007
Guest

Great indeed.

11:39am, 15 Mar 2008
Guest

"I hate that I will have to memorize the functions or find the page again if I ever use it."

You don't need to memorize the functions.When you're writing code,
look at the bottom of the window
and you will see the functions
and their arguments.

Extension:
It's really good.Thanks!

gTx

1:15am, 23 Mar 2008
Guest

i always get an error when using xth

10:14am, 24 Mar 2008
Kyle_Solo

xth_nearest requires a variable name (in quotes)

8:38am, 5 Apr 2008
BillYMetAl

Cant download....please can you send me it to billymetalATgmail.com???
please

5:59pm, 17 Feb 2009
IQbrew

This sure makes things easier...