C
Carcophan
Guest
Hello everyone.
We are able to draw a usable terrain map with an objects Create event and via additional scripting calls. We are also able to put a player and enemy (with state AI and A* pathing) on the map and they move around 'okay' and only 'sometimes'.
Problem we seem to be encountering is this randomly sized 'invisible box' around the player and/or the enemy, inside the larger overall map.
It seems to exist in every room load, but the 'size' of the invisible box is different each load. It may be 10x3 or 2x14 or 4x4, etc. We can move around fully WITHIN the invisible box, but we cannot move the character out of the randomly sized box to move throughout the rest of the map. We just get stuck in this little prison.
We can click and interact with tiles outside of the invisible box, we just cannot move to them, as if the room is only 4x4 instead of 32x32 tiles. The enemy sees me and the mp_path, but is also confined within its own invisible box and cannot leave it to attack me.
Anyone have any ideas?
Using this shows the proper pathing and tiling with no abnormal red/green areas.
draw_set_alpha(0.3);
mp_grid_draw(global.gridPath);
draw_set_alpha(1);
And the maps are simply created via:
We are able to draw a usable terrain map with an objects Create event and via additional scripting calls. We are also able to put a player and enemy (with state AI and A* pathing) on the map and they move around 'okay' and only 'sometimes'.
Problem we seem to be encountering is this randomly sized 'invisible box' around the player and/or the enemy, inside the larger overall map.
It seems to exist in every room load, but the 'size' of the invisible box is different each load. It may be 10x3 or 2x14 or 4x4, etc. We can move around fully WITHIN the invisible box, but we cannot move the character out of the randomly sized box to move throughout the rest of the map. We just get stuck in this little prison.
We can click and interact with tiles outside of the invisible box, we just cannot move to them, as if the room is only 4x4 instead of 32x32 tiles. The enemy sees me and the mp_path, but is also confined within its own invisible box and cannot leave it to attack me.
Anyone have any ideas?
Using this shows the proper pathing and tiling with no abnormal red/green areas.
draw_set_alpha(0.3);
mp_grid_draw(global.gridPath);
draw_set_alpha(1);
And the maps are simply created via:
Code:
mWidth = 32; mHeight = 32;
global.lay_id = layer_get_id("Instances");
global.grid1_ = layer_tilemap_get_id(global.lay_id);
global.grid1 = ds_grid_create(mWidth, mHeight);
ds_grid_set_region(global.gridHP1, 0, 0, mWidth, mHeight, 0);
Last edited by a moderator: