You are not logged in.
Pages: 1
BUMP!
i re-made the function. i couldn't re-name the topic name.
plz try to improve it.
this is the same thing as instance_place, but works in 3d.
plz critique it all over.
//
// Usage:
// i=d3d_instance_place(x,y,z,par_solid);
//
// Arguments:
// x
// y
// z
// obj
//
// Returns:
// the id of the instance of type obj met when
// the current instance is placed at position (x,y,z).
// obj can be an object or the keyword all. If it
// does not exist, the special object noone is returned.
//
// slayer 64
//
var nn;
while(1)
{
nn=instance_place(argument0,argument1,argument3);
if nn=noone
{
break;
}
if argument2+height-1>nn.z
if argument2<nn.z+nn.height-1
{
break;
}
nn.x+=room_width;
ds_list_add(global.list,nn);
}
repeat(ds_list_size(global.list))
{
with(ds_list_find_value(global.list,0))
{
x-=room_width;
ds_list_delete(global.list,0);
}
}
return nn;
i would get rid of that ret variablevar xx;
xx = x;
x = -10000000;
with(instance_nearest(argument0,argument1,argument2))
{
if(id != other.id)
{
other.x=xx;
return id;
}
}
x = xx;
return noone;
Pages: 1