problem with comparing variables w. functions

Get help using Construct 2

Post » Tue Oct 15, 2013 6:17 pm

Hello guys, I've got a problem and hope you can help me come across this :).

I've created a simplified version of my problem, it looks like this:
i.imgur.com/WHopOEm.png
(can't offer any links, since I don't have the reputation yet)
capx: s000.tinyupload.com / index.php?file_id=59505791421803139893

Basically in this example I have 2 values ranging from 0-4 that are selected in a list (multiselect is off); they are sent to a function as parameters and there they are compared and according to how they compare, a variable is set (called return in this example) and returned.

Now I would assume that when Parameter 0 is 4 and Parameter 1 is 0, it would return 2, but it doesn't. Sometimes on reload it works once or twice for setting it to 0.5 or 1, but not reliably anyhow.

Help is appreciated :).mindfaQ2013-10-15 18:19:59
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Tue Oct 15, 2013 7:09 pm

That's strange. I almost want to say it's a bug, like the Greater than operation isn't working here.

I would submit a bug report unless someone else find a solution.
B
101
S
32
G
11
Posts: 1,552
Reputation: 21,667

Post » Tue Oct 15, 2013 7:51 pm

The first value you use in "Function: Compare parameter" should be just the index 0, not Function.Param(0).ramones2013-10-15 19:52:11
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Tue Oct 15, 2013 8:35 pm

Thanks ramones that helped a lot. I did not use that function before and in general dialogs the param is required. Cool.mindfaQ2013-10-15 20:36:15
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, cb130felix, Kermad, Lancifer and 8 guests