artificial intelligence - Game Maker: Studio - Make objects avoid other instances of same object with A* pathfinding -
artificial intelligence - Game Maker: Studio - Make objects avoid other instances of same object with A* pathfinding - i have game there multiple enemies must chase single player. have pathfinding set using gml a* pathfinding mp_grid , path. however, these enemies can walk on top of each other when seeking player. prepare this, told path ignore enemies mp_grid_add_instances, stop moving altogether because see obstacles, trapping within bounding box. there way can add together "all other enemies self" mp_grid_add_instances? here's grid creation code (in controls class initializing variables): global.zombie_ai_grid = mp_grid_create(0, 0, room_width / 50, (room_height - sp_dashboard.sprite_height) / 50, 50, 50); mp_grid_add_instances(global.zombie_ai_grid, obj_obstacle, false); this path initialization code (in zombie class): path = path_add(); alarm[0] = 5; this path creation code in alarm 0 (path updates every 2 seconds): mp_grid_path(global.zom...