Activated random groups without repetition

Get help using Construct 2

Post » Mon Jan 06, 2014 5:59 pm

Thank you for the sample, @blackhornet. I understand now how can I associate the generated value to the group. There remained only one question regarding the last action that you included in the project, activating "pattern.gen" group. I need to include the first commands (on start of layout) also within a group to control them?
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Mon Jan 06, 2014 6:21 pm

Assuming you have 20 groups, then you can use my previous screen shot to automatically set up the pattern, on startup, then you call PatternGen.Pattern whenever you need to turn the next group on. If you need to turn the others off first, just use a similar For loop to turn ALL off, then just the one you want on.
ImageImageImage
B
71
S
21
G
221
Posts: 3,651
Reputation: 124,231

Post » Mon Jan 06, 2014 6:35 pm

Ok. Thank you, @blackhornet.

So, I just need to use the action "set group PatternGen.Pattern
activated" (in my case, in the last but one action) , right?

I intend to turn off the group with an action (last one) inside it. This is regarding with my other question: could I use an expression like "this.group" to deactivated the current group?
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Mon Jan 06, 2014 6:42 pm

I can't possibly know where you need to put PatternGen.Pattern in your code. You need it at the point where it is appropriate. Groups are only activated by name, that's it.
ImageImageImage
B
71
S
21
G
221
Posts: 3,651
Reputation: 124,231

Post » Mon Jan 06, 2014 6:45 pm

@blackhornet

Thank you for your patience, for your time, for your kindness. If I can give it back one day, I will.
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Mon Jan 06, 2014 7:02 pm

You're welcome. For any more specific help you'd have to post your CAPX.
ImageImageImage
B
71
S
21
G
221
Posts: 3,651
Reputation: 124,231

Post » Tue Jan 07, 2014 6:16 pm

Correction: there is a test for groups!

System: Is group active
ImageImageImage
B
71
S
21
G
221
Posts: 3,651
Reputation: 124,231

Post » Tue Jan 07, 2014 8:01 pm

[QUOTE=blackhornet] Correction: there is a test for groups!

System: Is group active[/QUOTE]

@blackhornet: So I can use this event to deactivate the group without name it, right?
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Tue Jan 07, 2014 8:20 pm

No, you still need a name, but you can test it's state first, if needed.
ImageImageImage
B
71
S
21
G
221
Posts: 3,651
Reputation: 124,231

Post » Fri Jan 10, 2014 2:29 pm

@blackhornet: I went back to thank you again. Everything worked like I wanted and needed.
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: jasontoups and 1 guest