Animation not looping after "set animation"

This forum is currently in read-only mode.
From the Asset Store
For Adventure, Action, Heroes, Sci-fi and Action-RPG games.
  • I want to apologize in advance for all of my "HELP!" posts. I promise I'm looking all over for my answers... I'm either not grasping some concepts or I got stuck on a bad build (in regards this post).

    Question 1:

    Anyway, I'm using the "Platform" behavior with a custom animation set (running in addition to walking). I have create an event to set the "Running" animation when Shift is held down. Well, it switches to the first frame and freezes. My character will just glide around in Frame 1. However if I jump while holding Shift, it loops through the frames... until I land then it's back to frame one. How can I fix this?

    Here is my cap file: http://dl.dropbox.com/u/415838/contruct ... Scroll.cap

    Question 2:

    In my above example, my Running animation has no tag (only Stopped, Jumping, Walking, Falling). Is there a way to create custom tags?

  • As a response to both of your questions, you need to get rid of the animation tags (set them all to None) and use events to control your animations. Animation tags only work if you have Walking, Jumping, Falling, and Stopped animations. That's it. You can't have more than that because the platform movement isn't designed to recognize any more than that. In other words, you can't use two different kinds of "walk" animations when you're using tags, which is essentially what you're doing.

    You need to use events to control your animations, and you need to beef up the logic a bit:

    http://dl.dropbox.com/u/529356/SideScroll.cap

    v0.99.82

    Also, you really need to make a separate hitbox for your player. Or else change the collision mask on the sprite. You can't run around with per-pixel collision on an animated platform sprite like that, you're going to get bigtime glitchy results. Make a single rectangular hitbox that doesn't change size and use that instead.

    Oh, and you don't need a giant black Tiled Background to change the color of the background, you can just change the layout color.

  • Well, I had another post talking about issues with collision masks because I was going to do just that (for the platforms). Now that I'm using x.x.82 Unstable I can properly edit masks now (without exporting).

    Thank you for the new code! This is a major improvement from what I had before. I've been teaching myself Python for the last few weeks (first programming language), so I'm still getting used to the actual scripting. I'm not aware of the many functions available in the Construct code... yet!

    Thanks again for your help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Deadeye (or anyone who can answer) - In your demo .cap, you used the following code:

    abs(Player[Platform].VectorX)[/code:3p6e0znj]
    
    I know that is "The absolute value of 'VextorX' for the 'Platform' attribute of the 'Player' object" (I may be fudging some official terminology here). My question is: How can you see the available values to measure? I.E. - Where did you find the "VectorX" piece? I see this particular one happens to be mentioned [url=http://sourceforge.net/apps/mediawiki/construct/index.php?title=Platform_Behavior]here[/url], but what about the many other hidden values? I don't see them in the debugger or listed elsewhere.
  • when building expressions you can doubleclick on the objects on the bar below, this will take you to a list of their available expressions

  • Ah, I had looked there and was looking for something "vector-y"... Get X component of motion did it.

    Thank you!

  • Well, they're not really "hidden" exactly. Some values have built-in conditions to compare them, and some don't.

    But okay, here's how you can find them:

    If you can't find one of the expressions you need in a condition, you can use a compare condition. A "Pick by comparison" for the object will work, or you can use a System compare. (System compare won't pick the object though, so keep that in mind.)

    <img src="http://i46.tinypic.com/20prjpv.png">

    Okay, the parameters for the compare condition will come up now. Highlight the first field, and then double-click on the object for which you need the expression:

    <img src="http://i46.tinypic.com/oh39ub.png">

    A new window will pop up allowing you to choose the expression you need. If your object has a behavior or an effect on it there will be a tab at the top for those expressions.

    <img src="http://i48.tinypic.com/161ydfq.png">

    Double-click the one you want and it will populate the parameter you selected:

    <img src="http://i45.tinypic.com/necbxt.png">

    See, easy

    You can also just type it in if you know the expression. You can also find a list of expressions for an object by right-clicking it in the layout and selecting "Object information." It will bring up this window:

    <img src="http://i47.tinypic.com/2wqu23r.png">

    The "Description" field shows the expression names rather than the name field, kind of backwards . But they're there. Also there should be a list of expressions for objects and behaviors and such on the wiki, but it's likely out of date. I think I may go and fill some in later while I have my coffee now that I think about it.

    DAMMIT IT MADSTER I SPENT SO MUCH TIME ON THIS POST

  • No don't get upset! This was an excellent post and provides even more wonderful information for myself and others! Thanks again, guys!

  • No. My blood lust must be sated. When I find madster I will tear his bones from his body and make a fancy hat out of them

  • I'm a fancy hat :'(

    "Here lies Madster. He protects you from the sun. FPS40."

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