Basic movement...

0 favourites
  • 10 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • This is a basic, but how do I make an object appear and move from one set of X,Y coordinates to another over the time of about 0.5 seconds?

  • Hi,

    Making it appear: if it is already on the layout just set the opacity to 100 or visibility to "visible".

    If not, just create the object and use the tween behavior.

    Make sure you use the "tween 2 properties" action

    + Keyboard: On Space pressed

    -> System: Create object enemy on layer 0 at (0, 0)

    -> enemy: Tween "" property Position to 10, 10 in 0.5 seconds (Default, destroy: No)

    Alternatively: use timelines, but that's probably overkill here.

    If it's not necessary to do it in exactly 0.5 seconds you can also use MoveTo, that depends on the speed you set the MoveTo behavior. There are many examples in my playlist of using the MoveTo behavior.

    youtube.com/playlist

    hope that helps

  • That's brilliant thank you :)

    What if I want to move all of the assets on a single layer - do I need to move each one individually or can I tween the layer, or is there an alternative?

  • Just doing the same thing, but first picking all the assets on the layer you want. The easiest way is using "pick by evaluate":

    + System: Pick Sprite by evaluating Sprite.LayerName = "myLayer"

    -> Sprite: Tween "" property Position to 10, 10 in 0.5 seconds (Default, destroy: No)

  • OK - I've done this, but it doesn't seem to work correctly...

    What am I missing?

  • looking to the context, I would assume that you only have 1 game over panel?

    why do you create an extra one?

    so, either it exists, and you just pick it.

    Or it doesn't exist, and picking becomes unnecessary, and you create it.

    Both doing both confuses me a bit.

  • I’m confused too.

    I’ve no idea what I’m doing. I was trying to follow what you suggested in your earlier post, but obviously got it wrong.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe it's better to explain exactly what you want to do functionally.

  • I have a panel that appears on the Game Over screen. On the panel are 4 medals that appear depending on the user's score and the score/high scores that are sprite fonts. They're all on the same layer called GAME OVER PANEL

    At the moment they all appear static.

    I want all elements of this layer to act as one and appear at the same time, fading in, and moving down 10 pixels.

    Make sense?

  • I created a video, check it out, I think that is about what you want.

    drive.google.com/file/d/1oERBtxw27AovJhIYt7A0juyXCnfp-VTx/view

    If want to get some more understanding of Construct, and general tips and tricks, check out my youtube playlist.

    youtube.com/playlist

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)