Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///scr_getNeighbours(node, max range)
- //gets all neighbour nodes that are close to the
- //current node (determined by maxRange) and adds
- //them to a ds_list of nodes
- var node = argument0;
- var maxRange = argument1;
- var neighbours = ds_list_create();
- with (obj_node)
- {
- if (id != node.id)
- {
- if (distance_to_object(node) <= maxRange)
- {
- ds_list_add(neighbours,id);
- }
- }
- }
- return neighbours;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement