Quote:

lol, try using the min_x/max_x for finding the size, and then add an offset to it.

offset = 100;
distance = (my.max_x - my.min_x)/2 + offset;

This will return the distance [radius] from the origin of the model to use...




xXxGuitar511 - Can you show me how to use it? RTFM is a fair answer, but if you think I haven't read the manual, I will send you a free hair sample!

Below is my spaghetti code that I was last using to overcome the issue, but alas, it is the source of my shiny scalp...

Apprecaite ANY help. This game is over 2 years old now, and was showing some real promise. To me, anyway.

Code:

function orbit_planet()
{
if (you != a_planet)
{
wait (1);
return;
}

else
{
player_switch = 2; //stop scanning until later
main_engine_temp = main_engine_status; //Store the engine status.
ship_speed_temp = ship_speed; // Store ship speed factor.
Main_engine_status = 0; // Engines offline in orbit.
ship_speed = 0;
info_txt.string = "ORBITTING PLANET!";
info_txt.visible = on; // Make it visible
waitt (16); // wait 1 seconds
info_txt.visible = off; // and make it invisible
info_txt.string = "Weapons systems disabled while in orbit.";
info_txt.visible = on; // Make it visible
snd_play (weapons_offline, 80, 0);
waitt (16); // wait 1 seconds
info_txt.string = "Hit 'O' to leave Orbit.";
info_txt.visible = on; // Make it visible
waitt (16); // wait 1 seconds
info_txt.visible = off; // and make it invisible

while(player_switch == 2) // While in orbit
{
vec_set(look_vec,you.x); //look at planet
vec_sub(look_vec,my.x); //look at planet
vec_to_angle(my.pan,look_vec); //look at planet
my.pan -= 60;
my.roll = -10;
my.x = you.x + cos(orbit_counter) * my.scan_distance;
my.y = you.y + sin(orbit_counter) * my.scan_distance;
orbit_counter += 1 * time; //orbit speed
wait (1);
orbit_menu_panel.visible = on;
enable_mouse = on;
mouse_mode = 2;
mouse_map = arrow_pcx;

if (key_O == 1)
{
snd_play (hail_sound, 80, 0); // Play the hail sound
info_txt.string = "Leaving Orbit.";
info_txt.visible = on; // Make it visible
waitt (32); // wait 1 seconds
info_txt.visible = off; // and make it invisible
player_switch = 3; // Transitional phase. Not in or out of orbit.
my.roll = 1; // Slight rotation.
my.pan = 0; // Straighten ship out.
move_mode = ignore_passable; // Yada yada yada
Main_engine_status == main_engine_temp; // Restore engine functions.
ship_speed = ship_speed_temp; // Restore speed.
ent_move(ship_speed, vec_to) - 500; // Break orbit far enough away to avoid re-orbit.
wait (1);
player_switch = 1; // Take ship to "not orbitting" status.
orbit_menu_panel.visible = off; // Get rid of the orbit menu.
mouse_mode = 1; // Turn mouse back to non-menu status.
mouse_map = null; // Lose the red arrow on Left mouse-click.
//enable_mouse = off; // Lose the mouse's normal behaviors.
}
}
}
}



Cheers!
Mark


People who live in glass houses shouldn't vacuum naked.