ID:171668
Aug 24 2004, 5:20 am
|
|
I'm stuck and I just cant figure it out. I want to use SwapColor() to change the color of my mobs icon, but Its a multi tiled mob using overlays. I can't figure out How to do it. When I try to SwapColor on my overlays, the overlays just disappear.. Can anyone help me with this one?
|
Aug 24 2004, 5:33 am
|
|
This belongs in the newbie central and your answer is probably RGB().
|
Troglodyte wrote:
I'm stuck and I just cant figure it out. I want to use SwapColor() to change the color of my mobs icon, but Its a multi tiled mob using overlays. I can't figure out How to do it. When I try to SwapColor on my overlays, the overlays just disappear.. Can anyone help me with this one? I had a similar problem. I went the long way, and made a proc to reset the overlays when you changed the color or the mob. |
In response to Jik
|
|
So what did you do, remove the overlays, make new objects and swapcolor them, and then add them to overlays?
|
In response to Troglodyte
|
|
What I did was reset the icon for the mob.
(if the mob.icon was 'this.dmi' I just re-assigned it : mob.icon = 'this.dmi') also remove all overlays with mob.overlays = "" As to changing the color, the initial mob was a greyscale, and I used : mob.icon += rgb(255,0,0) //this is red to adjust the "hue" of the mob. |
In response to Jik
|
|
Jik wrote:
also remove all overlays with You're better off using null or list() here. The overlays var is never equal to a string, so setting it to one could give you unpredictable results. Lummox JR |
Troglodyte wrote:
I'm stuck and I just cant figure it out. I want to use SwapColor() to change the color of my mobs icon, but Its a multi tiled mob using overlays. I can't figure out How to do it. When I try to SwapColor on my overlays, the overlays just disappear.. Can anyone help me with this one? Once an overlay is set you can't simply modify it; it has to be deleted and redone. Lummox JR |
atom That would change the color of all overlays with a desc of "mob part". However, for that to work, you must add the overlays just like that. |