pandabear7413's Recent Forum Activity

  • I'm trying to import this image as a sprite strip to create an animation, using the settings below. However, C3 sets a different centerpoint on each row, so every 8 frames the animation jumps a bit. I'm guessing it's because the images don't have defined edges, but any suggestions on how to import it more consistently without having to define different origins for every 8 frames?

  • Thanks for the example and the explanation! It works, and very easy. Gotta see what else tween can do for me...

  • When enemy sprites are created I want them to fade in. When they are killed I want them to fade out and be destroyed.

    I'm using the logic below, but seeing the following behavior:

    - when I press 'i', the sprite instantly appears but doesn't fade in - why not?

    - if I press 'o' within 2 seconds of pressing 'i', the sprite fades out and is destroyed - this is what I would expect

    - if I press 'o' more than 2 seconds after pressing 'i', the sprite instantly disappears and is destroyed - why is it not fading out?

    I'm obviously not understanding how to use fade properly, can someone clarify this for me, and/or let me know how to do what I'm trying to accomplish?

    Thanks

  • I have long animations where there are sometimes duplicate frames, and I want to make sure my game doesn't get too big.. Does C3 have built-in efficiency logic/features to deal with this? E.g., creating a single image in its database and reference this image from the duplicate frames.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks! I made the change and it worked. I also noticed that in the underlying code, setting the initial value to "" results in:

    "initialValue": "\"\""

    but not setting any initial value results in:

    "initialValue": "",

    Good to know :)

  • I have a string instance variable in my family of objects that is originally set to "". I want to do something when it's not "". But my condition [variable not equal to ""] returns true even if the string is "" (and it's showing as "" in the debugger). I had similar issues in the past and got around it using the condition [variable > ""] but that's not working this time. Is there a better way to check if a string is an empty string? Should I not be setting it to "" in the beginning?

    Thanks

  • Working on a karate platformer, think Kung Fu Master where multiple enemies are approaching the player from both sides.

    I want the enemies to block me from moving past them. I tried implementing this by adding solid behavior to both player and enemy objects, but this caused multiple enemies to 'stack up' behind each other, with the closest to the player essentially blocking the enemies behind them from attacking. If I add solid behavior just to the player, the player pushes all the enemies around. I like how things are working without the solid behavior, but I want to add the logic to prevent the player from moving past an enemy.

    I have to think this has been implemented many times in the past, can someone offer guidance on what has worked well before I cobble up a sub-par solution of my own?

    Thanks

  • Both worked - thanks!

  • I have a family of sprite objects called enemies, with different sprite object types (zombie, werewolf). I want to create a function called spawnEnemy(string enemyType) that creates a new instance of the enemyType passed (zombie, werewolf, or random if nothing is specified), after which I want to set some common instance variables.

    My logic looks like this:

    The issue is the bottom section (starting with setPlatformDisabled) seems to run for all existing enemies, but I just want it to run for the enemy created above. What should I be doing differently? FYI I also tried capturing and using the UID like this but it didn't help:

  • Thanks for the guidance here! Turns out the issue was because multiple hitboxes were spawned during a kick, which is triggered on an animation frame. I used the "trigger once" condition to fix that. I also then used 'overlapping' instead of 'on collision' and it works smoothly. Here's the logic that's working for me in case anyone is interested.

  • The one closest to the player probably makes the most sense.

  • Working on a karate platformer, think Kung Fu Master where multiple enemies are approaching the player from both sides...

    When my player kicks, I spawn hitBox sprite overlapping the player's leg, with a 1-frame animation with speed of 60. My logic is:

    - when enemies(family) on collision with hitbox

    - kill enemy

    - destroy hitbox

    I want the kick to only hit one enemy, even if the kick animation and its collision polygon collides with multiple enemies (e.g., when multiple enemies overlap). However it kills all enemies that collide with the hitbox. I even moved the logic to a subevent with a 'trigger once' condition but with the same result.

    Any suggestions on how to make this work, or better logic given the situation?

    Thanks

pandabear7413's avatar

pandabear7413

Member since 9 May, 2021

None one is following pandabear7413 yet!

Trophy Case

  • 3-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x4
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • Email Verified

Progress

10/44
How to earn trophies