Icecreamvamp's Forum Posts

  • Try disabling "Parallax in editor" checkbox in layer properties. And then simply set UI objects position correctly in the editor, they should stay there in the game.

    Thanks for your help so far!

    Mmm the problem seemed to be that I had the Z elevation on -1 for this specific object on the HUD layer. This somehow ignores makes it ignore the not-scrolling-in-the-editor. But even now, with the 0x0 parallax and the object staying in place in the editor, when testing the game and scrolling sideways the object (the dialogue box) refuses to stay locked in the viewport.

  • Thanks for the tip! Though now it scrolls along in the editor like crazy without having any fixed position on the screen nor in the game itself. Do I need to define the position and size of the object each time On Layout Start and tween all those properties when animating as well?

  • Hi all,

    For my game I use some HUD objects that use the anchor behavior so they neatly stay in place wherever my character goes. This is especially handy with layouts that scroll as no HUD piece is left behind.

    For my dialogue box though, I want to make it so it quickly pops up as text starts to run, to give a less static feeling. I tried doing so using tween behavior.

    Because my object is anchored, it pretty much ignores the tween behavior and setting anchor edges differently just makes the box weirdly distorted. It's almost as if I have to choose between anchoring an object in place or having freedom to animate it. Is there a workaround to mix it up and mash the two results together somehow?

  • If you are referring to the source object then it will be from the origin image point by default in the centre so I don't see how that can be changed, if you are using that object then you can pin another sprite to the front of it and give that the line of sight.

    And to clarify this, I got my origin point at the bottom to avoid weird rotations.

  • Thanks, I will try it out with a single image point and otherwise perhaps with if/else statements for multiple image points. The thing is that visually the objects might differ by being i.e. somewhere on the floor or just above the player's head, and while visually coming near the object my character will never come within say a 150 pixels in coded range because of this difference. But I will try some stuff out by adding image points.

  • Hi all, question, I just added the line-of-sight behavior to my main character in a point-and-click adventure to check the distance between him and an object to pick-up. However, much like my previous method to check the distance (object.x, object.y compared to player.x, player.Y), both instances take the anchor point of my sprite as the go-to for the distance check. I actually want the bounding box of my sprite to be the reference point. Is this possible at all?

    Thank you in advance.

  • Hi, sorry for the late reply. Thank you for your input, it pretty much works though I replaced the distance check with line-of-sight behavior.

  • Thank you, but this is actually what I already have. If you use this the system just checks if you are within 150 pixels upon clicking and then stops checking unless you click again. What I want is the character to move closer to the object and then check if he's within 150 pixels range to pick it up.

    Now I could write another if statement (condition) that simply checks if he is close enough, but then he will also pick it up when he accidentally walks past it, while I want him to follow the action after a click specifically.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So, this might be simple enough for some but please forgive me as I'm a relatively new user.

    I'm creating a point-and-click game, and I got a condition that basically says:

    - If you click on Object A, if Player is within 150 pixels of Object A he will pick it up.

    - If you click on Object A, and the Player is NOT within 150 pixels of Object A, he will walk to where you clicked first.

    Now, in the second case where the player is not within range, I want the system to check that after you clicked and the player reaches a certain point (150 pixels of Object A), he will then stop (-> Stop MoveTo) and pick up the object. But how do I check if the Player is within Object A's range after he's moving already upon a click?

    Thank you in advance