brendanpoke's Forum Posts

  • Paused you mean, suspended? If yes, you have to compare time on suspended and set action on resumed.

    I don't know, to be honest I used the set time scale = 0 function to pause, and again 1 to resume, I didn't know how to do it. but if I put time scale = 1 again, all the other objects move too ...

  • I should make an object move even if the game is paused, to make objects move I use the expression "every 0.01 seconds move at", it would be a problem to change everything now. How can I do?

  • You can use Dictionary. For example, variable Var, create Dictionary keys "V1" and "V2", use:

    System - Set variable - choose(1,2)

    Text - Set text - "Value "&Var"&": "&Dictionary.Get("V"&Var)

    I don't understand, sorry, now that you told me, I can solve the problem by replacing all the variables with the global dictionary keys, but that's not what you say.

    Could you send me an example of a project? If not for the moment I do this, Thanks.

  • 1. You can create object by name in Construct3. Use "System create by name" action, for example Create "Block" & BlockNumberVariable

    Or, to create a random object you can put them all in a family and use "Create family"

    2. Check this example:

    https://www.dropbox.com/s/7lztai8wou3xyjw/PinnedCamera2.c3p?dl=0

    ok this is perfect but i have no idea how to do it ... i tried to transfer the 2 events in my program, i replaced "Player", i also changed the "viewport size" but it doesn't work for me ... also now i also have another problem that i simply can't open layouts because it gives me this message, but my driver is up to date ... would you also tell me how to fix this? In any case, the example is right is what I would like to achieve ...

    1) I already know the create object function, and I also used "Family", but I still have some problems that I can't solve: I managed to create a random object of the family group, (I created an object Object1 ((object1 is the variable name)) because: I wanted to make it so that the object could be any so I thought I'd put a list of possible random objects ... I put some images below because it's hard to explain ...

    Some I had to repeat, because for families I would like all objects to move to the right ... and then I don't know how to add the global variables I have to write add + 1 for each event ... and in any case the case shows 3 objects but all the same ...

    I know it's a mess, but I'm trying to learn ...

    In any case, thanks for your help ...

    *Events that repeat themselves

    media1.giphy.com/media/z51eqT1mpbIAdzk47d/giphy.gif

    If you want, I can insert a copy of the project, but it's a real mess ...

  • is it possible to get a global variable by name, as a string? That is, in an event: add 1 to "V1" or "V2" etc ...?

  • 1. Not sure what you mean. If you add many objects to a family, you can pick Family member by object name. For example:

    System Pick EnemiesFamily by evaluate EnemiesFamily.objectTypeName="ZombieSprite"

    2. Try moving the first four events on your screenshot to the bottom of the event sheet. Also, you need to use delta-time, and lerp for smoother scrolling.

    So, instead of "Rocket move 5px" use "Rocket move 300*dt pixels"

    Instead of "Set scroll X to scrollX+5" use "Set scroll X to lerp(scrollX, scrollX+5, 0.4)"

    You can try different values instead of 0.4

    1) I'm sorry, to tell the truth I completely forgot about the Family function. I mean I haven't used it yet (even though I've been using Construct for over a year). But I'll still tell you exactly what I wanted to do: The spaceship moves and collides with an object (similar to super mario cubes) so it creates the same object but a little bigger in the center of the screen which should show 1,2 or 3 other objects (which could be any objects, different from each other or the same, at this point one object stays in the center and two move one to the right and one to the left. That is, it should be an animation showing some random objects you got. So I should in a list of 20 possible objects make sure that whatever comes out, if it is the first object it stays in the center, if it is the second it moves slightly to the right, and if it is the third to the left. (to show the player the three objects in series).

    I'm trying to figure out how to write events in an easier way, I think I'll solve using "Family"

    2) I tried to do exactly as you said but (maybe I had to specify) I would like the screen to move at the same speed as the spacecraft, now it moves slower ...

    P.S. I've never used "lerp" and have no idea what that means ...

  • I have two questions:

    1) is it possible to pick an object by name only in one event? How do you create object based on name?

    2) is it possible to make the screen move at x or y according to the speed but also to the angle of the object? That is, the same as the "Scroll to" behavior but with the difference that the screen only moves when the object is at the edge of the screen. I tried to write an event but it didn't work well if the object moves diagonally it creates a flickering effect.

    I would have inserted a gif but I don't know how ...

  • Second question

    When you create objects,they are made in that order (provided if you use same layer)

    So if you create a pot first and then flower then flower will be over pot

    however I should make sure that the objects are always at the edge of the upper object, that is, if the planet is there, the UFO should be under the planet, but half at the edge and half visible. Also I might want to put a non-round object in place of the planet

  • I compared the layout name because if not create objects on all layouts, maybe there is an easier way, anyway thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, I have two questions to ask:

    1) How can I simply create a variable number of the same object (using random) in a certain space of the layout?

    I tried to create a variable and an event that at the start of the game gives the variable a random number like 1 - 5, and another event that says "Var greather or equal 0 -> create object" and "add to Var - 1 "Thinking he would repeat the action several times, but it didn't work at all.

    2) I would like to create a game like "find hidden objects", how can I always place objects half at the edges of other objects and half behind? (Considering that the objects that have to be on top could be some and of different shape) I could just do it in the layout, placing object by object, but it would take too long, I would like to insert planets or other things and insert small UFOs behind them, but all variable and so that the system does everything by itself

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

    Thanks for the help.

  • 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?

  • 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?

  • 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 ...