Author Topic: Coloring a Mounted Object  (Read 1515 times)

i made a flashlight model, and i want to make it the color of the player's current spray can when they equip it. i know how to get the color, but im not sure how to change the color of a mounted object. help plz?

also, the model's texture is blank.png, did i do that part right?

Make sure BOTH doColorShift's is set to true

docolorshift is set to true, but the object can only be the color assigned to colorshiftcolor. i want it so that one player's flashlight can be a different color than another player's. i tried assigning the player's paint color to colorshiftcolor when they equip, but when one person uses their flashlight, it changes the color of everyone in the server's flashlight. :/

Spraycans use 5 x 72 different datablocks to work for each colour. Each one looks up the colour ID table for its ID (colorSet.txt) and then creates a weaponimage, projectile and three particles for it. With a script it may be possible for the flashlight, but it'd be easier to create a few in a few colours (red, blue, green, white) and check whether your %obj.client.currentColor in WhiteFlashlightImage::onMount is equal to 0, 1 or 2 (red, green, blue) and mount those colours instead, or just no extra code.

PLEASE NO! youll give me horible onmount errors, i can barely even play blockland cuz some mod is screwing with onmount already.