How do I fail by even one instance variable?

Just started using Construct 2? Post your questions here

Post » Sat Mar 28, 2015 1:49 am

Hello. I feel like this should be easy, but for some reason I can't seem to figure it out.

I need a way to fail an event if even just one instance of an object's variable matches a certain number.

Thanks.
B
8
S
4
Posts: 48
Reputation: 798

Post » Sat Mar 28, 2015 1:55 am

Have a global call failed?? Then do a for each instance test and if one matches change the global fail to a 1. So 0=false and 1=true and then you can use that variable to do whatever you need done next. If I am understanding correctly.
B
23
S
4
G
2
Posts: 364
Reputation: 2,382

Post » Sat Mar 28, 2015 2:11 am

ah that worked. thanks.
B
8
S
4
Posts: 48
Reputation: 798

Post » Sat Mar 28, 2015 9:54 am

Image
this is how I would do it
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 » Sat Mar 28, 2015 1:46 pm

ah that is what I was looking for mindFaQ. Thanks!
B
8
S
4
Posts: 48
Reputation: 798

Post » Sat Mar 28, 2015 3:05 pm

You don't even need the second condition. If none are picked, the action won't be called.
ImageImageImage
B
71
S
20
G
190
Posts: 3,533
Reputation: 108,340

Post » Sat Apr 04, 2015 8:11 pm

I don't think you even need to Pick, just do "Sprite: Fail = 1". That will automatically run if at least one sprite has its Fail set to 1.
Image
B
10
S
3
G
2
Posts: 196
Reputation: 2,053


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests