Help with 'Pick by Evaluating'

Just started using Construct 2? Post your questions here

Post » Tue Mar 24, 2015 9:22 pm

I have an event that fires every 1 second.
Within that event I need to randomly pick an object that has a instance variable set to 0;

My current setup is a "Pick by evaluating" with the following expression.
(( = choose(1,2,3,4,5,6,7,8,9) & sprite.isFull=0))

This however only partially works as the fewer the .ids that have a .isFull = 0, the iteration starts skipping as it didn't find a match. I need it to randomly find a remaining object with a .isFull = 0 on every iteration. At any point in time the the combination of objects that have .isFull = 0 is dynamic.

Can someone suggest a way to accomplish this.

Thanks for any assistance!
Posts: 7
Reputation: 214

Post » Tue Mar 24, 2015 9:46 pm

Try these two conditions:

Sprite: isFull = 0
System: Pick random instance
Posts: 1,520
Reputation: 25,670

Return to Beginner's Questions

Who is online

Users browsing this forum: YoHoho and 2 guests