Non-paused "wait" action by "wait for signal"

Discussion and feedback on Construct 2

Post » Thu Aug 14, 2014 3:31 pm

"wait" action will also be paused by set timescale = 0.
Now we could use a object with a timer behavior, and set the timescale of this object to 1, i.e. the time of this object will not be paused.
We just
Image

to have a non-paused "wait action" by "wait for signal".

Capx

Thanks for having this new wait for signal action!
B
108
S
26
G
272
Posts: 4,473
Reputation: 152,281

Post » Thu Aug 14, 2014 3:59 pm

Wow, this might solve my problems in multiplayer connection recovery!!!
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Thu Aug 14, 2014 4:53 pm

Turn down for wait?
Image ImageImage
B
169
S
50
G
174
Posts: 8,331
Reputation: 110,806

Post » Thu Aug 14, 2014 5:32 pm

Not sure, but can't the same thing be done using Function ? What is the advantage of "Wait for signal" and "Signal" actions ?
B
49
S
15
G
6
Posts: 534
Reputation: 7,195

Post » Thu Aug 14, 2014 6:04 pm

We get signal?

Actually it's a little different from a function in that a function runs spontaneously, but the signal can be fired whenever you like.
I believe picked objects from the original wait condition should be picked as well.
Have not tested that however.
Image ImageImage
B
169
S
50
G
174
Posts: 8,331
Reputation: 110,806

Post » Thu Aug 14, 2014 11:06 pm

Just checking out wait for signal. Please look at the following and decide before running it :)

What output would you think it would produce?

Would the output be the same if I waited 1 second, 1 minute, etc. before clicking?

Edit: also think about output after 1st click, 2nd click, etc.

wait_for_signal.png
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Fri Aug 15, 2014 2:39 am

@codah

Each "wait for signal" just like "wait" action, it will register a pending task for remainder actions into engine.
So
+ every tick
- wait for signal (or wait action)

will create a lot of tasks into engine. So that remainder actions ( + Variable1 add to 1 ) will be run many times when signal (or time-out by wait action).
B
108
S
26
G
272
Posts: 4,473
Reputation: 152,281

Post » Fri Aug 15, 2014 3:19 am

@rexrainbow you are spot on. But if I replace 'wait for signal' with 'wait for x seconds' then I will only get the 'add 1' and log executed once.

Or if I do this

signal2.png


I will get only 1 execution of 'add 1' etc.

Maybe I'm having a brain fade.
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Fri Aug 15, 2014 3:34 am

@codah

Yes, it will log one time.

Another usage for "wait for signal" is waiting user input, like this capx

Image
B
108
S
26
G
272
Posts: 4,473
Reputation: 152,281

Post » Fri Aug 15, 2014 3:59 am

rexrainbow wrote:@codah

Yes, it will log one time.

Another usage for "wait for signal" is waiting user input, like this capx

Image


that's what I was trying to do with my first example.. user input being a mouse click
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests