Author Topic: Is it possible to have items with lights?  (Read 1226 times)

I want to know if it is possible to actually create something like a flash light. Can you put a lightsource on a .DTS object and then actually have it emitting light or Blockland doesn't let you do that?

Ive seen many different attempts at making a flashlight in blockland and all of them had an annoying flickering effect.
It might be possible but nobody has done it perfectly yet, I have no knowledge of coding so I wouldn't know if it was actually impossible.

Ive seen many different attempts at making a flashlight in blockland and all of them had an annoying flickering effect.
It might be possible but nobody has done it perfectly yet, I have no knowledge of coding so I wouldn't know if it was actually impossible.
flickering is because of loops, if you don't want flickering on and off, something new must be created

flickering is because of loops, if you don't want flickering on and off, something new must be created
Just attach an animated light datablock to it.

Can you add a mountPoint to the DTS and then mount the light object to it?

flickering is because of loops, if you don't want flickering on and off, something new must be created
Could you not apply a lifetime to each light?, overlapping light times would disable the flickering.

hydralisk somehow managed it i think

idk if he actually did because i don't remember it too well and i never absorbed the code but i think it worked pretty well

What if you do like the lantern item does, but have the onFire script mount the empty.dts object that will have the light script instead of the lantern_ON_Image and have it look something like this?

Something like this
Code: [Select]
className = "WeaponImage";

shapeFile = "base/data/shapes/empty.dts";
emap = true;

item = lanternItem;
ammo = " ";
projectile = "";
projectileType = Projectile;

mountPoint = 0;
offset = "0 6 0";

correctMuzzleVector = false;

eyeOffset = ("0 6 0");

melee = true;
doRetraction = false;
armReady = true;

hasLight = true;
lightType = "ConstantLight";
lightRadius = 64;
lightColor  = "1 1 1 1.0";

Doing this myself, it works, however, the light goes in the opposite direction of where the image is offset to and the light does not follow the model, it rotates on a pivot point of it's own, which i can't seem to figure out how to change

Well to tell you the truth I am wondering about this because recently Roblox got this and Blockland doesn't have this....Blockland being my favorite game, I am sort of embarrassed and want it to better than Roblox (have the feature to mount light sources on .DTS files). I hope Badspot can add some kind of support for this.

Why not mount an invisible bot with a light to the flashlight


Why a bot?
He's probably thinking that you could mount a bot and use that light for it to work.

Why not mount a bot to your left hand while the flashlight is in your right hand, and create a snake of bots mounted together until one of the invisible bots reach the flashlight's end. That bot will have a light on. The bots are deleted when the flashlight is unheld

Why not mount a bot to your left hand while the flashlight is in your right hand, and create a snake of bots mounted together until one of the invisible bots reach the flashlight's end. That bot will have a light on. The bots are deleted when the flashlight is unheld
Ew that sounds like a terrible way of executing this idea

Ew that sounds like a terrible way of executing this idea
I think of such weird ways to execute ideas