Image Removal Trigger

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
FaeLord
Posts: 343
Joined: March 2nd, 2012, 3:12 pm
Location: Seattle, WA

Image Removal Trigger

Post by FaeLord »

Hello:

I would like to know if it is possible to set the spacebar as a trigger to remove an image from the screen. As the images in question will be larger than 100 x 100 I would be using [item] to place them, unless there is another better method. I should mention that the images will be displayed with corresponding dialogue, so the spacebar trigger should remove the image and invoke the next dialogue set also.

Thanks
FaeLord
Wesnoth stole my summer . . . again.
User avatar
The_Gnat
Posts: 2215
Joined: October 10th, 2016, 3:06 am
Contact:

Re: Image Removal Trigger

Post by The_Gnat »

What you could instead do is create an image, show the dialogue then remove the image,sequentially.

If I remember correctly the image will not be removed until after the dialogue is dismissed anyway because the code after doesn't execute until after the dialogue.
User avatar
Pentarctagon
Project Manager
Posts: 5533
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Image Removal Trigger

Post by Pentarctagon »

Yep. You can even sort-of indirectly verify this by checking your CPU usage when a [message] is being displayed vs when it's not - it'll be lower when the [message] is being displayed, since nothing on the screen is being updated.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
FaeLord
Posts: 343
Joined: March 2nd, 2012, 3:12 pm
Location: Seattle, WA

Re: Image Removal Trigger

Post by FaeLord »

Ok. Thanks. I'll work on it.
Wesnoth stole my summer . . . again.
Post Reply