Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// collision_point_list(x,y,obj,prec,notme)
- //
- // Returns a list data structure populated with the ids of instances
- // which would collide with a given point, or noone if no instances found.
- //
- // x,y x and y value where to check (real)
- // obj object to check for collision (or all), (real)
- // prec Precise collision checking (boolean)
- // notme Don't check the instance the code is running from (boolean)
- //
- /// GMLscripts.com/license
- {
- var x1,y1,obj,prec,notme,dsid,this,that,i;
- x1 = argument0;
- y1 = argument1;
- obj = argument2;
- prec = argument3;
- notme = argument4;
- dsid = ds_list_create();
- this = id;
- with (obj) {
- that = id;
- with (this) {
- i = collision_point(x1,y1,that,prec,notme);
- if (i != noone) ds_list_add(dsid,i);
- }
- }
- if (ds_list_empty(dsid)) {
- ds_list_destroy(dsid);
- dsid = noone;
- }
- return dsid;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement