Draw number attribute in center of an actor

YobKgames

  • Posts: 63
all is in the title

JeffreyDriver

  • Posts: 2262
The Drawing Utilities extension has blocks for easily centring text.

YobKgames

  • Posts: 63
how can i draw a number attribute at the center of my actor ? i dont understand

Luyren

  • *
  • Posts: 2802
See attachment.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

YobKgames

  • Posts: 63
this code dont draw the attribute at the centerr :(

LIBERADO

  • *
  • Posts: 2720
@YobKgames we can help if you provide enough information. Instead of saying "this code dont draw the attribute at the center", tell us what exactly happens when you use the code provided by Luyren.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

YobKgames

  • Posts: 63
the code draw the attribute at the bottom (center)  of the actor
excuse me for my bad english
liberado can you give me another solution ??

Luyren

  • *
  • Posts: 2802
Right, I forgot something: in the Y position to draw, it should be [(Half height of self) - (height of text using font/2)]. This should centralize the Y position of the text with the actor.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

YobKgames

  • Posts: 63
Thnx luyren that's workk