how to get actor pixel alpha value

designpeg

  • *
  • Posts: 731
Could anyone explain ho to get an actors alpha value?
I realise that I probably need to use a code block, and a search of the forum brings up some code that may work - but i'm not sure how to put it all together.

This would make for a great extension!!

Any help greatly appreciated.

PhilIrby

  • Posts: 545
I don't know if this would work for you but there is a block in Images -> Change Images;

[get pixel at (x:_, Y:_) for {image from Actor} ]

designpeg

  • *
  • Posts: 731
Fantastic thanks! that's just what I needed. I'd seen that block previously, but just assumed it would return an rgb value.

Do you know what format the returned value is in? its 8 digits long so I assumed it was RGBA or ARGB hex at first, but it's not.

rob1221

  • *
  • Posts: 9472
That block doesn't include alpha.  You'd have to use code to get it.  See this thread (I don't think a list is needed anymore): http://community.stencyl.com/index.php/topic,19596.0.html