Using drawing when game over happen, instead creat a image!

amir82a

  • Posts: 16
Hi guys
I don't know how use drawing  when my player die and game over happens instead creating a image!

in my game when game over happens it uses creating a actor as game over banner on screen, but I want use something like as drawing HUD by using drawing rect as banner!
How can I do that?

Tuo

  • *
  • Posts: 2469
Between your grammar and lack of screenshots, it's nearly impossible to tell what you are asking help with...
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

sdieters

  • Posts: 2068
@Tuo,
instead of spawning an actor which is his game over banner, he wants to draw a rectangle with some text in it.

you can do this by using a boolean which tells a drawing event to draw your rectangle and text when your player dies. but i dont know why you would prefer that since a banner actor looks way better.
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

amir82a

  • Posts: 16
I am making a game for android and you know in APK file you must have 4 different size for graphic files, images make your game big in file size, I have a game over banner, a pause banner, a success banner and a mission failed banner, now you see why I need use drawing instead images!

@sdieters thanks
It works but the problem is the drawing is always on front and I cant create other actors on it!
I need create reset, back to home buttons there!
but they go behind drawing banner!

sdieters

  • Posts: 2068
you can always draw a rectangle anbut leave the space where your actor comes open.
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

amir82a

  • Posts: 16
No I want buttons be on the banner
Something like pic I have attached

I think I must create an attribute then set Banner to an Attribute bye using "set PauseBanner to [last created actor]"
then use "Send [PauseBanner] [to back]"

something like that
But the problem is I dont know what kind of attribute must be, Actor did not works!

Tuo

  • *
  • Posts: 2469
In many of my demos in the games area of the StencylForge, I go over how to make buttons without actors. I'd suggest downloading and looking through the code (which is fully commented) for my "Demo- Actorless Card Duel". That goes over basically everything you can do with drawing codes (as the title implies, it's basically a full game without a single actor in it!).
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)