There is no object limit, what you are expiriencing is a bug (did you copy objects from another cap?)
I made a utility to fix caps that do that, I will find a link to it tommarow and post it.
I was trying to make the text look like events. Sprite1 and Sprite2 are just the names of two different object types, and all I'm proposing is to add the objects to a family, add a family variable, and then for each object type set the family variable to the same value as the instance variable. At that time you can do the for each ordered solution with the family.
The simplest way would be to put the objects in a family and add a family instance variable z2. Then you could do this:
every tick:
sprite1: set z2 to self.z
sprite2: set z2 to self.z
for each family1 ordered by z2:
It's working here, I added more instances and they still worked as intended. If you create them at runtime you need to set the distort map size before displacement will work.
Develop games in your browser. Powerful, performant & highly capable.
crowtongue here is the newer version:
http://www.scirra.com/forum/construct-classic-r2-released_topic48884.html
I'd try adding a "for each" condition to the end of event 220. If that doesn't work it's likely the else's that are causing all of them to be picked. In this case you can easily fix it by removing the elses and putting the inverted conditions of events 221 and 222 into event 223.
How's this?
http://dl.dropbox.com/u/5426011/examples14/path.capx
Of course you could simplify it by replacing event 2 with some events that just add/subtract from sprite.dist to move left/right on the path.
For 360 degrees just use
angle(target.X,target.Y,mouse.X,mouse.Y)
For 90 degrees use this (modify the bold for any other range):
clamp((360+90+angle(target.X,target.Y,mouse.X,mouse.Y))%360-180,-45,45)+90
It looks like you have it most of the way there. A few points:
* You can probably remove the "pick all" condition as they are all picked by default.
* I'm guessing GlobalStoneAmmout is the same as the Array width so your second event should look like this: "StoneSelection >= GlobalStoneAmmout" since arrays always go from 0 to array.width-1.
*Then just do set StoneSelection to array.width-1 when it's less than 0.
Here is how I solved it before in CC:
http://dl.dropbox.com/u/5426011/examples14/turret2.capx
(velocity^2)/(2*acceleration) is the stopping distance.
Do a loop over the tokens in the string and do a compare for each object type to pick which to create.
Something like this:
global string objs = "obj1:0,obj7:50,obj3:100,obj3:140" global string current_obj = "" repeat tokencount(objs, ",") times + set current_obj to tokenat(objs, loopindex, ",") system compare tokenat(current_obj, 0, ":") = "obj1") +create obj1 at (int(tokenat(current_obj, 1, ":")), 0) system compare tokenat(current_obj, 0, ":") = "obj7") +create obj7 at (int(tokenat(current_obj, 1, ":")), 0) system compare tokenat(current_obj, 0, ":") = "obj3") +create obj3 at (int(tokenat(current_obj, 1, ":")), 0)
If the start and end velocity is zero then it can be done by accelerating the first half of motion and decelerating the second half by the same amount.
Here is a capx:
http://dl.dropbox.com/u/5426011/examples14/accel_deccel.capx
Member since 15 Jun, 2009