This_is_SG

code for color change

Nov 8th, 2020 (edited)
835
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //this is the code used in `update.gml`:
  2. col_time = 0
  3. with obj_stage_article {
  4.     if (get_gameplay_time() > 140) {
  5.         col_time = get_gameplay_time()
  6.         if col_time % 380 = 0 {
  7.             swapped = true;
  8.         }
  9.         if col_time % 400 = 0 {
  10.             swap += 1;
  11.             not_white = true;
  12.             if (swap == 5 or swap == 0) {
  13.                    swap = 1;
  14.             }
  15.            }
  16.            if col_time % 420 = 0 {
  17.                swapped = false;
  18.                col_time = 0;
  19.            }
  20.     }
  21. }
  22.  
  23. //and this in `article1_draw.gml`:
  24. var pan = 0;
  25. if swapped == true {
  26.     timer++;
  27.     pan = timer*100
  28.     draw_triangle_colour(get_marker_x(6), get_marker_y(6)+pan, get_marker_x(7), get_marker_y(7)+pan, get_marker_x(8), get_marker_y(8)+pan, colorf, colorf, colorf, false);
  29.     draw_triangle_colour(get_marker_x(6), get_marker_y(6)+pan, get_marker_x(9), get_marker_y(9)+pan, get_marker_x(10), get_marker_y(10)+pan, colorf, colorf, colorf, false);
  30. } else {
  31.     timer = 0;
  32. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×