Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Implementation of ROT.JS (Roguelike Toolkit) for C3Runtime.
In my project, I loop in every cell to check if the ones next to it are corridors, rooms, etc... so I can set the appropriate sprites.
But it wasnt working at all, until I saw errors in the console. The conditions "is in Room" and "is in Corridor" throw an error if the cell isnt in the grid (trying to access to the property of undefined object).
So I fixed it by changing the code (in the example, CellIsRoom) from
return this.map[x + "," + y].type === "room";
return this.map[x + "," + y] && this.map[x + "," + y].type === "room" ? true : false;
and then pretty much the same thing for others conditons.
If you're still active, make sure to update it ;)