Activated random groups without repetition

0 favourites
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Hi everybody,

    I have 20 groups and each has to be activated randomly. These groups can only be randomized and executed again after all are performed. How can I do to avoid repetition?

    One more question: I want to disable each group after the actions are performed. I wonder if I can use an expression to disable the current group (Eg instead of having to write the name of each in the action "set group X Deactivated"

    Thanks for any help.

  • Let's go to another attempt. I would just like to know how can I do to randomize values ??without any repetition, until all have been drawn. Could someone only suggest the way?

    Regarding the other question, I would just leave the programming more independent and just only replicate it, instead of editing one by one.

    I really hope someone can give me some help.

    Thank you

  • There's a couple of RandomArray plugins you can use. See this thread: random numbers

  • Thanks, The Pattern Gen is a very nice plugin. I believe that this result can be stored in memory, correct? How can I do to have access to these memory addresses? It would, for example, i1, i2, i3, until it reaches the total quantity of numbers that were generated?

    And with respect to the use of an expression to determine the current group is activated/deactivated? Is there any?

    Thanks again.

  • Raganork: I've read in other posts that you always indicates the Pattern Gen plugin and offers to help. Could you help me? I need to know how can I access the values that are generated with Pattern Gen. Thanks anyway.

  • I haven't used PatternGen but this looks like what you want.

    <img src="" border="0" />

    There doesn't appear to be an expression for detecting a group's state. You'd have to keep track of that yourself.

  • Hi

    I had seen the CAPX with the plugin sample. The problem is I don't know how to access the addresses to compare the value and activate the respective group.

  • You can't address them, you get them one at a time as needed with PatterGen.Pattern.

    Try the above example and you'll see it randomly returns i1..20.

  • blackhornet

    I thought the plugin combining an address (such as "i5" for example) to the value that was generated by the plugin, according to the order. I intended to link these addresses to the groups to which they were activated in the order they were generated by Pattern Gen. If this is not possible, then I do not know how to do this. Could you give me some suggestion?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sample:


  • Thank you for the sample, 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?

  • 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.

  • Ok. Thank you,

    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 "" to deactivated the current group?

  • 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.

  • blackhornet

    Thank you for your patience, for your time, for your kindness. If I can give it back one day, I will.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)