[Solved] How to fill rectangles as numbers from down to top?

1MrPaul1

  • *
  • Posts: 1285
I made some bar, something as health bar from "draw health" behavior. So, this behavior convert numbers to filled rectangles, and always draw from left to right and from top to down, but how to make start of drawing from down and growing up with increasing of bar value?

« Last Edit: October 11, 2011, 02:35:38 am by 1MrPaul1 »

Miasmos Games

  • Posts: 878
This is almost completely not understandable, could you maybe try rephrasing it a little?

Cupcake Bounce

1MrPaul1

  • *
  • Posts: 1285
:) heh, just show my behavior. This behavior draw the bar. But in this variant, drawing starting from top and goes down, but I want to make start of drawing from bottom to up. Hope in this time my explanation more clear

Alexin

  • *
  • Posts: 3130
x = 784
y = bottom - ([power as number] * 3.5)
w = 7
h = [power as number] * 3.5

The Y axis increments towards the bottom of the screen, so the variable "bottom" gives you the "baseline" of the bar. Use it to control where to draw it vertically.
"Find the fun"
alexin@stencyl.com

1MrPaul1

  • *
  • Posts: 1285
 it works perfectly from first try as everything that you adviced! Thank you Alexin!