TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
how to get actor pixel alpha value
Pages:
1
how to get actor pixel alpha value
designpeg
Posts: 731
January 16, 2015, 01:09:59 pm
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
January 16, 2015, 08:05:34 pm
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
January 18, 2015, 03:21:15 am
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
January 18, 2015, 08:56:45 am
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
https://twitter.com/Rob1221dev
Pages:
1