How do I randomly pick an object out of a family. ?

  • So what i'm trying to do is I have a bnuch of apples. and each time you answer the question worng and an apple falls. I'm trying to pick an apple randomly out of the family in which there are many more apples. eg: Apple1 Apple2. I tried doing Instances but it didn't work so hoping this can work. Also Is there a way I can do

    + System: Pick a random Apple instance
    ----+ System: Trigger once
    -----> Apple: Move to top of layer
    -----> Apple: Set Bullet angle of motion to 90 degrees
    -----> Apple: Set Bullet Enabled
    
    + Apple: Y > 600
    -> Apple: Destroy
    Or
    + System: Pick a random Apple2 instance
    ----+ System: Trigger once
    -----> Apple: Move to top of layer
    -----> Apple: Set Bullet angle of motion to 90 degrees
    -----> Apple: Set Bullet Enabled
    
    + Apple2: Y > 600
    -> Apple2: Destroy
    

    So it'll choose either Appple or Apple2? Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to pick them outside of the family. You can now create an object by name so I guess you could try creating object choose(apple1,apple2).

  • You need to pick them outside of the family. You can now create an object by name so I guess you could try creating object choose(apple1,apple2).

    Ok. Thanks

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