AlexSV's Recent Forum Activity

  • Oh, did you try Layout Scale like peter568 mentioned up above?

  • Well, essentially you have everything you need. Basically, when you are not right clicking, it does the zoom between two objects. When you are right clicking, it only zooms to the crosshair.

    If you're doing the "scroll to" method, you can just set the behavior disabled on the player while you are right clicking and enabled when you aren't.

  • Here, I grabbed some quick screenshots from my own code.

    Ok, so I have a sprite with the solid behavior. I go to that behavior and add a tag, like this. This is done in the properties bar of whatever you added solid to. It could be a sprite, tilemap, tiled background, whatever you need. I tagged my solid "house" in my project.

    Then, we write a piece of code that sets our exceptions for us. In this screenshot, I wanted my player to be able to walk through the house solid, and so I create an action from my player using "set solid collision filter". This action lets you include or exclude, and since I want my player to pass through, I picked "exclude".

    Now my player can walk through any solid tagged as "house".

  • Good to hear! You were destroying the coin as soon as you made it.

  • Right, but if you are holding a button down to move? shouldn't you face that way?

    OK, let me ask a different way. You are using the word "automatically", but I still don't know whaf is making you turn around.

    Are you facing an enemy? Are you looking at the mouse? I don't know what automatic thing you want to do. At this moment I only see that you want to face a direction when you try to move, which is what you're doing already, unless you are using default controls on your player by accident and the code doesn't work. Maybe check and see if default controls are turned on in the behavior?

  • Ok, so looking at the gameplay of the video, I think a simple way to do this might be to do the following...

    Make a crosshair sprite and use "every tick" to set the crosshair at mouse.x and mouse.y.

    Then, add the "scroll-to" behavior to both the player and the crosshair.

    What "scroll-to" does is attempt to center the viewpoint on whatever object it has on it. If you add "scroll-to" to multiple objects, it does a quick version of what oosyrag has described. However, using Scroll To like this means that you can't do little cutscenes where the camera focuses on another object.

    Although oosyrag's version is a bit more complicated, you can do more things with it once you know how.

  • The way you have your code set up to mirror and unmirror the sprite looks correct. That's the way I teach my students to do it. I don't think I quite understand what you're asking.

  • Allrighty then! I appreciate it, depending on the complexity of a room either sprites or cubes will probably build out my areas. Much appreciated!

  • Now you're getting it!

    The animations at the bottom should only happen if "Attacking" is false. That way, when you press your attack button and "Attacking" becomes true, the correct animation will play.

  • And it IS changing to the attack animation. But then right after, because you have other animations at the bottom immediately change it back.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On your player, add a new instance variable. Make it a boolean named "Attacking".

    Then, when you want it on, you can use the "set boolean" action.

  • Code executes from top to bottom. Look later in your code, you change the animation again if you aren't moving. This means that you are indeed doing the animation, but then you immediately change it to something else.

    Try adding a boolean variable to your player called "Attacking". When you start the attack, turn "Attacking" on, and when your attack finishes, turn "Attacking" off.

    Then, at the bottom, make your idle animation happen if the player is not moving AND if the player is not attacking.

AlexSV's avatar

AlexSV

Member since 25 Apr, 2019

Twitter
AlexSV has 1 followers

Trophy Case

  • 5-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

7/44
How to earn trophies