CGSpot's Forum Posts

  • Thank you.

  • I am trying to make a top-down ship shooting game. I have made the 8-direction movement and it’s working okay, but I am facing a problem with shooting.

    I need the player’s ship to find the nearest enemy ship and shoot at it.

    For example: if the player’s ship is facing up, the right cannon would be facing 0 degrees and the left cannon would be facing 180 degrees. I have two separate image points for the right and left cannons. If the player finds an enemy ship to the right and presses the mouse click, the player’s ship should automatically fire from the right cannon. Also, if the enemy ship is found on the left side and the player presses the mouse click, the ship should automatically fire from the left cannon.

    How can I achieve this?

    8-direction events:

    Ship:

    Game video:

    webmshare.com/play/0aPdj

  • You could use the family in all events instead of spCard sprite. But I suggest combining your objects into a single sprite with multiple animations.

    Sure, i will try this.

    Thank you very much!

  • That’s an easy fix. Move the is in viewport check above the pick random instance condition. That way it won’t pick an instance you already used.

    Thank you very much

  • What about the example I sent you yesterday on Discord? I just want to understand why you're asking the same question again.

    Your example was very good, and I really appreciate it.

    I’m not using an animation with a multiple-frame setup, each of my objects is an individual sprite. Later, I’ll have multiple gameplay functions to perform with those objects. I’ve also already completed the mid-gameplay part, where I used separate sprites.

    Project file: dl.dropboxusercontent.com/scl/fi/zpsita2trup0alrplj0tp/Kitchen_Puzzle.c3p

    (Also, I found a small bug in your project, when I drag a card and drop it somewhere other than the slot, it goes back to its position, but I can’t drag the same card again; it gets stuck. Or maybe it’s intended. video: webmshare.com/play/VbbnM)

  • I want to create 6 random objects in the bottom panel out of 18 objects.

    The event I used is:

    The problem is that I’m not getting 6 objects all the time; sometimes it’s only 5 or 4.

    Error video: webmshare.com/play/Xeezx

    Please let me know how to fix this.

  • > Expected movement is exactly like this: webmshare.com/play/RLLeA

    > if I place the 3rd object, the 4th and 5th will move one step to the left, and a new object will be added on the right side of the panel.

    Yes you described it well so I think what I suggested should work there :)

    Thank you very much

  • I got similar mechanism. Have a look:

    https://www.dropbox.com/scl/fi/ksf4g9kseczekqqs3xbdl/jigsaw_puzzle_pic.capx?rlkey=3z8l9amfgymmu5s2k6bnjvs7r&st=dvtkbs7b&dl=0

    Thanks you very much

  • Expected movement is exactly like this: webmshare.com/play/RLLeA

    if I place the 3rd object, the 4th and 5th will move one step to the left, and a new object will be added on the right side of the panel.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have 18 objects. Six of them will be in the gameplay area on a panel, and the rest will be outside the viewport. Every time the player starts the game, the six objects inside the gameplay should be random from those 18 objects.

    Also, while playing, if an object inside the viewport is destroyed, a new object from outside the viewport should automatically fill the space.

    (For example: if I destroy the 3rd object, the 4th, 5th and 6th will move one step to the left, and a new 6th object will be added on the right side of the panel.)

    Please help me achive this.

  • You do not have permission to view this post

  • I figured it out, Thank you

  • In my game, when I start a new game, it loads and works correctly, but after a save, it does not load and gets stuck on the loader screen. Please help me fix this issue.

    Events are below

    Save:

    Load Check:

    Load Get:

    Load Set:

    Go to next Layout:

  • I have Enemy spawn events like below:

    And Game pause events like below:

    The problem is, when I pause the game while spawning, the enemies get stacked in the same place and then come to the hero as a single image.

    Please help me fix this.

  • 1. All of the animations should be the same width and height (idle, run, walk, hit, attack).

    2. If something needs to be continuous, make sure you click "loop" in the animation. For example, the "run" animation should be looped. i.vgy.me/12dQja.png

    3. Origin image points should be in the same position for all the animation sprites in a character. Example: webmshare.com/play/VbrLa

    4. Collision should also be simple and kept as similar as possible across all sprites in an animation, especially the bottom collision points. Example: webmshare.com/play/qOdv0

    I have fixed these issues for "base," "run," and "jump." Please follow the same for all the animations.

    When making animations, think like a person standing on the floor and doing all the actions.

    For example, imagine yourself doing all these animations.

    You would stand on the ground and start running. Then, if you want to jump, you would stand on the ground and jump. The same goes for climbing, attacking, and everything else.

    So a common element in all of these is that you're standing on the ground in the initial position.

    Your animations should follow the same principle—everything should start from the default position.

    For that, you should have all the sprites in the animations with the same resolution, the same origin image point, and the same collision.

    Once you update these, your character’s movement will look smooth.

    Always think about logic. If something is not working, check all the related events and keep connecting them in your mind.

    For example:

    Here, you created an event for: i.vgy.me/iyKQUa.png

    Player Platform is falling AND

    Player Platform is jumping

    → Set the player animation to jump

    Think, when will jumping and falling happen at the same time? NEVER, right?

    So the events should be OR instead of AND:

    Player Platform is falling OR

    Player Platform is jumping

    → Set the player animation to jump

    Keep checking the logic, one day it will come automatically.

    Also, one final piece of advice: you have a very messy work style. Keep the names everywhere clear and self-explanatory — it will help you a lot.

    Here is the fixed file:

    dl.dropboxusercontent.com/scl/fi/0ygt50tql4dqw99f9dl8p/Bloomattempt.zip