R
Red Phantom
Guest
Code:
if place_meeting(x,y,obj_3x3_Houses) and global.exterior_doors_open = false and !instance_exists(obj_Door_Opened)
{
city_front_house = 0
with (other)
{
if house_number = city_front_house
{
//with (obj_Controls) instance_destroy()
instance_create(0,0,obj_Door_Opened)
global.inconversation = true
green_door_opened = 0
image_index = green_door_opened
}
}
}
I understand that using 'other' in this way does not work. So how can I refer to the specific instance of obj_3x3_Houses which is the third argument of the called function place_meeting?
Context (Shouldn't be necessary to solving the problem but may help)
There are multiple instances of obj_3x3_Houses in the room.
Originally I had separate objects for each house. But now I am condensing my resources to minimize the data, i.e. megabytes of my downloadable game to make it load and run faster and more smoothly.
So I am trying to merge my 3x3 (96x96pixel) houses into one object.
In the room I give each individual house object index a unique house number under local variable house_number, inside the creation code(in the room) of the object (i.e. not under the regular creation event)