Why not write this text?

Discussion and feedback on Construct 2

Post » Thu May 12, 2016 10:47 pm

Hi, does anyone know why the text "yes 2" is not written?

Image

https://dl.dropboxusercontent.com/u/60803633/test11.capx
B
29
S
12
G
20
Posts: 759
Reputation: 13,861

Post » Thu May 12, 2016 11:09 pm

Pasted from Construct 2 Manual:

Function conditions:
Compare parameter
Compare the value of one of the parameters to a function call. This condition should only be used in an On function event, since outside of function calls there are no parameters set.

I think the bold text is the answer
B
19
S
6
G
2
Posts: 256
Reputation: 2,640

Post » Thu May 12, 2016 11:28 pm

Use a timer instead of Wait.
ImageImageImage
B
71
S
21
G
222
Posts: 3,652
Reputation: 124,733

Post » Thu May 12, 2016 11:30 pm

Josek5494 wrote:Pasted from Construct 2 Manual:

Function conditions:
Compare parameter
Compare the value of one of the parameters to a function call. This condition should only be used in an On function event, since outside of function calls there are no parameters set.

I think the bold text is the answer


I understand, thanks for the help, it could also be solved with signal and wait for signal.

In this way it does not work, why ?.

Image
B
29
S
12
G
20
Posts: 759
Reputation: 13,861

Post » Fri May 13, 2016 2:36 am

Try to save parameters of a function call into an official array object. Or use my rex_fnParam2array to create and save them in one action.
B
108
S
26
G
260
Posts: 4,435
Reputation: 146,195

Post » Fri May 13, 2016 3:07 am

OP, because function parameters only lasted for the tick that the function is called.
It is removed on the next tick.
If you want to use it outside of that, save the parameters into dictionary keys/variables or as @rexrainbow said, save it into an array.
B
36
S
18
G
11
Posts: 248
Reputation: 8,694

Post » Fri May 13, 2016 3:35 am

This function call will exit while execute action:wait/wait for signal. i.e. engine will leave current condition: on function, so that parameters will be popped up, and the local variables will be cleaned, too.
B
108
S
26
G
260
Posts: 4,435
Reputation: 146,195

Post » Fri May 13, 2016 10:45 am

This works, but i don't know if is useful:

Image
B
19
S
6
G
2
Posts: 256
Reputation: 2,640


Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest