Hello everybody laugh

I want to create a "Space Ship ingame Editor" with 6 Moduls, where ou click it together from Panels shocked...

All Spaceship_Moduls are MapEntitys ! ( grin okey.. its an test cause i can't modeling )

i have find out, that you can load it in your level with
Code
ent_create("modul_a.wmb", vector(0,0,0) ,NULL;  

it works great and fast...

but now i have an problem:

how can i "say", witch kind of modules makes the ship ? ... with pointer like this ?

Code
//////////Editor Panel////////////////////

/*

function select_modul_a();
function select_modul_b();
function select_modul_c();
function select_modul_d();
function select_modul_e();
function select_modul_f();

int i;

var modul_var_1[i] = 0;
var modul_var_2[i] = 0;

var modul_x[i];
var modul_y[i];
var modul_z[i];

// panel 
// 
// 


function select_modul_a()
{
  modul_var_2[i] = 1;	
}

function select_modul_b()
{
  modul_var_2[i] = 2;	
}

function select_modul_c()
{
  modul_var_2[i] = 3;	
}

function select_modul_d()
{
  modul_var_2[i] = 4;	
}

function select_modul_e()
{
  modul_var_2[i] = 5;	
}

function select_modul_f()
{
  modul_var_2[i] = 6;	
}


function select_()
 {
  modul_var_1[i] = 1;	
 }
 

function save_craftet_moduls_to_ships_()
 {
  i++;
  ...	
 }


//------------------------------------


function create_modul[i]()
{
 
 if(modul_var_1[i] == 1 && modul_var_2[i] == 1) 
 {
  ent_create("modul_a.wmb",vector(modul_x[i], modul_y[i], modul_z[i]), NULL);
 } 


 if(modul_var_1[i] == 1 && modul_var_2[i] == 2) 
 {
  ent_create("modul_b.wmb",vector(modul_x[i], modul_y[i], modul_z[i]), NULL); 
 } 


 if(modul_var_1[i] == 1 && modul_var_2[i] == 3) 
 {
  ent_create("modul_c.wmb",vector(modul_x[i], modul_y[i], modul_z[i]), NULL);
 } 

 if(modul_var_1[i] == 1 && modul_var_2[i] == 4) 
 {
  ent_create("modul_d.wmb",vector(modul_x[i], modul_y[i], modul_z[i]), NULL); 
 } 

 if(modul_var_1[i] == 1 && modul_var_2[i] == 5) 
 {
  ent_create("modul_e.wmb",vector(modul_x[i], modul_y[i], modul_z[i]), NULL);
 } 

 if(modul_var_1[i] == 1 && modul_var_2[i] == 6) 
 {
  ent_create("modul_f.wmb",vector(modul_x[i], modul_y[i], modul_z[i]), NULL); 
 }
  modul_var_1[i] = 0;
 }

}

function create_ship[i]
{
 "->all clicket moduls + pos...     ->   | or add_shape ?
}



i++ counts up, because i need it for all ships

i hope you know what i mean

and how did i make 2d pos in 3d world pos ?

i hope you can help me laugh
greating: Patrick



Last edited by ratz; 12/15/20 01:06.