Image Removal Trigger

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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: 341
Joined: March 2nd, 2012, 3:12 pm
Location: Seattle, WA

Image Removal Trigger

Post by FaeLord » April 19th, 2018, 8:29 pm

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: 1509
Joined: October 10th, 2016, 3:06 am
Contact:

Re: Image Removal Trigger

Post by The_Gnat » April 20th, 2018, 6:37 am

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
Forum Administrator
Posts: 3380
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Image Removal Trigger

Post by Pentarctagon » April 20th, 2018, 6:49 am

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: 341
Joined: March 2nd, 2012, 3:12 pm
Location: Seattle, WA

Re: Image Removal Trigger

Post by FaeLord » April 23rd, 2018, 7:29 pm

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

Post Reply