First, i think I found a bug:
you've to add :
var build_mode = 0;
to the variables.
Second, you've to create for every building new functions like this:
function check_build_my_own_object1()
{
if(wood >= 1000)
{
...
}
}
function build_my_own_object()
{
what_build = 2; //second object
build_mode = 1;
...
ent_create("my_object.wmb",...
}
Third you've to add this lines to place_object()
if(what_build == 2)
{
ent_CREATE("my_object.wmb",temp,NULL); //place the house
object_placed = 1; //the object is now placed
build_mode = 0; //build-mode inactive
wood -= 1000; //reduces wood
stone -= 500; //reduces stone
}
I hope this help.
PS: I don't understand what you mean with tiling based or something like this.