Skip to content

Commit

Permalink
make the elf on a shelf less stupid
Browse files Browse the repository at this point in the history
  • Loading branch information
omicronrex committed Feb 9, 2025
1 parent 8a7822b commit b8d2034
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
17 changes: 14 additions & 3 deletions gm82core.gej
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"folder": "gm82",
"version": "1.6",
"author": "renex, Floogle, Lovey01, cam900, Adamcake, YellowAfterlife, Verve",
"date": "23/01/2025",
"date": "09/02/2025",
"license": "Free to use, also for commercial games.",
"description": "Part of the standard Game Maker 8.2 distribution. This extension package contains a number of helper functions that are commonly used, and also geometry functions introduced in GM:Studio. This extension is also required for using the other GM 8.2 extensions, such as Sound, Joystick, DX9 and many more.",
"helpfile": "",
Expand Down Expand Up @@ -2272,16 +2272,27 @@
"returntype": 2
},
{
"name": "distance_to_instance",
"name": "distance_to_center",
"extname": "",
"calltype": 2,
"helpline": "distance_to_instance(obj)",
"helpline": "distance_to_center(obj)",
"hidden": false,
"argtypes": [
2
],
"returntype": 2
},
{
"name": "distance_to_instance",
"extname": "distance_to_center",
"calltype": 2,
"helpline": "",
"hidden": true,
"argtypes": [
2
],
"returntype": 2
},
{
"name": "instance_assign_groups",
"extname": "",
Expand Down
7 changes: 4 additions & 3 deletions source/instances.gml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
return point_direction(x,y,__n.x,__n.y)


#define distance_to_instance
///distance_to_instance(inst)
//inst: instance to get
#define distance_to_center
///distance_to_center(obj)
//inst: instance/object to get
//returns: distance from the centers of self and inst.
//When given an object id, the nearest instance is used.

var __n;
if (argument0>=100000) __n=argument0
Expand Down

0 comments on commit b8d2034

Please sign in to comment.