I'm trying to recreate the original TBM's skeleton command(kinda like RTB's "skeleme"), which I believe was dropped due to high datablock usage. I'm trying to bullshit it by spawning static shapes, then mounting them to the player with appropriate offsets and non-cloakability.


Code:
//Suck this hard, fast, and long Ephilatles
datablock ShapeBaseImageData(SkeleShowImage) {
   shapeFile = "~/data/shapes/head.dts";
   cloaktexture = "~/data/shapes/base.transmore";
   mountPoint = 5;
   className = "ItemImage";
   cloakable = false;
   eyeoffset = "0 -2 0";
   Offset = "0 0 -2";
};

function SkeleShowImage::onMount(%this,%obj) //check this shit out
{
%oshtbody = new TSStatic() {
   position = "0 0 0";
   rotation = "1 0 0 0";
   scale = "1 1 1";
   shapeName = "~/data/shapes/torso.dts";
   Offset = "0 0 -2";
   cloakable = false;
};
%oshtbody.offset = "0 0 -2";
%oshtbody.cloakable = false;
%oshtbody.mountObject(%obj, 2);
%oshtbody.offset = "0 0 -2"; //not sure if any of these will work, but only 1 set really has to
%oshtbody.cloakable = false;

%oshtrightarm = new TSStatic() {
   position = "0 0 0";
   rotation = "1 0 0 0";
   scale = "1 1 1";
   shapeName = "~/data/shapes/right-arm.dts";
   Offset = "-0.5 0 -2";
   cloakable = false;
};
%oshtrightarm.offset = "-0.5 0 -2";
%oshtrightarm.cloakable = false;
%oshtrightarm.mountObject(%obj, 0);
%oshtrightarm.offset = "-0.5 0 -2"; //not sure if any of these will work, but only 1 set really has to
%oshtrightarm.cloakable = false;

%oshtleftarm = new TSStatic() {
   position = "0 0 0";
   rotation = "1 0 0 0";
   scale = "1 1 1";
   shapeName = "~/data/shapes/left-arm.dts";
   Offset = "0.5 0 -2";
   cloakable = false;
};
%oshtleftarm.offset = "0.5 0 -2";
%oshtleftarm.cloakable = false;
%oshtleftarm.mountObject(%obj, 1);
%oshtleftarm.offset = "0.5 0 -2"; //not sure if any of these will work, but only 1 set really has to
%oshtleftarm.cloakable = false;

%oshtrightleg = new TSStatic() {
   position = "0 0 0";
   rotation = "1 0 0 0";
   scale = "1 1 1";
   shapeName = "~/data/shapes/leg.dts";
   cloakable = false;
};
%oshtrightleg.cloakable = false;
%oshtrightleg.mountObject(%obj, 3);
%oshtrightleg.cloakable = false; //not sure if any of these will work, but only 1 set really has to

%oshtleftleg = new TSStatic() {
   position = "0 0 0";
   rotation = "1 0 0 0";
   scale = "1 1 1";
   shapeName = "~/data/shapes/leg.dts";
   cloakable = false;
};
%oshtleftleg.cloakable = false;
%oshtleftleg.mountObject(%obj, 4);
%oshtleftleg.cloakable = false; //not sure if any of these will work, but only 1 set really has to

%obj.body = %oshtbody; //You'll see what this is for in a sec
%obj.rightarm = %oshtrightarm;
%obj.leftarm = %oshtleftarm;
%obj.rightleg = %oshtrightleg;
%obj.leftleg = %oshtleftleg;

%obj.setcloaked(1);
}

function SkeleShowImage::onUnmount(%this,%obj)
{
%obj.setcloaked(0);
%oshtbody = %obj.body; //stay with me
%oshtrightarm = %obj.rightarm;
%oshtleftarm = %obj.leftarm;
%oshtrightleg = %obj.rightleg;
%oshtleftleg = %obj.leftleg;
UnmountObject(%obj.body);
UnmountObject(%obj.rightarm);
UnmountObject(%obj.leftarm);
UnmountObject(%obj.rightleg);
UnmountObject(%obj.leftleg);
%oshtbody.delete(); //see, I had a point to this the whole time. probably could've made it simpler but meh
%oshtrightarm.delete();
%oshtleftarm.delete();
%oshtrightleg.delete();
%oshtleftleg.delete();
}


Apparently TSStatic's can't be mounted, so is there any other way to do this without using 6 datablocks?

EDIT- I can't redefine the model of a static shape datablock, nor can I make it move to and with the player, nor can I even apply an offset, so that idea won't work for this. Any other way I can do it, or am I stuck using 4 datablocks and just redefining the offsets/mountpoints for the left arm and leg?
a, can't mount the same image twice. Fuck it I won't have skeletons then.
DShiznit wrote:
<font color=red>censored</font>, can't mount the same image twice. <font color=red>censored</font> it I won't have skeletons then.
That's correct; the only cheat is to of course duplicate the object.
something like this might work? (this code is definitely incorrect, I'm just showing how it would work, if it does)

%part = new StaticShape(){
datablock="genericdatablock";
shapefile="...";
}
I tried that, but I couldn't redefine the shapename, and I think this is because all shapenames are sent to the client when they connect.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement