Problem I don't know how to solve in Construct (related to images)

0 favourites
  • 7 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Hi everyone, this is my first time writing to the Construct community.

    There are some problems I don't know how to solve for example:

    1) I should create a beam for example a laser beam behind a gun but make sure that it grows without changing the image, if I create the image under the weapon it will be seen, instead I would like it to be invisible and as it moves from a side becomes visible slowly. It would take a portal or an image that is invisible but can only hide the beam.

    2) another thing that would be useful for me would be to distort an image because for example I might need to make the string of a bow move but not create two images one with a straight string and a curve.

    I hope someone can help me out otherwise I'll have to look for a program on purpose ...

  • 1. Without seeing what you want, it is hard to give you advice based on your description. In general though, beam type animations are done with particles, tiled backgrounds, and blending modes.

    2. If you want to animate a bow at runtime through code, you can use the drawing canvas plugin to draw the line, and animate it by numbers. This is significantly harder than doing it the traditional way though, which is to simply draw multiple frames for your bowstring animation.

    There might be some sort of distort effect that you might be able to utilize, but again probably more effort than its worth compared to just drawing out the frames.

  • What I need to do is create a long laser beam (suppose the object is 200px long) behind a turret, but move it a little to the right until the edge of the laser beam matches the edge of the turret, the laser beam should be invisible. However, as soon as the object is created it immediately starts to move but only a part becomes visible and increases. In fact, the ideal would be to be able to make an image half transparent and half normal if you could, but I don't know how. However I had not used the "DrawingCanvas" tool yet, I have now seen that it allows you to make only part of the px of different color, I have yet to see how it works but the point is that I should make an image only partially transparent and the transparency spreads in 'image. Or if you could create an invisible object but that when other objects pass over it they too become invisible (only in the overlapping part).

    In any case I don't want to go from one frame to another, but rather make sure that the animation is continuous, for example the arc should be a simple straight line, which slowly curves and then comes back straight. Maybe with the DrawingCanvas tool I can solve the problem.

    Another question, is it possible in one action to select (why would I need it now with the DrawingCanvas tool) multiple numbers at once? That is, if I can select in an image of 200px x 50px the part from 100 onwards for the whole height, I can make it transparent and then continuously modify 101,102,103 etc ... and the image becomes all visible. How can I simply select all numbers from 50 to 100 in one action?

  • Honestly I still have no idea what you're talking about.

    Are you trying to create a mask for your laser? You can do it with blending modes. Check out the blending modes examples. editor.construct.net

    You probably don't need or want to use the canvas object at all.

  • Sorry, I don't understand English very well so I try mostly to go by intuition, but what I want to do is really very simple: A portal, but invisible. imagine a spaceship game in which there is only the background of space and the spaceship, the spaceship enters an invisible portal and disappears slowly. Maybe with this Source out effect but I didn't understand how the effects work, they can't be changed, they are ready right? And in this example it is a single image or are they two objects?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are two objects, on a dedicated layer set with the "Force own texture" property, so that the blending mode doesn't affect other layers.

    There are a few specific ways you can do it, depending on the blending mode you want. Here is one example, where the portal is the blended object, as the "Source", and everything on that layer under it is the "Destination. Using the "Destination Out" blending mode, basically everything that the opaque sections of the mask is on top of will be removed, while transparent areas are not affected.

    dropbox.com/s/1qzkmqk5d1qsuqh/blendingmaskexample.c3p (drag the logo towards the right to see how it looks)

  • OK perfect! So I can get the effect I needed! (I took the alpha off the mask though)

    Thanks for the help.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)