lukezero's Forum Posts

  • You do not have permission to view this post

  • http://www.blackhornettechnologies.com/Construct2Stuff/Samples/LockTimer_lukezero.zip

    See if this helps. I can explain details, but see if this what you want first.

    Thank you very much, dude!

    I'll test it right now! :D

  • If you can isolate out just the door mechanism, I can help sort it out. Timer is much more versatile than the system events.

    This door routine is programmed to count 18 seconds after the player leaves the room and prevents him from entering again only during that time.

    I did a test here using a global variable instead of the function, but the lockpad object continued to be created indefinitely during the 18 seconds of locking the door. :(

  • You can't/shouldn't use Every X seconds, or Wait in a function. Use the Timer behavior.

    Thanks for the tip! However, I can never make this behavior work well. :(

    Do you have another suggestion?

  • Hi everyone!

    Since I'm a designer and not a programmer, I'm often lost in programming logic (even in Construct!).

    With the help of some users here, I was able to implement a Timer through Canvas, but I'm having difficulty placing the image of a Padlock on it, so that it changes animation and increases in size after the canvas object is destroyed (a juice to create some Game Feel).

    The animation of the Canvas Timer is working well and ending on time, but the current schedule creates hundreds of lock objects.

    Does anyone know how I should proceed for the function to create a single Padlock object and make it change animation, increase in size and be destroyed after 1 second?

    Thank you all in advance!

  • I have also seen people make circular health bars / timers using masking, but that usually makes my head hurt, so here is a way using semi-circles and having the parts arranged so that it gives the effect you are looking for...

    one of the "elapsed" semi-circles is rotated, but since it starts at a lower z-order than the other side, it appears to grow from the top. When it gets half way, the "elapsed" pieces move up in z-order to continue the effect.

    You can set the global variable CountDuration to anything you want (in seconds), but I zeropad it to 2 digits so if you want more than 60 seconds you would have to fix that.

    https://www.rieperts.com/games/forum/CircularTimer.capx

    Thank you very much!

    It works well! :D

  • dropbox.com/s/s5tfzeha77c8m93/CanvasClock.capx

    You'll need Canvas plugin:

    https://www.construct.net/en/forum/extending-construct-2/addons-29/plugin-canvas-41782

    Thanks! :D

  • You can create a sprite like this with image point in the center and then spawn a new instance of this sprite every second at an increasing angle.

    Another option is to draw on a Canvas object.

    Thanks, dude. :D

    How can I do this with Canvas object?

    It's a better solution?

  • Hi everyone!

    I'm trying to make a visual timer like these below in C2:

    i1.wp.com/css-tricks.com/wp-content/uploads/2020/01/time-moving.gif

    thumbs.gfycat.com/AcidicCreepyKitty-size_restricted.gif

    Is it possible to do this without having to import each animation frame from the counter into C2?

    Note: Here I prioritize the ellipse over the numbers.

    Thanks!

  • You can set Angle of Motion in your bullet is angle(cannon.X, cannon.Y, crosshair.X, crosshair.Y)

    When you create the bullet.

    Which of the two commands should I use: Move at Angle or Move forward?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi everyone!

    I'm trying to make a cannon (that is fixed at the bottom of the screen) to shoot an object towards a surrounding sight, without using the MoveTo behavior, just by using Construct 2 commands.

    What better way to do this?

    Thank you!

  • Are you sure that "On Path Found" is triggered? Add some visual indication to this event too. Run in the debug mode, check variables, check if pathfinding is enabled etc. If nothing helps, please post your project file.

    Yeah, man. It's triggered.

    Unfortunately I cannot post the CAPX of my game here, as it's a personal project.

    Thanks for everything!

  • I am also using the Line of Sight behavior, but without success.

  • Is it failing to find path? Or it finds the path, but doesn't move?

    The Aim doesn't move, nor does the opacity change, to warn that it has not found its way.

  • Move event number 10 to top level, it doesn't need to be nested under "Every tick".

    It's not possible to guess what the problem is by the screenshot. Add another event "On failed to find path -> Mira set opacity to 20". You will see if the pathfinding can't find the path, in this case try changing cell size/padding, check solid objects etc.

    You may also need to recalculate the obstacles map.

    Also, change Hunt_SalaT2 variable when the path is found, or add another condition to event #8 - "Mira is NOT moving along the path", otherwise it will be trying to finding a new path every tick.

    Thanks, man.

    It still not work.

    The aim is in a free area (without obstacles) and can leave the screen. I've tried it in several ways and, despite being simple, it's not working. :(