CGSpot's Recent Forum Activity

  • I have the Line of Sight behavior on the enemy and the Physics behavior for its bomb.

    When I have only one enemy on the screen, everything works very well, but with multiple enemies, spawning the bomb is not working properly.

    I have set it so that every 1 second a bomb should be spawned.

    With one enemy, it works well, but with multiple enemies and mirrored enemies, only one enemy is spawning the bomb and the others are standing still.

    Please help me fix this:

    Events:

    Error video: webmshare.com/play/gOLP0

  • Your state mechanics are contradicting each other.

    When you press:

    * Left arrow → simulate left

    * Right arrow → simulate right

    * Space → jump

    You don’t need to create events for combined actions like pressing an arrow key and space together.

    Construct will handle that automatically.

    You also have a condition like:

    If player state = "default" → some events run under it.

    But you also need to consider what should happen when player state ≠ "default".

    What should the character do if their state is something else?

    Then you have this logic under "Player is on the floor":

    * If right or left arrow is pressed → set animation to "run"

    * Else → set animation to "base"

    This entire block contradicts the earlier "player state ≠ default" logic.

    A player could be in a default state and be on the floor at the same time.

    Also, the Else → set animation to "base" will trigger even when the player is jumping or falling, because it doesn't exclude those.

    So it conflicts with the jump animation when space is pressed.

    I don’t know why you need the "state = default" condition.

    If it’s only for handling platform movement, it's not necessary at this stage.

    If you’re focusing only on basic platform movement for now, here’s how to structure it more clearly:

    Movement Controls:

    * On Left Arrow pressed → simulate left

    * On Right Arrow pressed → simulate right

    * On Space pressed → simulate jump

    Animation Logic:

    * If Platform is moving, not jumping, and not falling → set animation to "run"

    * If Platform is not moving, on floor → set animation to "base"

    * If Platform is jumping or falling → set animation to "jump"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much!

    I will try this

  • The enemy spits a fireball. The fireball loads in the enemy's mouth, then gets released using "Impulse at angle" (like a dragon charging and breathing fire).

    I’ve used hierarchy to keep the fireball positioned with the enemy—even when the enemy moves, since the enemy can shoot while moving.

    The problem:

    - The fireball works fine when the enemy is in normal (non-mirrored) position.

    - But when the enemy is mirrored, the fireball goes in the wrong direction.

    Shoot Event:

    Error Video: webmshare.com/play/rOgwn

    I tried using an “Is mirrored” condition, but it doesn’t work well with multiple enemies—the Physics impulse action becomes inconsistent.

    Is Mirrored Event:

    Is Mirrored Error Video: webmshare.com/play/PJayR

    Please help me fix this.

  • I’m using coins and debris to blast out of enemies when they’re destroyed, using the Physics behavior to do this.

    Is there a better or alternative way to achieve this?

    I want the blast to feel forceful and the objects to fall naturally.

    I’ve tried many settings, but it’s still not satisfying.

    Result video: webmshare.com/play/mOYWD

    Events:

  • > I have 3 instance variables in the sprite "Enemy Hit Area" to store the UIDs of:

    With hierarchies you don't need to store their UIDs! Use "pick parent" and "pick children" conditions to pick other objects in the hierarchy. For example:

    > Hero on collision with EnemyHitArea
    EnemyHitArea pick parent Enemy
    Enemy pick child Bomb
    : Bomb remove from parent
    : Bomb play animation "Explosion"
    

    Thank you very much

  • I have 4 sprites connected in a hierarchy:

    Enemy, Enemy Hand with Bomb, Enemy Bomb, and Enemy Hit Area.

    When the hero overlaps the Enemy Hit Area:

    - The enemy drops a bomb.

    - The enemy's hand with the bomb gets hidden.

    - Once the bomb is destroyed, the hand appears again.

    Problem:

    I have 3 instance variables in the sprite "Enemy Hit Area" to store the UIDs of:

    - The Enemy

    - The Enemy Hand with Bomb

    - The Enemy Bomb

    How do I correctly save these UIDs so they only reference the specific enemy and its parts associated with the Enemy Hit Area that the hero is currently overlapping?

    Right now, I'm using "Last created", but that causes only the last created enemy to drop the bomb, even if the hero overlaps a different one.

    Error Video: webmshare.com/play/RL1nv

    Events:

  • The Pin behavior is superseded by hierarchies. So these days you should always start with hierarchies and avoid the Pin behavior.

    Ok, Thank you

  • well u could try this

    if enemy is on screen (invert it) → set gun to 180

    does this work?

    It’s not working. When he’s shooting at flying enemies, he stays pointed upward even after the enemy is dead.

  • When the character is shooting at the enemy, his gun points toward the enemy (I have flying and platform enemies). Once the enemy is dead, the gun should return to its normal horizontal position.

    I used these events to make the character aim at the enemy:

    Error video: webmshare.com/play/BDv6E

    I tried using "Else" and "Enemy not on screen" conditions to reset the gun angle to normal, but it’s not working.

    Can you please help me fix this issue?

  • Thank you for the help, I really appreciate it.

    dop2000 I had already used it long before your suggestion about hierarchy.

    Also, I was afraid something might break if I touched the events.

    I’ve started using hierarchy after your advice, thank you!

  • Got fixed..

CGSpot's avatar

CGSpot

Member since 16 Dec, 2024

None one is following CGSpot yet!

Connect with CGSpot

Trophy Case

  • RTFM Read the fabulous manual
  • Email Verified

Progress

2/44
How to earn trophies