Random Object Issue

Not favoritedFavorited Favorited 0 favourites
  • 7 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I want to create 6 random objects in the bottom panel out of 18 objects.

    The event I used is:

    The problem is that I’m not getting 6 objects all the time; sometimes it’s only 5 or 4.

    Error video: webmshare.com/play/Xeezx

    Please let me know how to fix this.

  • That’s an easy fix. Move the is in viewport check above the pick random instance condition. That way it won’t pick an instance you already used.

  • What about the example I sent you yesterday on Discord? I just want to understand why you're asking the same question again.

  • What about the example I sent you yesterday on Discord? I just want to understand why you're asking the same question again.

    Your example was very good, and I really appreciate it.

    I’m not using an animation with a multiple-frame setup, each of my objects is an individual sprite. Later, I’ll have multiple gameplay functions to perform with those objects. I’ve also already completed the mid-gameplay part, where I used separate sprites.

    Project file: dl.dropboxusercontent.com/scl/fi/zpsita2trup0alrplj0tp/Kitchen_Puzzle.c3p

    (Also, I found a small bug in your project, when I drag a card and drop it somewhere other than the slot, it goes back to its position, but I can’t drag the same card again; it gets stuck. Or maybe it’s intended. video: webmshare.com/play/VbbnM)

  • That’s an easy fix. Move the is in viewport check above the pick random instance condition. That way it won’t pick an instance you already used.

    Thank you very much

  • I’m not using an animation with a multiple-frame setup, each of my objects is an individual sprite.

    You could use the family in all events instead of spCard sprite. But I suggest combining your objects into a single sprite with multiple animations.

    found a small bug in your project, when I drag a card and drop it somewhere other than the slot, it goes back to its position, but I can’t drag the same card again; it gets stuck.

    Strange, it works fine for me.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use the family in all events instead of spCard sprite. But I suggest combining your objects into a single sprite with multiple animations.

    Sure, i will try this.

    Thank you very much!

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