Newbie to Construct2 as well as game programming. Making a small game for my blog so people are entertained in between posts. Found Construct2 yesterday and I have got the basic scaffolding for my game up. I've run into a small problem though: I've got some cockroach instances but only want randomly selected instances of the cockroach sprite to move around at one time. Any idea how I can do this?
Develop games in your browser. Powerful, performant & highly capable.
The fundamental way the event system works is that you use conditions to pick certain instances, then the actions only run on those instances. So to apply an action to a specific instance, you make a condition that chooses the instance to pick.
In this case, it sounds like you want 'pick nth' (under system). There was a 'pick random instance' condition in 0.x, but it hasn't made it to C2 yet - so try pick nth and enter random(Sprite.count) as the instance to pick.
Thanks. I saw the condition but it picks only one instance. Is there a way I can pick up multiple instances? I saw a For loop which I would try to use with the pick nth condition but not sure how I can tie the two together.
You could tack on a 'Repeat N times' above it?
Thanks, I'll try that out : )