obj/bar
red_bar
icon = 'icons/bar.dmi'
icon_state = "red"
screen_loc = "5,7"
New()
..()
spawn()
filters += filter(type="drop_shadow",x=0,y=0,size=5,offset=2,color = rgb(255,0,0,0))
var/G = filters[filters.len]
do
animate(G,color=rgb(255,0,0,255),time = 10,flags = ANIMATION_END_NOW)
sleep(10)
animate(G,color=rgb(255,0,0,150),time = 10,flags = ANIMATION_END_NOW)
sleep(10)
while(1)
green_bar
icon = 'icons/bar.dmi'
icon_state = "green"
screen_loc = "5,6"
New()
..()
spawn()
filters += filter(type="drop_shadow",x=0,y=0,size=5,offset=2,color = rgb(0,255,0,0))
var/G = filters[filters.len]
do
animate(G,color=rgb(0,255,0,255),time = 10,flags = ANIMATION_PARALLEL)
sleep(10)
animate(G,color=rgb(0,255,0,150),time = 10,flags = ANIMATION_PARALLEL)
sleep(10)
while(1)
blue_bar
icon = 'icons/bar.dmi'
icon_state = "blue"
screen_loc = "5,5"
New()
..()
spawn()
filters += filter(type="drop_shadow",x=0,y=0,size=5,offset=2,color = rgb(0,0,255,0))
var/G = filters[filters.len]
do
animate(G,color=rgb(0,0,255,255),time = 10,flags = ANIMATION_PARALLEL)
sleep(10)
animate(G,color=rgb(0,0,255,150),time = 10,flags = ANIMATION_PARALLEL)
sleep(10)
while(1)
mob/var
obj
red_bar = new /obj/bar/red_bar
green_bar = new /obj/bar/green_bar
blue_bar = new /obj/bar/blue_bar
bar_started = 0
mob/verb
update_bar()
if(bar_started) {bar_started = 0;return}
else bar_started = 1
var
GX = 0
BX = 64
while(bar_started)
if(GX) GX = 0
else GX = 64
var
matrix/M1 = new
matrix/M2 = new
M1.Translate(32,0)
M1.Scale(max(min(ceil(GX * 64 / 64),64),0) / 64,1)
M1.Translate(-32,0)
animate(green_bar,transform = M1,time = 10,flags = ANIMATION_PARALLEL)
if(BX) BX = 0
else BX = 64
M2.Translate(32,0)
M2.Scale(max(min(ceil(BX * 64 / 64),64),0) / 64,1)
M2.Translate(-32,0)
animate(blue_bar,transform = M2,time = 10,flags = ANIMATION_PARALLEL)
sleep(10)
flash_bar()
animate(red_bar,color = list(1,1,1, 1,1,1, 1,1,1, 0,0,0),time = 2,loop = 2,flags = ANIMATION_PARALLEL)
animate(green_bar,color = list(1,1,1, 1,1,1, 1,1,1, 0,0,0),time = 2,loop = 2,flags = ANIMATION_PARALLEL)
animate(blue_bar,color = list(1,1,1, 1,1,1, 1,1,1, 0,0,0),time = 2,loop = 2,flags = ANIMATION_PARALLEL)
sleep(4)
red_bar.color = null
green_bar.color = null
blue_bar.color = null
Problem description:
So I created a demo that sorta demonstrates my issue and hope that someone can clarify things for me or help me figure out what I'm doing wrong. The demo kinda showcases some ideas I wanted to do specifically the bars will have a glowing effect at certain points and will flash to indicate they are ready. Unfortunately I can't seem to get this right as when the flashing comes into play it messes with the filters. Basically I want the bar to flash white not the glow effect if it was enabled. For the purpose of the demo I made it to where as many things could be active at once to test if they are all capable and so far it's mainly the colors that are driving me crazy.
EDIT: For whatever reason when I uploaded the demo it didn't put in all the files you'd need to run it. Should be fixed now.