Random Image Generation

0 favourites
  • 3 posts
From the Asset Store
Elevate your games with our AI Chatbot Integration! Seamlessly connect your Construct 3 projects with GPT-4 for dynamic,
  • Hello all:

    I have a group of images. Each of these images has a text instance variable.

    On load, I want to load a random image. Depending on the image selected at random, I want to load a series of images that are "tagged" with some attributes related to the one that was picked.

    So, say on load, I pull an image with an instance variable "green".

    I want to load all images that have that instance variable included also. So out of a larger pool of images, I want to pull out the 3 images that have "green" as an instance variable also.

    1) How would I randomize the image generation on load?

    2) How would I then take that instance variable value and draw only those images that have that variable applied?

    Thanks.

  • Assign an instance variable for each colour

    Use rand(min,max) on start of layout to select a random number

    Use create object to create all objects with rand as instance variable

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks. Will give this a look and post my CAPX.

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