Pick instance with UID (choose) didn't work

0 favourites
  • 8 posts
From the Asset Store
Act on your instances, get/set their properties and variables only thanks to their UID. No more picking trouble! Plugin
  • I have 4 spritefont objects, i want to fill these objects with 3 random answers and 1 with the correct answer, i tried to use pick a random instance and didn't work, i tried now to use pick instance with UID and didn't work ( sometimes 1 or 2 spritefont objects are empty without text and without the boolean true) , i tried to set a random number in a variable (1 to 4) to each spritefont but didnt work too because the number repeat byself and i dont know how to avoid this, i want to use different positions to the answers each time i call the function. please help!


  • You need to iterate through all of them is my guess, try the system=>For Each, this will let you iterate forwards or backwards IIRC.

    In my poor English, this will make a "Loop", and loop through each of them so you can do your compare on a 1 by one basis rather than all in one shot.

  • You can use the RandomArray plugin to get four random indices. From there you can pick though various means, one being "Pick nth instance".

  • You can use the RandomArray plugin to get four random indices. From there you can pick though various means, one being "Pick nth instance".

    if i have a list of 1000 words is not more easy to make something like this?

    This is working to me, with random the probabilities of get the same word in the answer are 1 in 1000? , even if i use the RandomArray how i can put the correct answer in those sprite fonts?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • check this capx


  • check this capx


    Amazing!! Thank you so much for your help!!!!!!!!! i spend the whole day analyzing your capx and modifying it, please give me a little hand with this little issue, i am trying to use a loop to not show the questions that you responded with two good answers however i cant get the second answers to work because some answers repeat in the four spritefonts (this didn't happen in the first answers, your original function) and if the loop doesnt finds an unanswered question in the array how can I put a test that says "no questions left"?, the idea is to show the questions with one bad answer again at the end of the round and don't show again the questions with the 2 good answers responded.

    I tried to replicate the your original function but didn't worked, i don't know why


  • a small error in event 16

  • a small error in event 16

    lol, i recheck for 1 hour the events and didn't see that. thank you so much for your help!!

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