I basically want to duplicate the color effect found in this video (NOTE: this video is slowed to 10 fps to make it easier to see the effect):
The effect is a triangle, that has a gradient in the middle of it, some transparency along the edges, and a waviness effect applied to it. I managed to duplicate all of this, but I have NO IDEA how to duplicate the color effect. It basically goes from blue, to purple, to yellow, green, light blue, then blue and repeats. It seems to have a color scroll that it just moves over the object in a set pattern, or changes the color one line of pixels vertically at a time.
I was trying to come up with a way to use d3d fog to do it on a surface but I couldn't think of one. Can someone please assist me with accomplishing this color effect? It would be very much appreciated. I will gladly rep the person, and also credit them for the code.
Here is my version of the effect so far (the code is below: it is all done in the draw event): http://youtu.be/7g8XR73wIWc
//makes the wave go in 1 direction first (CREDIT GOES TO XOT FOR GIVING ME THE ORIGINAL VERSION OF THIS CODE)
if (wave_size_increase ==0)
{
if (phase < 999999) {phase+=1/22;}
else {wave_size_increase = 1;}
}
//then once it goes over enough it goes in other direction
else
{
if (phase > 0) {phase-=1/22;}
else {wave_size_increase = 0;}
}
//next 4 vars are needed for script to work & MUST be done like this
var size,shift,sx,sy;
width = sprite_get_width(sprite_index);
height = sprite_get_height(sprite_index);
xoff = sprite_get_xoffset(sprite_index);
yoff = sprite_get_yoffset(sprite_index);
//here it sets wether to do a wave horizontally
if (axis == 1) {size = height;}
//or vertically
else {size = width;}
//makes it appear to glow more
draw_set_blend_mode(bm_add);
//runs loops once for each pixel based on whether we use height or width
for (count=0; count<size; count+=1)
{
//this controls the wave effect
shift = amplitude*sin(3.6*pi*((count/wavelength)+phase));
//hozintal wave first
if (axis == 1)
{
sx = image_xscale*(shift-xoff)+x;
sy = image_yscale*(count-yoff)+y;
draw_sprite_part_ext(sprite_index,image_index,0,count,width,1,sx,sy,image_xscale,image_yscale,c_white,image_alpha);
}
//now vertical wave
else
{
sx = image_xscale*(count-xoff)+x;
sy = image_yscale*(shift-yoff)+y;
draw_sprite_part_ext(sprite_index,image_index,count,0,1,height,sx,sy,image_xscale,image_yscale,c_white,image_alpha);
}
}
//sets draw back to normal so things drawn after won't glow
draw_set_blend_mode(bm_normal);
Edited by esco, 01 April 2012 - 05:18 PM.













