seta menu_sandbox_spawn_model "" // used to store the model in the input field
set menu_sandbox_edit_skin 0
set menu_sandbox_edit_frame 0
+set menu_sandbox_edit_physics 0
alias menu_showsandboxtools "menu_cmd directmenu SandboxTools"
bind f7 menu_showsandboxtools
me.TD(me, 1, 1.5, e = makeXonoticSlider(0, 99, 1, "menu_sandbox_edit_skin"));
me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set frame:"), '0 0 0', "sandbox edit_object frame $menu_sandbox_edit_frame", 0));
me.TD(me, 1, 1.5, e = makeXonoticSlider(0, 99, 1, "menu_sandbox_edit_frame"));
+ me.TR(me);
+ me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set physics:"), '0 0 0', "sandbox edit_object physics $menu_sandbox_edit_physics", 0));
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 0.5, e = makeXonoticRadioButton(0, "menu_sandbox_edit_physics", "0", _("Static")));
+ me.TD(me, 1, 0.5, e = makeXonoticRadioButton(0, "menu_sandbox_edit_physics", "1", _("Movable")));
+ me.TD(me, 1, 0.5, e = makeXonoticRadioButton(0, "menu_sandbox_edit_physics", "2", _("Physical")));
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
print_to(self, "^7Object properties for ^2edit_object^7:");
print_to(self, "^3skin ^7- changes the skin of the object");
print_to(self, "^3frame ^7- object animation frame, for self-animated models");
+ print_to(self, "^3physics ^7- object physics, 0 = static, 1 = movable, 2 = physical");
print_to(self, "^7The ^1drag object ^7key can be used to grab and carry objects. Players can only grab their own objects");
return TRUE;
}
e.skin = stof(argv(3));
else if(argv(2) == "frame")
e.frame = stof(argv(3));
+ else if(argv(2) == "physics")
+ {
+ if(argv(3) == "0") // static
+ e.movetype = MOVETYPE_NONE;
+ else if(argv(3) == "1") // movable
+ e.movetype = MOVETYPE_TOSS;
+ else if(argv(3) == "2") // physical
+ e.movetype = MOVETYPE_PHYSICS;
+ }
else
print_to(self, "WARNING: Invalid object property. For usage information, type 'sandbox help'");