How do I do random and exclude ?

Get help using Construct 2

Post » Fri Apr 24, 2015 10:38 pm

Hi,
Well I have seen this answer by codah, which describes very simple and elegant way of choosing random number from the range, but excludes already chosen. The method employs 2 arrays.
scirra.com/forum/transfer-array-vars-then-have-that-var-deleted_t119328

But I want to ask about another method of doing this, using built in "Pick random instance". It applys corresponding IID to to every created sprite and stores this value in inst. variable. Then it picks random sprite and deletes it, and so on. Is it OK and safe?
Another thing - where an instance with "0" IID/Variable comes from ? Without being deleted in event 5, it will show instance with var equal to zero ?

Image

dropbox.com/s/yua4nsd86z2vl9d/random%20and%20exclude.capx?dl=0
thanks
B
10
S
3
Posts: 25
Reputation: 709

Return to How do I....?

Who is online

Users browsing this forum: Lancifer, MPPlantOfficial, Sup with that?, Yahoo [Bot] and 60 guests