scene drawings shade other actors

Shishkov

  • Posts: 169
 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
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
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
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
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
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
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
What kind of attribute this actor should have: number, animation,text?

Would you mind writing an algorithm like I did?

SadiQ

  • Posts: 1795
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
Thank you very much for your detailed description and algorithm.
I will definitely try it today.

Shishkov

  • Posts: 169
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
actor_attribute is of type ACTOR not ACTOR TYPE.

Shishkov

  • Posts: 169
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
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
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?