I have two entities:
1: https://i.imgur.com/mXpqsjt.png
2: https://i.imgur.com/0EMNY5Q.png
And I'm trying to loop through all entities and get their values:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
local houses = { } 	 	-- Loop through every entity on the map and attach X and Y positions to houses table. 	for _, loc in pairs(hc.ENTITIES) do 		local tx, ty = loc.x, loc.y 		 		if entity(tx, ty, 'name') == 'house' then 			houses[tonumber(entity(tx, ty, 'trigger'))] = { 0, tx, ty } 		end 	end 	 	hc.houses.houses = houses 	 	print(hc.util.get_table_as_string(hc.houses.houses))
But I only seem to get the second one!
The first one doesn't even exist in the entity table, I've tried printing all of it to the logs.
Weird thing is that it sometimes appears when I use the test mode in the editor.
What am I doing wrong? Or is this a bug?