mob/proc/Color_Swap(Color as text, delay as num,speed as num)
var/old_icon = src.icon
switch(Color)
if("Red")
for(var/I, I = delay, I--)
src.icon += rgb(speed,0,0)
for(var/O, O = delay, O--)
src.icon -= rgb(speed,0,0)
if("Blue")
for(var/I, I = delay, I--)
src.icon += rgb(0,0,speed)
for(var/O, O = delay, O--)
src.icon -= rgb(0,speed,0)
if("Green")
for(var/I, I = delay, I--)
src.icon += rgb(0,speed,0)
for(var/O, O = delay, O--)
src.icon -= rgb(0,speed,0)
if("Transperant")
for(var/I, I = delay, I--)
src.icon += rgb(0,0,0,speed)
for(var/O, O = delay, O--)
src.icon -= rgb(0,0,0,speed)
ID:151837
Jan 11 2009, 2:17 am
|
|
Well I was just wanting to know would this work? It's meant to slowly alternate from one color back
|
You could use LummoxJR's IconProcs. It uses MapColors(), a new feature in BYOND 4.0.
The way you're doing it, it's going go back gray. For the decreasing, you're going to want to revert to the initial icon, then add rgb(), but less than it had. |
(o it uses sd_procs library)