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_scale 1
set menu_sandbox_edit_physics 0
alias menu_showsandboxtools "menu_cmd directmenu SandboxTools"
box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
box.maxLength = -127; // negative means encoded length in bytes
box.saveImmediately = 1;
- me.TDempty(me, 0.1);
me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Spawn"), '0 0 0', "sandbox spawn_object $menu_sandbox_spawn_model", 0));
me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Remove"), '0 0 0', "sandbox remove_object", 0));
me.TDempty(me, 0.1);
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 scale:"), '0 0 0', "sandbox edit_object scale $menu_sandbox_edit_scale", 0));
+ me.TD(me, 1, 1.5, e = makeXonoticSlider(0.5, 2, 0.05, "menu_sandbox_edit_scale"));
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(1, "menu_sandbox_edit_physics", "0", _("Static")));
me.TD(me, 1, 0.5, e = makeXonoticRadioButton(1, "menu_sandbox_edit_physics", "1", _("Movable")));
me.TD(me, 1, 0.5, e = makeXonoticRadioButton(1, "menu_sandbox_edit_physics", "2", _("Physical")));
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, "^3scale ^7- changes object scale. 0.5 is half size and 2 is double size");
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 = sandbox_EditObject(); // you can only copy objects you can edit, so this works
if(e != world)
{
- // set clipboard properties
if(self.object_clipboard)
strunzone(self.object_clipboard);
- self.object_clipboard = strzone(strcat(e.model, " ", ftos(e.skin), " ", ftos(e.frame), " ", ftos(e.movetype)));
+ // set clipboard properties
+ self.object_clipboard = strcat(e.model, " ");
+ self.object_clipboard = strcat(self.object_clipboard, ftos(e.skin), " ");
+ self.object_clipboard = strcat(self.object_clipboard, ftos(e.frame), " ");
+ self.object_clipboard = strcat(self.object_clipboard, ftos(e.scale), " ");
+ self.object_clipboard = strcat(self.object_clipboard, ftos(e.movetype), " ");
+
+ self.object_clipboard = strzone(self.object_clipboard);
print_to(self, "Object copied to clipboard");
return TRUE;
}
setmodel(e, argv(0));
e.skin = stof(argv(1));
e.frame = stof(argv(2));
- e.movetype = stof(argv(3));
+ e.scale = stof(argv(3));
+ e.movetype = stof(argv(4));
print_to(self, "Object pasted");
if(autocvar_g_sandbox_info)
case "frame":
e.frame = stof(argv(3));
break;
+ case "scale":
+ e.scale = stof(argv(3));
+ break;
case "physics":
switch(argv(3))
{