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
→
scene drawings shade other actors
Pages:
1
2
scene drawings shade other actors
Shishkov
Posts: 169
March 20, 2013, 12:52:46 pm
I want in scene add a polygon without opacity with buttons for pause, but my buttons don't want to overlap on this polygon. I have them only behind. I had had a 30% of opacity before, but a lot of people said that this opacity did not suit to this game. So I want now to create the black polygon, but I can't do it because buttons don't want to overlap.
I tried many ways like draw image for last created actor, etc.
What do you recommend?
dtrungle
Posts: 1938
March 20, 2013, 01:03:07 pm
A little uncertain but, in the Draw event, draw the image of the button after drawing the polygon. You can hide the sprite of the actor if you want as well.
Shishkov
Posts: 169
March 20, 2013, 01:24:29 pm
I do a drawing in a scene. And in the drawing I create actors which are behind the polygon, after the already created polygon. Also, I tried to move these actors between layers: front, middle,back,etc
And everything was useless
SpookyBurger
Posts: 82
March 20, 2013, 04:33:40 pm
Have you tried altering the order in which you draw the polygon and buttons? Also screenshots always help.
Please try out my latest build of Patient 9 here.
http://www.stencyl.com/game/play/23179
dtrungle
Posts: 1938
March 20, 2013, 05:01:53 pm
If you're working with 'Draw', layers will not matter unless the 'Draws' are in 'Actor Space' which makes the 'Draw' layered by the Actor's layer.
In your case, set the created actor to an attribute. Then in 'Draw', draw the image of the 'actor' after drawing the polygon.
Shishkov
Posts: 169
March 21, 2013, 12:28:27 am
What do you mean in "set the created actor to an attribute"?
I did these things in scene drawing mode:
1)Drew polygon
2) created actor(button) at front
3)applied draw image for last created actor
This sequence is useless because my actor(button) is behind the polygon and I can't see it
SadiQ
Posts: 1795
March 21, 2013, 02:53:09 am
He means create an actor atribute (let's say Actor1), create your own actor(the button) then set Actor1 to last created actor. then in draw after the polygon just draw Actor1 after that.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.
Shishkov
Posts: 169
March 21, 2013, 03:43:37 am
What kind of attribute this actor should have: number, animation,text?
Would you mind writing an algorithm like I did?
SadiQ
Posts: 1795
March 21, 2013, 05:22:10 am
This works for my little test:
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.
Shishkov
Posts: 169
March 21, 2013, 05:46:34 am
Thank you very much for your detailed description and algorithm.
I will definitely try it today.
Shishkov
Posts: 169
March 21, 2013, 09:48:26 am
I created an actor_attribute as a actor type.
I tried to set it to the last created actor, but it gave me the list of all existing actors to choose rather then allow me to choose "last created actor".
And when I try "draw image for...", I can't choose attribute because it gave an error like "This behaviour contains no attributes of type 'actor' ", even though I had created the actor_attribute as a actor type.
Here is a screenshot.
What does it mean?
dtrungle
Posts: 1938
March 21, 2013, 10:09:31 am
actor_attribute is of type ACTOR not ACTOR TYPE.
Shishkov
Posts: 169
March 21, 2013, 10:18:22 am
No. It still doesn't work. All buttons behind the black polygon.
Here is the sequence of my actions(file attached).
What was wrong? Or maybe another way exists, doesn't it?
dtrungle
Posts: 1938
March 21, 2013, 10:29:06 am
Erm, you need to draw the image every frame. The way you have it set up, it only draws the image once.
You need to set the creation of the actor outside of the Drawing Event. The Drawing event should not have timers or create/kill codes.
Shishkov
Posts: 169
March 21, 2013, 11:34:59 am
At last it has drawn its image, but this actor doesn't work. I have only image of this actor, but I also want to make it operate like "continue the game", in other words, use an event of this actor.
What do you recommend?
Pages:
1
2