me.TR(me);
me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set skin:"), '0 0 0', "sandbox edit_object skin $menu_sandbox_edit_skin", 0));
me.TD(me, 1, 1.5, e = makeXonoticSlider(0, 99, 1, "menu_sandbox_edit_skin"));
+ me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set alpha:"), '0 0 0', "sandbox edit_object alpha $menu_sandbox_edit_alpha", 0));
+ me.TD(me, 1, 1.5, e = makeXonoticSlider(0.1, 1, 0.05, "menu_sandbox_edit_alpha"));
+ me.TR(me);
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);
print_to(self, "^7\"^2edit_object ^3property value^7\" edits the given property of the object. Players can only edit their own objects");
print_to(self, "^7Object properties for ^2edit_object^7:");
print_to(self, "^3skin ^7- changes the skin of the object");
+ print_to(self, "^3alpha ^7- sets object transparency");
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");
// 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.alpha), " ");
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), " ");
// apply clipboard properties
setmodel(e, argv(0));
e.skin = stof(argv(1));
- e.frame = stof(argv(2));
- e.scale = stof(argv(3)); setsize(e, e.mins * e.scale, e.maxs * e.scale); // adapt bounding box size to model size
- e.movetype = stof(argv(4));
+ e.alpha = stof(argv(2));
+ e.frame = stof(argv(3));
+ e.scale = stof(argv(4)); setsize(e, e.mins * e.scale, e.maxs * e.scale); // adapt bounding box size to model size
+ e.movetype = stof(argv(5));
print_to(self, "Object pasted");
if(autocvar_g_sandbox_info)
case "skin":
e.skin = stof(argv(3));
break;
+ case "alpha":
+ e.alpha = stof(argv(3));
+ break;
case "frame":
e.frame = stof(argv(3));
break;