dop2000's Forum Posts

  • I imagine something like this:

    Red and blue are two different sprites. Yellow dot is the "perception" image point.

  • Web Storage is deprecated, it was replaced by Local Storage. You should still be able to open old projects which use WebStorage, but you can't add it to new projects.

  • Disable "Simplified user interface" in C3 settings. After that you will be able to see Local Storage in the list.

  • Yeah, yoyoEleanor's example is exactly what I meant. You add all sprites to a family, add an instance variable "zsorting" to this family and z-sort by this variable. You can set this variable to sprite.Y or use a different image point or some sophisticated formula. The only drawback of this method is that you can't sort a group of sprites and other objects (say, tiled backgrounds), as it's not possible to add them to one family.

  • See this demo I made for another post:

    dropbox.com/s/lbewjvv6rekd2na/IsometricForest.capx

    .

    Instead of sorting by Y on every tick it's better for performance to add an instance variable and use "System Sort Z Order".

  • daleinen Yes, with non-monospaced fonts you need to loop through each character and use SpriteFont.CharacterWidth(char) to calculate the correct width.

    Another option as R0J0 mentioned here is to use SpriteFont.TextWidth and TextHeight expressions. I believe for sprite font they are available immediately, you don't need to wait for the next tick. So you set text, read these expressions and adjust the box size accordingly.

  • You do not have permission to view this post

  • You can use the official Rotate behavior, but you will need to stop it when the sprite reaches the target angle.

    It's much easier to use this addon:

    c2rexplugins.weebly.com/rex_rotateto.html

    You can also rotate the sprite with events, for example "On every tick set angle to anglelerp(sprite.angle, targetAngle, dt)"

  • Oh, man, you mean when you don't kill the enemy and it disappears below the bottom of the screen - then you want to subtract 1 point? I'm sorry, I misunderstood your, that "Enemy.Y<0" condition confused me.

    Do this:

  • It does work, you just need to update the text on the screen (set text to "Punti="&Punti), you currently doing this only once on start of the layout.

    Also, you don't need event #7 anymore

  • How do you currently subtract 1 point? Do the same but in event #5 :)

  • Then disable "Set angle" in bullet properties and in event #74 change bullet angle of motion, not the angle of the sprite.

  • There is a new object "Drawing canvas" in new C3 runtime, it basically works the same way as Paster/Canvas addon in C2.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I would use a mask. Create a new layer, set Force own texture=yes in layer properties. Put black rectangular sprites around the drawing area, set Destination Out blend mode for them. Spawn the line on this layer and move it to the bottom of the layer (masking sprites should be above the line).

    The mask will only hide parts of the line which are outside the drawing area and will not affect other layers.

    There is a "Blend modes" template in Construct 2, you can check it out.

  • You can do the same with bullet. Use "Is between angles" condition, for example:

    Sprite.Bullet.Angle of motion is between -45 and 45 degrees: set animation frame 0

    Sprite.Bullet.Angle of motion is between 45 and 135 degrees: set animation frame 1

    etc.