pandabear7413's Forum Posts

  • Thanks, but I'm looking to copy animations to an existing object, so I don't see a way I can leverage the cloning functionality.

  • I'm looking to copy/transfer animations from 1 sprite object to another, including image points and collision polygons. Is this possible and if not what's the closest/easiest process I can use?

  • I like your suggestion, it's clean and it works. Here's how it looks in code fyi. Thanks!

  • I'm essentially trying to implement "if A or (B and C)" condition logic for my player's shooting. Normally the player must press the z button to shoot a single bullet, but if they've purchased a 'rapid fire' upgrade, they can just hold down the z button and they will continue to shoot.

    I'd like to implement the logic like this:

    if (z button pressed) OR (z button down AND player.hasRapidFire = true) then [execute shoot logic]

    However, I can't do this because C3 doesn't allow combining AND's and OR's in a single event. And because [execute shoot logic] is rather complicated, I don't want to duplicate it in a separate event or put it into a function.

    Can someone please suggest a clean way to implement this condition logic?

  • I'm trying to build a boulder sprite with bullet behavior that bounces after the player in a 2D platformer. I want the boulder to bounce forever as it's chasing the player, and maintain the same speed and bounce height.

    I've set the bullet behavior to the following, but the boulder slows down and the bounce height decreases over time (which is realistic, but not desired)

    I tried added the following logic, but the results are inconsistent -- sometimes the boulder will slow down, sometimes it will speed up, even both on the same run.

    Any thoughts?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd building a platformer and want enemies to fly through the air when they are killed by an explosion (e.g., grenade). Criteria:

    - It should happen when they are killed, but not when they're just hurt by the explosion. FYI my existing grenade mechanic creates several shrapnel objects (sprites with bullet behavior) which emanate from the explosion, and when they collide with the enemy they do damage. If the damage is more than the enemy's health, the enemy dies.

    - Angle of trajectory should be based on enemy location with respect to the explosion source. I.e., if they're standing on top of a mine they'll fly straight up, but if they're to the side they would fly sideways away from the explosion.

    - Speed of trajectory should be inversely related to the enemy's proximity to the explosion source. I.e., the closer they are to the explosion, the higher their flying speed.

    - Optional but desired: it would be great if enemies rotated in the air. The hard part with this option would be to make sure they landed correctly given the available animations. I.e., if they landed face down but the dying animation shows them face up.

    I did a little trial and error and it looks like the bullet behavior may be a good place to begin, but I'm wondering if someone has an example I can start with?

    Thanks

  • I'm not trying to do anything in particular with this code example, I'm just trying to understand how C3 executes events/actions in general. I was expecting event 3 to work like this:

    for each enemy whose health is > 0

    1. increment enemyKillCount by 1 (would be executed 15 times)

    2. set that enemy's health to 0 (would be executed 15 times)

    But instead it seems to me that C3 is evaluating/executing event 3 like this:

    if there is at least one enemy whose health is > 0

    1. increment enemyKillCount by 1 (would be executed 1 time)

    2. for each enemy whose health is > 0, set their health to 0 (would be executed 15 times)

    Is my understanding correct here?

  • I thought I understood how C3 runs actions, but looks like I don't so I want to confirm with the community...

    Here's my code. I was expecting the highlighted action block to run 15 times, i.e. once for each enemy, meaning the counter would increment to 15. However, when I run it the counter only increments to 1 but all 15 enemies have their health set to 0. Can someone please explain why it works like this?

  • I'm following you now. I knew I was going to have to modify standard controls since my player doesn't jump, but had yet to get around to it. I added the following and disabled default controls for platform behavior and it's working as I was hoping. Thanks!

  • Thanks for the suggestion, but I'm not managing my player movements, I'm letting the platform behavior do that for me. If I understand you correctly, your suggestion means I would need to turn on/off all default platform movements based on the state variable. I'm looking for a simpler solution, especially since I use that state variable for many things in the game, which could potentially (and inadvertently) affect the player movement with this approach.

    Is there a way to ignore user input but still let the platform behavior do it's thing? Seems like platform simulate should do that, but per my code that doesn't seem to be the case.

  • I created a sprite using some old animations, and C3 used a frame from one of those animations as the icon for the sprite in the editor. I've since removed/changed my animations but the icon hasn't changed, it's still showing an old frame. Is there a way to change the default icon for the sprite?

  • I want to build a dash function for my platformer. When the dash button is pressed, the player should move quickly in the direction it's facing, but the user shouldn't be able to cancel the dash movement by pressing another button (like move-arrow or fire).

    Here's my logic, everything works except the "start ignoring platform user input" part. If I leave that in there the player doesn't move, i.e., it stays in one place during the dashing animation. But if I take it out, the user can stop the dash movement by pressing another button (like move-arrow or fire).

    Any suggestions on how I can get the player to move but ignore input at the same time?

  • When I 'export' my project from the main menu, where does my data (project files, assets, etc) go? Does it stay on my machine and get packaged up locally, or does some or all of it go somewhere in the cloud during/after the process?

  • Unfortunately looks like that won't work, and I cant even get Chrome to download it. But thanks Oos for the suggestion.

  • I want to build a windows game that users will download an install locally to play. I noticed that both the node.js and Windows WebView2 export options package the assets such that they're very accessible (in folders or a .zip / .nw file). I'm concerned about my assets being that easy to access / redistribute. Is there a way to package them so that they can be more difficult to get to? I'm thinking like an .exe, I certainly don't know how to open one of those and get to what's inside.

    Thanks