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 color 1:"), '0 0 0', "sandbox edit_object color_main $menu_sandbox_edit_color_main", 0));
+ me.TD(me, 2, 1.5, e = makeXonoticColorpickerString("menu_sandbox_edit_color_main", "menu_sandbox_edit_color_main"));
+ me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Set color 2:"), '0 0 0', "sandbox edit_object color_glow $menu_sandbox_edit_color_glow", 0));
+ me.TD(me, 2, 1.5, e = makeXonoticColorpickerString("menu_sandbox_edit_color_glow", "menu_sandbox_edit_color_glow"));
+ me.TR(me);
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"));
print_to(self, "^7\"^2duplicate_object_paste^7\" pastes the copied object in front of the player");
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");
+ print_to(self, "^3skin value ^7- changes the skin of the object");
+ print_to(self, "^3alpha value ^7- sets object transparency");
+ print_to(self, "^3colormod value_x value_y value_z ^7- main object color");
+ print_to(self, "^3glowmod value_x value_y value_z ^7- glow object color");
+ print_to(self, "^3frame value ^7- object animation frame, for self-animated models");
+ print_to(self, "^3scale value ^7- changes object scale. 0.5 is half size and 2 is double size");
+ print_to(self, "^3physics value ^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;
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.colormod_x), " ", ftos(e.colormod_y), " ", ftos(e.colormod_z), " ");
+ self.object_clipboard = strcat(self.object_clipboard, ftos(e.glowmod_x), " ", ftos(e.glowmod_y), " ", ftos(e.glowmod_z), " ");
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), " ");
setmodel(e, argv(0));
e.skin = stof(argv(1));
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));
+ e.colormod_x = stof(argv(3)); e.colormod_y = stof(argv(4)); e.colormod_z = stof(argv(5));
+ e.glowmod_x = stof(argv(6)); e.glowmod_y = stof(argv(7)); e.glowmod_z = stof(argv(8));
+ e.frame = stof(argv(9));
+ e.scale = stof(argv(10)); setsize(e, e.mins * e.scale, e.maxs * e.scale); // adapt bounding box size to model size
+ e.movetype = stof(argv(11));
print_to(self, "Object pasted");
if(autocvar_g_sandbox_info)
case "alpha":
e.alpha = stof(argv(3));
break;
+ case "color_main":
+ e.colormod_x = stof(argv(3));
+ e.colormod_y = stof(argv(4));
+ e.colormod_z = stof(argv(5));
+ break;
+ case "color_glow":
+ e.glowmod_x = stof(argv(3));
+ e.glowmod_y = stof(argv(4));
+ e.glowmod_z = stof(argv(5));
+ break;
case "frame":
e.frame = stof(argv(3));
break;