Sleep command?

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
Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Sleep command?

Post by Choicerer »

Is there any way to pause the execution of code without pausing the game?
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Sleep command?

Post by octalot »

When do you want the next bit of code to run? What happens if the player moves units while the code is paused, will you still want the next bit of code to run?
Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Re: Sleep command?

Post by Choicerer »

Yes, I do. I want a pause of a couple of seconds.
Oh, and my Wesnoth build is the stable one.
User avatar
Xara
Posts: 270
Joined: December 26th, 2014, 12:23 am
Location: Beijing

Re: Sleep command?

Post by Xara »

Is [delay] what you want?
It pronounces Sha'ha, not Zara.

Feedback Thread of my Add-ons
Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Re: Sleep command?

Post by Choicerer »

Nope, delay pauses the game. I only want to pause the execution of a given bit of code.
Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Re: Sleep command?

Post by Choicerer »

I got an idea to use time stamps during every select event, does anyone have any better idea?
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Sleep command?

Post by Ravana »

Depending on what you want to do, something like showing animation might work.
Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Re: Sleep command?

Post by Choicerer »

Great idea, thank you! But can you animate hidden units?
Post Reply