NickGlowsinDark's Recent Forum Activity

  • It seems to me that setting a new animation sets a sprite's [Platform].VectorX back to 0. I'm not 100% positive that this is what's happening, but I can see no other explanation for what I'm seeing, and I'm looking for a confirmation and/or an alternate method to accomplish my goal.

    I have a sprite that starts at a speed of 10 (or -10, depending on whether he's facing left or right) and gradually accelerates until he either collides with a wall, or collides with the player. This resets his speed back to 0, and he begins to accelerate again towards the player. Think of any generic charging-bull type boss in a sidescroller.

    What I'm trying to do is change his animation to something else once he reaches a particular speed (let's call it 250 for sake of ease). Every time he reaches this speed, he pauses briefly, and then starts over again from speed 10. It seems to me that the act of setting a new animation is causing his speed to drop back to 0, which resets his animation to the "moving slowly" animation.

    Just to get it out of the way before any questions come up, before I started playing with animations his movement was exactly the way I wanted it; the only thing I've changed since is adding statements saying essentially (if AnimName="blah" and speed<blah then set animation "otherblah").

    So... any ideas?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I've gathered that the easiest, and pretty much only way to pause the game is to set the timescale=0. What I'm going for is to pause the game during dialogues; I have a little textbox set visible=1 on a layer that doesn't scroll, and then I write text to that box depending on the conversation.

    Of course, with timescale set to 0, it doesn't really write, now does it? I mean, I could set the write speed to 0, but that sort of defeats the point of writing in the first place; I might as well just "set text."

    Is there any way to set just a layer's timescale? Or perhaps to set timescale "everything but this object?" Anything at all that can be used to control timing on different objects? I understand that the whole "layout within a layout" is buggy, so I created that single layer to not scroll at all, and turned it into my healthbar/inventory/etc. layer, which is perfect for the textbox thing. I really don't want to try and swap everything I have now over to a layout-within-a-layout.

    Has anyone come up with a way to do what I'm trying to do, or do I just need to accept the fact that I won't be able to write text while it's paused?

NickGlowsinDark's avatar

NickGlowsinDark

Member since 5 Jun, 2010

None one is following NickGlowsinDark yet!

Trophy Case

  • 14-Year Club

Progress

14/44
How to earn trophies