Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///@desc Returns a number if you check outside the ds_grid.
- ///@arg id
- ///@arg x
- ///@arg y
- var _edge = 1;//Change this number to change what edges return as.
- var _id = argument0;
- var _x = argument1;
- var _y = argument2;
- var _w = ds_grid_width(_id);
- var _h = ds_grid_height(_id);
- if (_x > -1 && _x < _w && _y > -1 && _y < _h)
- {
- return(ds_grid_get(_id,_x,_y));
- }
- else
- {
- return(_edge);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement