- This topic is empty.
August 24, 2018 at 10:16 pm #275669bearheadParticipant
this isn’t a very straight-forward question.
what is happening is that a new room is created regardless of whether or not the player has visited those coordinates – except for the original starting room.
I think it may be an issue with a for loop that loops through each room object. I think it is exiting at the first iteration (starting room). This loop is at line 59 in my codepen. I need the loop to run through every room object and check the room’s coordinates against the player’s coordinates.August 25, 2018 at 8:10 pm #275681ShikkedielParticipant
I think the problem is that you are only checking for the first room if all the code is placed inside the loop. You might want to go through the entire array first and only then create a new room if it doesn’t exist yet.
Posting the code itself seems to get firewalled at the moment…