Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Drawing and erasing text in sequence?

Jason

Awesome Bro

Another problem now!

I can display text both through the draw text drag and drop, and through using a script,

However, what I can't for the love of me find out, is how to erase text...

I've tried putting the text into a string, and deleting the string before showing a new string of text, but that just has no effect whatsoever...

And now I'm pretty much out of ideas after trying for two hours...

Any help?... again.
 
Make an alarm event. Since there is no wait command, set how long you want your alarm to count before setting off. Then in a new event, the event that happens when alarm xx goes off, put what you want to happen.
 

Jason

Awesome Bro

I don't get it, it says "steps", now, I don't know how that works, I assume it means after you've walked that far? I seriously have no idea and feel like a twat, lol...

I set it to 5, and waited, and nothing happened...

Care to explain a little more? I can't do anything with 'em! D:
 
Okay, set up everything. Include the fireworks and whatever.

Then make an alarm action that sets alarm 1 to go off.
Steps are time measurements. If you look in a rooms properties you can change and look at how many steps a room functions per second. I think the default is 30. That means in order for 5 seconds to occur, you need to wait 150 steps.

Then make a new alarm event, not an action, an event. Make it so that when alarm 1 goes off, then object whatever will move to the next room.
 

Jason

Awesome Bro

Well apparently, according to some guys on the GM forums, you can't delete text once you've drawn it, unless you refresh the screen, so I did that, and nothing happened. I've also tried using timers, and that doesn't work either D:

This is REALLY getting on my nerves now D:
 

Jason

Awesome Bro

It's pretty much just a draw event, where I've set the font/size/colour, and then the script:

Code:
<div class="gml" id="{CB}" style="font-family: monospace;"><ol> 

[url=http://www.zonamakers.com/gmlreference/draw_text.html]<span style="color: navy;">draw_text[/url]

    (<span style="color: #cc66cc;">20, <span style="color: #cc66cc;">20, "This is an important message!#Press any key to read it.")

    

[url=http://www.zonamakers.com/gmlreference/keyboard_wait.html]<span style="color: navy;">keyboard_wait[/url]();

 

[url=http://www.zonamakers.com/gmlreference/screen_refresh.html]<span style="color: navy;">screen_refresh[/url]();

 

[url=http://www.zonamakers.com/gmlreference/draw_text.html]<span style="color: navy;">draw_text[/url]

    (<span style="color: #cc66cc;">20, <span style="color: #cc66cc;">20, "Hmm.... <span style="color: #202020;">did it work?")

 

Nothing much, since I'm just using it as a test for the moment...
 
I tried working with this one, but I really have no clue. I have never tried to change text like that before. Its weird that it doesnt update however. I would continue to try with the GM forums personally, you'll get better luck there. I apologize that I cannot help you. D:
 

Jason

Awesome Bro

So I asked on the GM forums, and it turns out I was sort of on the right track, although I needed to add a variable, and make it so everytime I draw_text and press a key to make it go to the next, I increase the variable by 1 etc.

So like, if variable bacon was 1, it'd say "Hi, I'm bacon!"
And then you press any key to continue
variable bacon changes to 2, and then I have an if statement, if bacon was 2, say "No... no I'm not..."

And so on like that.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top