Code:
/* A script to take nintendo nightmare levels and
* convert them into d3d models and save them to files.
*/
exporter = instance_create(0,0,obj_stringe);
exporter.text = "
if (keyboard_check_pressed(vk_enter))
{
show_message('saving the model...');
var model;
var count;
model = d3d_model_create();
count = 0;
with (obj_tuotop)
{
d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_tuotop.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_redtuotop)
{
d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_redtuotop.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_tri1)
{
d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_tri1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object10)
{
d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object10.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_mustache)
{
d3d_model_floor(model,x,y,depth,x+128,y+128,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_mustache.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_solconseil)
{
d3d_model_floor(model,x,y,depth,x+256,y+256,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_solconseil.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_volcansol)
{
d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_volcansol.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object481)
{
d3d_model_floor(model,x,y,depth,x+16,y+16,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object481.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object402)
{
d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object402.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_scifi_woodsol)
{
d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_scifi_woodsol.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_scifi_cimentsol)
{
d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_scifi_cimentsol.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_scifi_deathstarsol1)
{
d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_scifi_deathstarsol1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_scifi_deathsol2)
{
d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_scifi_deathsol2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_scifi_deathstarfloor3)
{
d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_scifi_deathstarfloor3.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object137)
{
d3d_model_floor(model,x-128,y-128,depth,x+128,y+128,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object137.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object122)
{
d3d_model_floor(model,x,y,depth,x+144,y+48,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object122.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_pont)
{
d3d_model_block(model,x-16,y-8,z,x+16,y+8,z-4,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_pont.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_upperplatform)
{
d3d_model_block(model,x-16,y-8,z,x+16,y+8,z-4,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_upperplatform.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object68)
{
d3d_model_floor(model,x,y,depth,x+192,y+192,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object68.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object293)
{
d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object293.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object172)
{
d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object172.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object47)
{
d3d_model_floor(model,x,y,depth,x+256,y+256,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object47.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object563)
{
d3d_model_floor(model,x,y,depth,x+400,y+315,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object563.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_nuage)
{
d3d_model_floor(model,x-32,y-32,depth,x+32,y+32,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_nuage.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_nuageright)
{
d3d_model_floor(model,x-32,y-32,depth,x+32,y+32,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_nuageright.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object11)
{
d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object11.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object61)
{
d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object61.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_tri2)
{
d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_tri2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_tri3)
{
d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_tri3.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_tuo)
{
d3d_model_cylinder(model,x-6,y-6,minz,x+6,y+6,z-4,1,1,false,24);
d3d_model_cylinder(model,x-8,y-8,z-4,x+8,y+8,z,1,1,false,24);
d3d_model_cylinder(model,x-5.5,y-5.5,minz,x+5.5,y+5.5,z,1,1,false,24);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_tuo.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_redtuo)
{
d3d_model_cylinder(model,x-6,y-6,minz,x+6,y+6,z-4,1,1,false,24);
d3d_model_cylinder(model,x-8,y-8,z-4,x+8,y+8,z,1,1,false,24);
d3d_model_cylinder(model,x-5.5,y-5.5,minz,x+5.5,y+5.5,z,1,1,false,24);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_redtuo.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_mur1)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_mur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_grismur1)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_grismur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_aerovitre1)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_aerovitre1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_murinv1)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_murinv1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_tresgrandmur1)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_tresgrandmur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_grotmur1)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_grotmur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_souterrmur1)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_souterrmur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_deathstarmur1)
{
d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_deathstarmur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_chatomur1)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_chatomur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_airportmur1)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_airportmur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_airportmur1)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_airportmur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_feupiege)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_feupiege.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_ptimur1)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_ptimur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_portelink)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_portelink.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_steelmur1)
{
d3d_model_wall(model,x-16,y,z1,x+16,y,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_steelmur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_volcanwall)
{
d3d_model_wall(model,x-16,y,z1,x+16,y,z2,1,4);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_volcanwall.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_stonemur1)
{
d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_stonemur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_provolcanwall)
{
d3d_model_wall(model,x-16,y,z1,x+16,y,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_provolcanwall.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_herbemur1)
{
d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_herbemur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_mur2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_mur2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_grismur2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_grismur2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_aerovitre2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_aerovitre2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_mutinv2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_mutinv2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_tresgrandmur2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_tresgrandmur2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_grotmur2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_grotmur2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_souterrmur2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_souterrmur2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_deathstarmurv)
{
d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_deathstarmurv.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_chatomur2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_chatomur2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_airportmur2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_airportmur2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_feupiege2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_feupiege2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_portelinkv)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_portelinkv.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_steelmur2)
{
d3d_model_wall(model,x,y-16,z1,x,y+16,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_steelmur2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_volcanwall2)
{
d3d_model_wall(model,x,y-16,z1,x,y+16,z2,1,4);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_volcanwall2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_stonemur2)
{
d3d_model_wall(model,x,y-16,z,x,y+16,minz,1,4);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_stonemur2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_provolcanwall2)
{
d3d_model_wall(model,x,y-16,z1,x,y+16,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_provolcanwall2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_barreaudoor)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_barreaudoor.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_explosemur2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_explosemur2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_geantsteelmur)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_geantsteelmur.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_maisons2)
{
d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_maisons2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_manoirplat)
{
d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_manoirplat.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_ecranplat)
{
d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_ecranplat.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_rainbowmur1)
{
d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_rainbowmur1.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_phoenixmur)
{
d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_phoenixmur.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_granmur2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_granmur2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_portepiege)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_portepiege.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_tombe)
{
d3d_model_wall(model,x,y+8,z,x,y-8,z-16,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_tombe.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_arbre)
{
d3d_model_wall(model,x,y-16,z,x,y+16,z-32,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_arbre.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_scaryarbre)
{
d3d_model_wall(model,x,y-24,z,x,y+24,z-48,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_scaryarbre.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_caisse)
{
d3d_model_block(model,x-16,y-16,z,x+16,y+16,z-32,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_caisse.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_gichet)
{
d3d_model_block(model,x-8,y-8,z,x+8,y+8,minz,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_gichet.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_ciblegrappin)
{
d3d_model_block(model,x-7,y-7,z,x+7,y+7,minz,1,1);
d3d_model_block(model,x-8,y-8,z-1,x+8,y+8,minz-1,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_ciblegrappin.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_buisson)
{
d3d_model_block(model,x-8,y-8,z,x+8,y+8,z-10,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_buisson.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_southhouse)
{
d3d_model_block(model,x-16,y-16,z,x+16,y+16,0,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_southhouse.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_exploserocher)
{
d3d_model_block(model,x-16,y-16,z,x+16,y+16,0,1,4);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_exploserocher.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (mur_deplacehaut)
{
d3d_model_block(model,x,y,z,x+64,y+64,z-64,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_mur_deplacehaut.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_murdeplacebas)
{
d3d_model_block(model,x,y,z,x+64,y+64,z-64,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_murdeplacebas.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_bulding)
{
d3d_model_block(model,x,y,z,x+64,y+64,0,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_bulding.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_rosecarre)
{
d3d_model_block(model,x,y,z,x+64,y+64,minz,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_rosecarre.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_enemimuraille)
{
d3d_model_block(model,x,y,z,x+64,y+64,minz,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_enemimuraille.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_enemimuraille2)
{
d3d_model_block(model,x,y,z,x+64,y+64,minz,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_enemimuraille2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_brikhouse)
{
d3d_model_block(model,x-16,y-16,z,x+16,y+16,0,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_brikhouse.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_invisimur)
{
d3d_model_block(model,x-16,y-16,-999,x+16,y+16,999,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_invisimur.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_rocher)
{
d3d_model_ellipsoid(model,x-16,y-16,z-200,x+16,y+16,z-32-200,1,1,24);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_rocher.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_cime)
{
d3d_model_floor(model,x-32,y-32,z,x+32,y+32,z,1,1);
d3d_model_cylinder(model,x-32,y-32,z,x+32,y+32,0,1,1,false,24);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_cime.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_tronploz)
{
d3d_model_floor(model,x-7,y-7,z,x+7,y+7,z,1,1);
d3d_model_cylinder(model,x-7,y-7,z,x+7,y+7,0,1,1,false,24);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_tronploz.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_squashoz)
{
d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1);
d3d_model_cylinder(model,x-8,y-8,z,x+8,y+8,0,1,1,false,24);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_squashoz.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_colonnetemple)
{
d3d_model_floor(model,x-6,y-6,z,x+6,y+6,z,1,1);
d3d_model_cylinder(model,x-6,y-6,z,x+6,y+6,0,1,1,false,24);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_colonnetemple.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_profonsquashoz)
{
d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1);
d3d_model_cylinder(model,x-8,y-8,z,x+8,y+8,0,1,1,false,24);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_profonsquashoz.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_mackopiege)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_mackopiege.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_mackopiege2)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_mackopiege2.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_dracopiege)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_dracopiege.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_volcanwalldiag)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_volcanwalldiag.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_provolcanwall3)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_provolcanwall3.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (obj_mur1diag)
{
d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_obj_mur1diag.d3d');
}
d3d_model_destroy(model);
model = d3d_model_create();
count = 0;
with (object32)
{
d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1);
count += 1;
}
if (count > 0)
{
d3d_model_save(model,'room_' + string(room) + '_object32.d3d');
}
d3d_model_destroy(model);
show_message('model saved...');
}"
/*below is a one line version for ease in entering*/
exporter = instance_create(0,0,obj_stringe);exporter.text = "if (keyboard_check_pressed(vk_enter)){show_message('saving the model...');var model;var count;model = d3d_model_create();count = 0;with (obj_tuotop){ d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tuotop.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_redtuotop){ d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_redtuotop.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tri1){ d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tri1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object10){ d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object10.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mustache){ d3d_model_floor(model,x,y,depth,x+128,y+128,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mustache.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_solconseil){ d3d_model_floor(model,x,y,depth,x+256,y+256,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_solconseil.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_volcansol){ d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_volcansol.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object481){ d3d_model_floor(model,x,y,depth,x+16,y+16,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object481.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object402){ d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object402.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_scifi_woodsol){ d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_scifi_woodsol.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_scifi_cimentsol){ d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_scifi_cimentsol.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_scifi_deathstarsol1){ d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_scifi_deathstarsol1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_scifi_deathsol2){ d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_scifi_deathsol2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_scifi_deathstarfloor3){ d3d_model_floor(model,x,y,z,x+64,y+64,z,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_scifi_deathstarfloor3.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object137){ d3d_model_floor(model,x-128,y-128,depth,x+128,y+128,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object137.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object122){ d3d_model_floor(model,x,y,depth,x+144,y+48,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object122.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_pont){ d3d_model_block(model,x-16,y-8,z,x+16,y+8,z-4,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_pont.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_upperplatform){ d3d_model_block(model,x-16,y-8,z,x+16,y+8,z-4,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_upperplatform.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object68){ d3d_model_floor(model,x,y,depth,x+192,y+192,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object68.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object293){ d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object293.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object172){ d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object172.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object47){ d3d_model_floor(model,x,y,depth,x+256,y+256,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object47.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object563){ d3d_model_floor(model,x,y,depth,x+400,y+315,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object563.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_nuage){ d3d_model_floor(model,x-32,y-32,depth,x+32,y+32,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_nuage.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_nuageright){ d3d_model_floor(model,x-32,y-32,depth,x+32,y+32,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_nuageright.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object11){ d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object11.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (object61){ d3d_model_floor(model,x,y,depth,x+64,y+64,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_object61.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tri2){ d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tri2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tri3){ d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tri3.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tuo){ d3d_model_cylinder(model,x-6,y-6,minz,x+6,y+6,z-4,1,1,false,24); d3d_model_cylinder(model,x-8,y-8,z-4,x+8,y+8,z,1,1,false,24); d3d_model_cylinder(model,x-5.5,y-5.5,minz,x+5.5,y+5.5,z,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tuo.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_redtuo){ d3d_model_cylinder(model,x-6,y-6,minz,x+6,y+6,z-4,1,1,false,24); d3d_model_cylinder(model,x-8,y-8,z-4,x+8,y+8,z,1,1,false,24); d3d_model_cylinder(model,x-5.5,y-5.5,minz,x+5.5,y+5.5,z,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_redtuo.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_grismur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_grismur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_aerovitre1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_aerovitre1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_murinv1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_murinv1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tresgrandmur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tresgrandmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_grotmur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_grotmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_souterrmur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_souterrmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_deathstarmur1){ d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_deathstarmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_chatomur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_chatomur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_airportmur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_airportmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_airportmur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_airportmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_feupiege){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_feupiege.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_ptimur1){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_ptimur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_portelink){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_portelink.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_steelmur1){ d3d_model_wall(model,x-16,y,z1,x+16,y,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_steelmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_volcanwall){ d3d_model_wall(model,x-16,y,z1,x+16,y,z2,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_volcanwall.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_stonemur1){ d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_stonemur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_provolcanwall){ d3d_model_wall(model,x-16,y,z1,x+16,y,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_provolcanwall.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_herbemur1){ d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_herbemur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_grismur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_grismur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_aerovitre2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_aerovitre2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mutinv2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mutinv2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tresgrandmur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tresgrandmur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_grotmur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_grotmur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_souterrmur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_souterrmur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_deathstarmurv){ d3d_model_wall(model,x-16,y,z,x+16,y,minz,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_deathstarmurv.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_chatomur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_chatomur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_airportmur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_airportmur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_feupiege2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_feupiege2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_portelinkv){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_portelinkv.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_steelmur2){ d3d_model_wall(model,x,y-16,z1,x,y+16,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_steelmur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_volcanwall2){ d3d_model_wall(model,x,y-16,z1,x,y+16,z2,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_volcanwall2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_stonemur2){ d3d_model_wall(model,x,y-16,z,x,y+16,minz,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_stonemur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_provolcanwall2){ d3d_model_wall(model,x,y-16,z1,x,y+16,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_provolcanwall2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_barreaudoor){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_barreaudoor.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_explosemur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_explosemur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_geantsteelmur){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_geantsteelmur.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_maisons2){ d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_maisons2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_manoirplat){ d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_manoirplat.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_ecranplat){ d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_ecranplat.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_rainbowmur1){ d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_rainbowmur1.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_phoenixmur){ d3d_model_wall(model,x1,y1,z2,x2,y2,z1,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_phoenixmur.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_granmur2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_granmur2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_portepiege){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_portepiege.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tombe){ d3d_model_wall(model,x,y+8,z,x,y-8,z-16,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tombe.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_arbre){ d3d_model_wall(model,x,y-16,z,x,y+16,z-32,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_arbre.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_scaryarbre){ d3d_model_wall(model,x,y-24,z,x,y+24,z-48,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_scaryarbre.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_caisse){ d3d_model_block(model,x-16,y-16,z,x+16,y+16,z-32,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_caisse.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_gichet){ d3d_model_block(model,x-8,y-8,z,x+8,y+8,minz,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_gichet.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_ciblegrappin){ d3d_model_block(model,x-7,y-7,z,x+7,y+7,minz,1,1); d3d_model_block(model,x-8,y-8,z-1,x+8,y+8,minz-1,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_ciblegrappin.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_buisson){ d3d_model_block(model,x-8,y-8,z,x+8,y+8,z-10,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_buisson.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_southhouse){ d3d_model_block(model,x-16,y-16,z,x+16,y+16,0,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_southhouse.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_exploserocher){ d3d_model_block(model,x-16,y-16,z,x+16,y+16,0,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_exploserocher.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (mur_deplacehaut){ d3d_model_block(model,x,y,z,x+64,y+64,z-64,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_mur_deplacehaut.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_murdeplacebas){ d3d_model_block(model,x,y,z,x+64,y+64,z-64,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_murdeplacebas.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_bulding){ d3d_model_block(model,x,y,z,x+64,y+64,0,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_bulding.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_rosecarre){ d3d_model_block(model,x,y,z,x+64,y+64,minz,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_rosecarre.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_enemimuraille){ d3d_model_block(model,x,y,z,x+64,y+64,minz,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_enemimuraille.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_enemimuraille2){ d3d_model_block(model,x,y,z,x+64,y+64,minz,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_enemimuraille2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_brikhouse){ d3d_model_block(model,x-16,y-16,z,x+16,y+16,0,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_brikhouse.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_invisimur){ d3d_model_block(model,x-16,y-16,-999,x+16,y+16,999,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_invisimur.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_rocher){ d3d_model_ellipsoid(model,x-16,y-16,z-200,x+16,y+16,z-32-200,1,1,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_rocher.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_cime){ d3d_model_floor(model,x-32,y-32,z,x+32,y+32,z,1,1); d3d_model_cylinder(model,x-32,y-32,z,x+32,y+32,0,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_cime.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_tronploz){ d3d_model_floor(model,x-7,y-7,z,x+7,y+7,z,1,1); d3d_model_cylinder(model,x-7,y-7,z,x+7,y+7,0,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_tronploz.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_squashoz){ d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1); d3d_model_cylinder(model,x-8,y-8,z,x+8,y+8,0,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_squashoz.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_colonnetemple){ d3d_model_floor(model,x-6,y-6,z,x+6,y+6,z,1,1); d3d_model_cylinder(model,x-6,y-6,z,x+6,y+6,0,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_colonnetemple.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_profonsquashoz){ d3d_model_floor(model,x-8,y-8,z,x+8,y+8,z,1,1); d3d_model_cylinder(model,x-8,y-8,z,x+8,y+8,0,1,1,false,24); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_profonsquashoz.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mackopiege){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mackopiege.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mackopiege2){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mackopiege2.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_dracopiege){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_dracopiege.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_volcanwalldiag){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,4); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_volcanwalldiag.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_provolcanwall3){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_provolcanwall3.d3d');}d3d_model_destroy(model);model = d3d_model_create();count = 0;with (obj_mur1diag){ d3d_model_wall(model,x1,y1,z1,x2,y2,z2,1,1); count += 1;}model = d3d_model_create();count = 0;with (object32){d3d_model_floor(model,x,y,depth,x+32,y+33,depth,1,1);count += 1;}if (count > 0){d3d_model_save(model,'room_' + string(room) + '_object32.d3d');}d3d_model_destroy(model);if (count > 0){ d3d_model_save(model,'room_' + string(room) + '_obj_mur1diag.d3d');}d3d_model_destroy(model);show_message('model saved...');}";