CGSpot's Recent Forum Activity

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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..

  • I have pinned the health bars and mana bar to the hero. It was working fine, but suddenly the bars are not following correctly.

    I’ve tried many things, but I couldn’t figure it out.

    Can you please help me identify the issue?

    Error:

    Error Video:

    webmshare.com/play/JLXQW

    C3 File:

    dl.dropboxusercontent.com/scl/fi/3ilryfimgsn2dq49taf47/Horizon-Defense.zip

  • this game looks so nice, i cant wait for it to be fully published

    Thank you very much, i will share the link once its done.

  • Thank you very much for the help.

  • The support character will spawn from the barracks from time to time to help the hero, and after a certain period, he will return to the barracks.

    I'm using the Tween behavior when the support character is created—to show the distance from the barracks.

    When he returns (and is destroyed), I'm using position and scale with lerp to move him back to the barracks.

    It feels a bit laggy and doesn’t look smooth.

    Can you guys help me create a better and more polished functionality?

    Functionality video: webmshare.com/play/AZAbP

    Create event:

    Destroy event (go back):

  • The gun is set to not mirrored in both cases, that is intentional ?

    yes, i change to Pin and fixed it with these events

CGSpot's avatar

CGSpot

Member since 16 Dec, 2024

Twitter
CGSpot has 1 followers

Connect with CGSpot

Trophy Case

  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

3/44
How to earn trophies