Now I see the problem, it's a bug, spawn doesn't pick the new object.
The workaround would be to use the System->Create action instead of Sprite->Spawn. For the position use Sprite.ImagePointX(2) and Sprite.ImagePointY(2).
Not currently. The solution that others have used is export the project twice with webgl enabled and disabled.
You can do lines just as easy as points:
http://dl.dropbox.com/u/5426011/examples16/line_trace.capx
When an object is created it becomes the only instance of that type that is picked. Once it is no longer picked it cannot be picked until the next top level event.
Some more info:
http://www.scirra.com/forum/picking-problem_topic41776_post257714.html#257714
http://www.scirra.com/forum/r102-breaking-change-questions_topic56576_post352637.html#352637
The way I'd do it is create the 5 sprites in one event then position them in the next.
http://dl.dropbox.com/u/5426011/examples16/create5.capx
Construct 2 does not have per pixel collision detection as would be needed for this. If you build the image with smaller pieces like rotated/re-sized rectangles then that's one option.
That being said if you really need per pixel collision detection you can get something working with the canvas plugin with the rgbaAt() expression.
Here is a simple example:
http://dl.dropbox.com/u/5426011/examples16/perpixel.capx
Develop games in your browser. Powerful, performant & highly capable.
Jerbens
The math is escaping me at the moment but to map a sprite to this would require a perspective transform. Google has a lot on the subject, but it may take some tinkering to get the transform to match.
PixelPalette
You could modify the fx so that you get the image to repeat in only a line by putting // in front of one of these lines:
xx=clamp(xx, 0.0, 1.0/scale_x); yy=clamp(yy, 0.0, 1.0/scale_y);
nothaseo
That would cause pieces to disappear. The proper solution would be to split only the relevant pieces instead of all of them.
Here's an effect for that.
fx: http://dl.dropbox.com/u/5426011/plugins/conditionalOpacity.zip
capx: http://dl.dropbox.com/u/5426011/plugins/conditionalOpacity.capx
Set each value in the array to the value to the right.
Array: For each X element:
---- Array: set value at self.CurX to self.At(self.CurX+1)
Every cut doubles the amount of objects so after 10 cuts there are 1024 objects. So it's going to have lower fps the higher the object count gets.
If "HP" started at 5 then yes it is the same.
C2 already can do this. Give the enemies an instance variable and call it "hits". Then use two events like this:
Bullet collides with enemy:
----- add 1 to Enemy "hits"
----- destroy bullet
Enemy "hits" >=5
----- destroy enemy
Member since 15 Jun, 2009