This page on the Stencyl site doesn’t really go into detail on creating some text to give a player feedback, so I figured I would write about it. We are creating a way to give the user textual feedback and I’m sure you could expand upon this.
First I make a new Actor called HUD. I am not going to add any art to this actor. I do need to anchor it to the screen so that it’s on top of everything and not in the game physics flow.
Then make a text game attribute called “User Feedback”. I use a game attribute so you can call it from anywhere in the game. Hello Dave is a little sci-fi humor.

As with many of these types of programs, fonts are not included. You need to add a new font. I like a typewriter font, use what you like.
and then to tie it all together, draw the message
Now that sets up the HUD, but you still need to place it and send some data to it. In a scene click on the red triangle “HUD” in the actors pallet. then click where you want the text to show up. The text will show up above and to the left of the red triangle.
in the scene events, you can test the system by sending some text to the “User Feedback” attribute like so.
Please feel free to ask questions in the comments below







Leave a Reply