How do I spawn x objects at start of layout?

0 favourites
  • 7 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • I want to generate x objects at layout start spread around the layout randomly. I know how to do the random bit, and I'm also able to create objects every x second, but I want this to happen before the game start, to get a sense of variation.

  • oceldot why not place the object on the layout manually?

  • oceldot why not place the object on the layout manually?

    Well, it's physically possible of course, but I want to have quite a lot them, and it would be nice if they didn't show up at the same place every time.

  • oceldot maybe you can use random set position action on event sheet

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • on start of layout

    repeat x times ----> system|create *x_object* on layer *Y* at ( random(LayoutWidth), random(LayoutHeight) )

    -EDIT-

    Oh sorry, this isn't what you want. You want to create and distribute the objects randomly from within the editor, not at run time. There isn't a way that I know of...

    Closest thing for variation purposes is to do what Hardty said.

    on start of layout ----> x_object | set position to ( random(LayoutWidth), random(LayoutHeight) )

  • on start of layout

    repeat x times ----> system|create *x_object* on layer *Y* at ( random(LayoutWidth), random(LayoutHeight) )

    -EDIT-

    Oh sorry, this isn't what you want. You want to create and distribute the objects randomly from within the editor, not at run time. There isn't a way that I know of...

    Closest thing for variation purposes is to do what Hardty said.

    on start of layout ----> x_object | set position to ( random(LayoutWidth), random(LayoutHeight) )

    Actually, I think your first suggestion looks interesting. I haven't seen the Repeat event before. Thanks!

  • Well, you can repeat an action to your heart's content, but that will happen after you run the layout, you wont be able to see the result in the editor... But you're welcome!

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