Author Topic: Unique datablocks per player(?)  (Read 710 times)

I've had my lantern out for months and only recently realized that the light mounted to the item only works for the host.

The toggling script is quite simple. The animation and emitter works individually it seems, but the light does not.
Code: [Select]
function lantern_OFF_Image::onFire(%this, %obj, %slot)
{
%obj.schedule(0,"playThread",2,shiftRight);
%obj.schedule(200,"playThread",1,armReadyRight);
%obj.unMountImage(0);
%obj.mountimage(lantern_ON_Image, 0);
}

Is this a problem with this default light adding thing or something else? I remember reading that when making changes (mounting?) to an item datablock, all the items in the server get the same changes.
Code: [Select]
datablock ShapeBaseImageData(lantern_ON_Image)
{
-snip-
hasLight = true;
lightType = "ConstantLight";
lightRadius = 30;
lightColor  = "1.0 0.5 0.0 1.0";
-snip-

But the point is, emitter and animations work per player uniquely, but the light only works for the host.

If I were you, I would examine each piece of the script, echoing each variable. Also check if Your add-on requires another add-on for it to work.

He said it only works for the host, which means it's an issue with the engine or Badspot's download system. I mean, there may be some kind of fix, but his code isn't broken.
« Last Edit: November 26, 2012, 04:40:12 AM by Trinick. »

"He said it only works for the host, which means it's an object with the engine"
Which is why I recommended the echoing of variables..
But his code isn't broken.
But it's always good to double-check..

There are a few variables in Torque that have been neglected in Blockland, maybe the shapeBaseImage light variables are some of them. Ask Badspot and maybe he'll look into it.