linkman2004's Recent Forum Activity

  • Use the ImagePointX and ImagePointY expressions of your sprites, passing in either your image point index or name in parentheses after the expression. For example

    Sprite.ImagePointX(0) returns the X coordinate of the image point at index 0(which is the origin) of Sprite.

    Sprite.ImagePointX("bob") returns the X coordinate of the image point named "bob" of Sprite.

  • Before getting into fixing this, I'm going to stress something: wait is already frame rate independent, although weird things may happen if you wait really small amounts of time, such as 1/60 of a second(i.e., less than the length of one frame).

    That being said, the method you've chosen isn't the best way to go about this, and seems overly complicated for what it is. I've modified your example to demonstrate the behavior I believe you're wanting.

    [attachment=0:1jncab00][/attachment:1jncab00]

    I've replaced all of the complicated timing with some basic math. If you're not familiar with trigonometry -- cos and sin are used here -- I'd highly recommend doing a bit of research, as even the most basic trig is an indispensable tool for game creation.

    Let me know if you want a more detailed explanation of what's going on.

  • Jagged edges are from your lines pivoting at the wrong point -- they should pivot from the end of the previous line segment, not in the middle. To solve that, move the line's origin to the left side of the image(just press 4 on the number pad). I also found that adding only 4 to the width of the new line -- instead of 15 -- greatly improved line smoothness. You'll still get gaps when moving the mouse really, really fast, but that's because your line graphic doesn't extend to the left and right edges of the canvas.

  • Including an event sheet in the active layout will not make it accessible in subsequently accessed layouts. You'll have to include the event sheet for each layout individually.

  • Run a For Each (ordered) loop sorted by the expression enemy.y, order ascending, then add an action to send the current enemy to the front. That will order all of your enemies properly relative to each other, then it's just a matter of properly ordering your other objects among them.

  • This has been brought up a few times in relation to the "most efficient" size question. In the case of separate images right next to each other on the same sheet being drawn, it may be the case that the edges of one image bleed over onto the edges of an image being drawn. For this reason, a 1 pixel buffer is added to prevent these edge artifacts, and the most efficient size is thus 2 less in each dimension than the nearest power of two size.

  • ramones is right, the "WATERMELON CITY" sign is solid by inheritance. From the looks of things, you have that object in a family called "FamSolid" -- if any object in that family has the solid behavior, then all other objects in that family inherit it.

  • You can't specify which object in a family to create -- the only option currently is to explicitly create the exact object you want.

  • Burvey - Hate to say it, but that's not even remotely the same effect as actual motion blur.

    imothep85 - I'd take a gander at this thread where someone simulated the effect. The best way would be to use a shader specifically for this effect, although I'm unaware of anyone creating one aimed at C2.

  • Give your object two local variables to store the object's previous position, say 'oldX' and 'oldY'. Now, every tick, set the objects angle to angle(Sprite.oldX, Sprite.oldY, Sprite.X, sprite.Y), then set 'oldX' and 'oldY' to the object's current X and Y positions. At the beginning of every frame, 'oldX' and 'oldY' will hold the object's previous position, so you use that to find the angle of motion.

    Let me know if you have any questions.

  • First, I've made an example and then I'll explain it.

    [attachment=0:1ubwgee6][/attachment:1ubwgee6]

    For this trick you need two layers, the "inside" layer and the "outside" layer, where your inside and outside objects go respectively. Your magnifying glass sprite will also go on the "outside" layer. On the "outside" layer you'll have a mask object -- placed above the outside box image, but below the magnifying glass image -- that has its blend mode set to "Destination out", which in a basic sense blends out everything below it on its own layer. For the blend mode to work correctly, the "outside" layer needs "Force own texture" set to true in the layer properties.

    Let me know if you you have any questions.

    EDIT: Looks like I spent too long writing this post, but here it is anyway.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd suggest using the "Is between values" condition from the system object in your click event. Set "Value" to your enemies current animation frame -- accessed(generically) by Sprite.AnimationFrame -- "Lower bound" to 9, and "Upper bound" to 13. You can also check which animation is playing in the same event if necessary.

linkman2004's avatar

linkman2004

Member since 15 Jan, 2008

Twitter
linkman2004 has 1 followers

Trophy Case

  • 16-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

18/44
How to earn trophies