Author Topic: Item::setNodeColor  (Read 701 times)

Why was this function removed in v12? I can no longer use it to recolor certain items when dropped. It was very useful for saving datablocks...

EDIT: It seems it's been changed to only allow you to set the colour to the item's colorShiftColor. It worked in v11, I was just wondering why it's been changed.
« Last Edit: July 25, 2009, 01:52:21 AM by Space Guy »

Attempting to set the datablock's colorShiftColor and then using setNodeColor on the item works, but not if I try to set multiple items at once.

I'd rather not create 64 extra datablocks for every paint colour when I'm already doing that for the weapon images, does anyone have a different solution?

Aglass0fMilk posted this in his topic and it looks like it may be of some use to you

   Parent::OnMount(%this,%obj,%slot);
   HuntingRifleImage.doColorShif t = true;
   HuntingRifleImage.colorShiftC olor = %obj.client.rHandColor;
   echo(%obj.RHandColor);
   %obj.hidenode("LHand");
   %obj.hidenode("RHand");
« Last Edit: July 25, 2009, 07:06:06 PM by Siba »

That doesn't work for multiple images. I don't know of an alternative though 0.o

I do not mean mounted weapon images - for this I'm concentrating on the items. (although a system to help with colorshifting weapon images would help save more datablocks, too)

Space here's something that might help you

http://iam.colum.edu/students/RBatten/torqueDoxygen/classParticleEmitter.html

Quote
void ParticleEmitter::setSizes     (      F32 *       sizeList      )      
     

Sets sizes of particles based on sizelist provided.

Parameters:
       sizeList    List of sizes

void ParticleEmitter::setColors    (     ColorF *     colorList     )     
     

Sets colors for particles based on color list provided.

Parameters:
       colorList    List of colors

I just found this reference site again today after losing all my bookmarks a while ago. Not super-certain whether this stuff works

I found a method for recoloring items using a list of existing ones plus a schedule. It doesn't work perfectly but it's good enough.

Muffinmix - if you mean that for the projectiles one, I'm not sure that will work - the projectile doesn't have a specific emitter object to use, only a set ParticleEmitterData...

I found a method for recoloring items using a list of existing ones plus a schedule. It doesn't work perfectly but it's good enough.

Muffinmix - if you mean that for the projectiles one, I'm not sure that will work - the projectile doesn't have a specific emitter object to use, only a set ParticleEmitterData...

Oh whoops I didn't see that.