Stencyl 3.4.0 is now out. Get it now!

How do you draw text when using user input?


  • Posts: 4
I couldn't figure out how to draw text and use user input, any help is appreciated.


  • *
  • Posts: 1551
Drawing blocks (all the bright blue ones) have to go into a drawing event. The "draw text" box isn't going to create a label or a text box. It instructs the renderer to draw the text each time the canvas is redrawn (60 times per second).

What you will want to do is set a boolean when the mouse was pressed on the actor and the money counter is < 0.5. Then in a drawing event put an 'if' statement. If the boolean is true then draw the text "not enough money" at 203, 148.

You will also want to have some method to set the boolean back to false again--either using a 'do after X seconds' block to set the boolean back to false after some amount of time, setting the boolean to false when the player clicks on something else, etc.


  • Posts: 4
Thank you so much! I really appreciate it.