Pls help me find what is wrong with this nested conditions

Get help using Construct 2

Post » Sun Aug 07, 2016 7:05 am

So, I have an object which has 4 instances. I've created Ids through instance variables for them to distinguish them.
I want the when all of the blocks show say 3 on them the text box says "done", but the nested conditions are not working. Please help, I am not sure what I'm doing wrong. Logically it feels right.

Image

Thank you.
B
26
S
1
Posts: 59
Reputation: 1,100

Post » Sun Aug 07, 2016 8:29 am

You can add this as a sub-event...
BTW, I don't see any textbox/text action in your eventsheet.

*For each (puzzleBlock)
*Pick by comparison : (Puzzlebox.AnimationFrame = 2)
*Compare two values(Puzzlebox.pickedcount = Puzzlebox.count)
----->Set Text to ("Done")
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
64
S
18
G
90
Posts: 1,119
Reputation: 59,567

Post » Sun Aug 07, 2016 9:10 am

Thanks for the reply chadorireborn. The text box thing was just an example.

I tried what you suggested but I think I've messed it. I've never been able to use loops properly in c2 ever.

I've created a dummy file with your codes and some alternative codes that make it do what I want but I really want to learn how to use these conditions to save on variables and code repetition.

https://www.dropbox.com/s/e1wp4r0pnifjt ... .capx?dl=0

If you guys have some time please take a look at it.

Thanks
B
26
S
1
Posts: 59
Reputation: 1,100

Post » Sun Aug 07, 2016 11:45 am

@whoisda - Sorry, I shouldn't have added a loop. It destroyed the purpose. The Pick condition is enough for that.

Removed the loop:
https://1drv.ms/u/s!AjcW2ueud6qpwyOHct0BXc7d73kZ
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
64
S
18
G
90
Posts: 1,119
Reputation: 59,567

Post » Sun Aug 07, 2016 4:37 pm

Thanks again @chadorireborn. I'll check the file after I update my copy of C2 tomorrow. Thanks for taking the time and helping me out.
B
26
S
1
Posts: 59
Reputation: 1,100


Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk, lukewasthefish and 15 guests