Author Topic: [Solved] Animated armor  (Read 10417 times)

Offline bulletdesigner

  • Commander
  • *****
  • Posts: 685
    • View Profile
Re: Animated armor
« Reply #15 on: June 21, 2018, 12:05:18 pm »
y, but now i thinking about removing the flies , i guess it needed smaller pixels to work

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3347
    • View Profile
Re: Animated armor
« Reply #16 on: June 21, 2018, 07:55:25 pm »
smaller? Flies are to big? One way I could see reducing they size by making this pixel "transparent" (it will shift shade of pixel making it darker).

Offline bulletdesigner

  • Commander
  • *****
  • Posts: 685
    • View Profile
Re: Animated armor
« Reply #17 on: June 29, 2018, 07:22:00 pm »
men i guess there is some problem with the shadow of animated armor

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3347
    • View Profile
Re: Animated armor
« Reply #18 on: June 29, 2018, 07:38:34 pm »
this is not bug but feature :D
I forget add in pixel recolor script current shade part.
Code: [Select]
      recolorUnitSprite: |
        var int reg0;
        var int reg1;
        var int color;
       
        get_color color new_pixel;
        get_shade reg0 new_pixel;
       
        if or eq color COLOR_X1_PURPLE0 eq color COLOR_X1_PURPLE1;
          set reg1 anim_frame;
          wavegen_tri reg1 8 4 4;
          add reg0 reg1;
          limit_upper reg0 15;
          set_shade new_pixel reg0;
        end;
       
        add_shade new_pixel shade; #add environment shade
        return new_pixel;
you need add second to last line to add shade back.

It work  this way because it allow adding glowing parts to unit.
Some thing like this: https://www.youtube.com/watch?v=_G34PHMiBv0