eli0s's Forum Posts

  • You are welcome!

  • R0J0hound , I understand. The same happens even within Photoshop when you bucket fill antialiased lines. Only vector software overcome this limitation. TVPaint animation (which also use raster graphics) has a nice feature, it lets you "overfill" by an amount of pixels the flooded area, thus eliminating the gap around the lines, but it does it in a way that doesn't erase the lines, it colorizes the unpainted areas. Anyway, thanks for the clarification

  • Here, look at this capx:

    [attachment=0:126364sw][/attachment:126364sw]

    Input a number (0-640) into the text field and hit ENTER. The object will move to those values (on it's horizontal axis). The trail is just for cosmetic purposes

  • Tell me what you wish to do when the key is pressed. Move an object from point A to point B? Also, please verify, is the key press a trigger that it fires just once, or you will have to hold the key pressed in order to complete the lerp action?

  • Can you be more specific? The lerp takes 3 values, one as a starting value, an other as an ending value and a third one that determines how much in-between of these two values you will get.

    For example: lerp(10, 20, 0) is 10, lerp(10, 20, 1) is 20 and lerp(10, 20, 0.5) is 15. That is of course when you trigger it once. If you triggering the lerp every tick (as when a key is pressed down), you will gradually get the second value and the speed by which it'll get there is determined by the third value. A lerp(10, 20. 0.01) will have a slow transition towards 20, while a lerp(10, 20. 0.9) will reach 20 almost instantly.

    Of course there are other ways to move stuff around. Have a look to the moveto behavior () and to the Litetween/EaseTween behaviors (https://www.scirra.com/forum/viewtopic.php?t=70700&start=0). These are very useful tools!

    And here, in this example you can test the lerp speed in action. Use the mouse wheel to increase/decrease the 3rd value which determines the speed of the lerp.

  • WOOOOOW! Indeed, this image is on Scirra's facebook page!!!

    I can't wait to see this in practice!!!!!!!!

    Thank you Scirra

  • leofenix , It's your picture. If you check closely you will find gray pixels on these areas. I crashed the blacks/whites and the result is much better. You can't get rid of a slim white outline around the black lines though, I don't know if that is a limitation on the Canvas plugin or there is some other way to do pixel perfect fills.

  • I am not sure what you mean by "to the shop" thing, but you can change the look of any Sprite object either by using different frames that you've prepared earlier (frame 0 = Black, frame 1 = Yellow, ...etc), or use a webGL effect like Tint, AdjustHSL or Set Color, and set the parameters with events and actions.

  • Glad I could help You are welcome!

  • Here you go. It's not that hard, just a little tedious to set it up.

    For ultimate control, use 2 types of white keys, with 1 indentation (for keys like Do, Mi, Fa and Si) and with 2 indentations (for keys like Re, Sol, La). That way there won't be any overlapping problems with black keys triggering the white keys bellow (you will need to adjust the collision polygons). In my example I just trimmed the collision polygon on the white keys to be just below the blacks.

  • What Aphrodite said.

    If you have a long list of scrolling stuff, Just make sure that your layout is high enough to fit them all. Otherwise you wont be able to scroll to the bottom (unless you use Unbounded Scrolling set to Yes, in the Layout Properties).

    The Sine behavior is just for illustration purposes, in practice you will hide the Camera Sprite.

  • I am also confused about the While condition. But in your case, do you really need it? What happens if you disable it and leave only the x<= 6 condition..?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You are welcome!

  • These events are called sub-events. There are many ways to create them. I use the "B" shortcut that creates an empty sub-event. The "S" opens the Add event dialog, so you can immediately choose a condition. Finally, if you right click on the furthest left side of a condition (just right before the icon of the object that the condition checks), a menu appear that has many important choices, the first of all being the "add" in which you will find the sub-event options.

    And yes, this is a very useful thing, not only it saves you space (because you can nest many sub-conditions that have a common condition on top and those conditions can nest sub-events by them self etc), but since they act hierarchically, you can create complex events that pass along actions from the parent conditions to the child conditions whenever the parent is true. This has the added bonus of being very efficient, since when a top condition isn't true, all sub-events are ignored and C2's code is being read faster per tick.

  • First make sure that the Instance variable you have created is of the Text type.

    To set the Instance variable of the Player object, create an action, double click on the Player Sprite Object, double click on the Set value (under the Instance variables category), pick the Direction variable (that you had created before) from the list (it should be the only one existing) and on the Value field type the direction you want to set e.g. "Right" with the quotes.

    Do that for every direction, just like in my example.

    The same applies when you check the content of a variable (compare variable) in a condition. You type the corresponding direction with quotes (e.g. "Down") and Construct only triggers the down animation when the condition is true.