0 Favourites

I must be doing something wrong...

This forum is currently in read-only mode.
  • I'm not sure if this question is obvious, or if the answer can be found here or on the Wiki...but regardless, I can't seem to find it.

    My main question is this...

    How do you animate sprites?

    It seems like it would be simple, and the Platform School tutorial makes it seem so. But I copy all the methods I saw from there into my project, and my sprites won't animate. They switch to different animations types (run, jump, fall, etc.) but they won't ANIMATE. My character just slides across the scene in the same frame.

    I thought this would be one of the easiest parts but I just can't figure it out. I hate to be a bother and ask such a seemingly obvious question, but I'm stumped!

  • I'm also suffering the same problem and its quite frustrating. Also my sprite will not turn to face the opposite direction, so moonwalks across the playing area.

    Any advice would be much appreciated.

    Thanks in advance.

  • I replied to a similar thread a few days ago.

    http://scirra.com/phpbb3/viewtopic.php?f=3&t=4440&start=0&st=0&sk=t&sd=a

    You may want to read this and get the file in the last post (this file), which demonstrates basic animations with events and also how to face the right direction.

    The problem might be that you're using tagged animations, which are glitchy atm I believe. In one of my current projects I'm using them without a problem, but the animations are only tagged on the dummy sprite. Then the visual player sprite will be set to the dummy animation (they are named the same way), when the animation is changing. Doing it this way, the animation will play properly. Or do it purely with events as shown in the example cap.

  • Thanks! I can't believe I didn't notice that other topic you mentioned, it was on the first page! I even used the search, but I only tried "Running animation" because I was thinking about it in terms of running...sorry.

    It honestly took me several minutes to figure out how to get things working based on your demo, but when I finally got it to work, it started to make sense. Finally getting my sprite (well, it's not really my sprite to be honest) to actually run is actually a large stepping stone to getting things started with my project. Thanks for that.

  • No sweat, the search function around here is a real bitch anyway.

    And of course I'm always glad to help.

    Are you doing something MegaMan-related btw? I'm just guessing by your avatar and you did mention you're not using your own sprites.

    EDIT: Okay I got it. Read your introduction.

  • Like I mentioned there, I am trying to make a Mega Man fangame. Funny thing is, I don't even know if I'm going to put Magnet Man in it. Since you recognized Magnet Man, I'm going to assume you are familiar with Mega Man.

    Mega Man...shoots to attack. I've figured out how to make him shoot, but I can't figure out to make him go back to his normal position after firing a shot. I'm not sure how long it is between pressing the attack button and returning back to normal, but nothing I try ends up even remotely how it should.

    If you don't mind me asking (anybody can answer) how would I go about doing this? Is this enough info to work with?

    (I intentionally made the topic title somewhat vague to give me space to ask more than question because I don't want to clutter up the board, I hope that's okay)

    (oh, one last thing, I'm using version 0.99.42, if that makes any difference)

  • Mega Man...shoots to attack. I've figured out how to make him shoot, but I can't figure out to make him go back to his normal position after firing a shot. I'm not sure how long it is between pressing the attack button and returning back to normal, but nothing I try ends up even remotely how it should.

    By "normal position" you mean the normal (non-shooting) animation I assume. If you're using events to control your animations like in the example, there are several things you could do to make it work. For example give the sprite a PV called "Shooting" to control which animation will be shown. Since Megaman can shoot while walking/jumping too this could make things less messy. Or you could even split the sprite itself in upper and lower part. But I guess I wouldn't recommend this for beginners.

    Is this enough info to work with?

    Actually it's not really enough information to give a precise answer. You maybe missing just one event or some small tweak to make your animations work properly for all I know. So I'd like to see your cap if that's possible, makes things easier.

    On a sidenote I've already checked out the beginnings of a very good MegaMan engine made by forum member SuperV, who appears to be a total MM fan himself too. Maybe if he knew about the "MegaMan-ness" of this thread he'd jump right into nerd mode. That could be very helpful for you I guess.

    (Don't hurt me SuperV=)

  • Hey! Another Megaman fan!

    Some tips:

    If you want to create a big megaman fangame, with an easy-to-expand and an easy-to-tweak engine, then you should probably start it later.

    Make other platformer projects for now, learn to use functions, learn to use less sprites possible, learn to make a good engine.

    After you've done that, you can start PLANNING your fan game. When everything is planned, you can create it.

    Good luck!

    P.S. : magnet man sucks, go quick man!

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • PixelRebirth:

    Thanks again, your reply made me think about things again, and I have a method that works pretty good so far. I copied the event conditions of your example of changing animations when moving from your cap, and added "On Key J released" to the even conditions. J is currently the attack button in my project. It makes him go back to his normal, default stance after shooting, but it's almost instant. I need a way to have some type of time delay in the event actions, and it will help immensely, but I have no no idea how to do that. I've found out how to have time delay as part of the condition, but not the action. Is it possible?

    I'm not sure how to display this, but here's what I have for the attack start-up:

    Always (every tick)	Mega: Set animation to "Shoot"
    On key J pressed	   Mega: Play current animation
    			             Mega: Spawn object Buster1 on layer 1(image point "Buster")[/code:flmsmm1h]
    
    And the attack finish:
    [code:flmsmm1h]
    Player1 is on ground	Mega: Set animation to "Blink"
    Player1[Platform]	   Mega: Play current animation
    VectorX Equal to 0
    On key J released[/code:flmsmm1h]
    
    Does that help, or am I wasting time?
    
    

    SuperV:[/p] Good to see more Mega Man fans around here. I appreciate the advice, but I am making progress a lot faster than I thought I would. Maybe I'm being stupid, maybe I'm being arrogant, but I think I can do this the way I have planned so far. Which isn't much planning, but that's how I do things. The more I plan things, the more I put them off...and I usually never start a lot of ideas I have. Often times it's better for me to just jump in and work everything out later. I know it's not the best way, but it works for me. (I'm not planning a BIG Mega Man game, just a normal sized one...mostly...8 boss levels, a 4-stage castle, and I'm considering throwing in 4 optional stages...1 of which is secret. Then again, even a game you can beat in a couple hours...like a Mega Man game...still takes a long time to make.)[/p] [/p] P.S.: Magnet Man's not even my favorite robot master, I just decided to use him as my avatar and his weapon as my username. I don't know who my favorite robot master is.

  • Good to see you're becoming more familiar with Construct! Learning by doing is always a good thing.

    I need a way to have some type of time delay in the event actions, and it will help immensely, but I have no no idea how to do that. I've found out how to have time delay as part of the condition, but not the action. Is it possible?

    Have you tried the Function object yet? There's an action which lets you call a function after a delay. That might be a good way to go. To be a little more precise: you make an event with a "On Function" condition. Now this event will only run, when you call that function with an action in another event. And like mentioned you can do this with a delay ("Call function after delay").

    So I hope this was helpful. Keep working with Construct, there's always something to learn and figuring out new ways to do certain things can be a lot of fun.

  • Oh! One of those clever things that you can't use until you add it to the layout editor...you wouldn't believe how long it took me to realize you had to add the Keyboard/Mouse support to make conditions based on button presses...I was so frustrated. Ha ha, oh well.

    These Function things look interesting, but I haven't spent much time trying to figure 'em out. I need to be at full capacity to understand some of these things, and it's late.

    Anyway, I actually figured out how to make Mega Man shoot and go back to a normal position from standing and in the air, but while running? It was a a nightmare and I still haven't gotten it figured it out. See, Mega Man has three running frames, one with the right arm forward, one with the left arm forward, and one in between. It's the same for shooting while running, the only difference is that his shooting arm is out. In the Mega Man games, when you press the button to shoot, his arms and legs are in the same position as they where before shooting. So, if he's in Frame 1 on running, he'll go to Frame 1 on shooting and running. I can't figure out how to do that. I thought your idea of separating the sprites into two parts might work, but his arms move at the same frames too.

    I'm baffled. Maybe I'll put this part on hold for a while, it was giving me a headache.

    Once again, thanks for your help.

  • So, if he's in Frame 1 on running, he'll go to Frame 1 on shooting and running. I can't figure out how to do that.

    There is a condition to check which frame of an animation is playing. When you set the animation to shooting, you can set it to the right frame as well. It shouldn't be too much of a hassle setting it up this way.

  • I think I tried something like that, but it wasn't working out. I guess I'll have to look into it further.

    By the way, functions, I don't get 'em yet. I had an enemy that is supposed to wait 2 seconds, then fire 3 shots, then go back to guarding (Sniper Joe in case you were wondering). He waits just fine, then lets out an endless stream of shots. It's kinda neat looking, but not really what I was looking for, and not exactly very fair either.

    Anyway, I...uh...already started another project. But it's not as focused as this one. This Mega Man game I'm working on has a specific direction and a specific goal. I'm doing some things differently (it's two-players, that won't work well on a keyboard!) but when it comes down to it, it's intended to follow the Mega Man formula very strictly.

    I started some bizarre Mario game, to let all of my weird ideas flow out and to experiment with different types of gameplay to get a better hang of things while making some strange, directionless game. I don't know, I think it might help. It doesn't mean I'm not still working on my Mega Man game.

    It's so easy to get distracted.

  • By the way, functions, I don't get 'em yet. I had an enemy that is supposed to wait 2 seconds, then fire 3 shots, then go back to guarding (Sniper Joe in case you were wondering). He waits just fine, then lets out an endless stream of shots. It's kinda neat looking, but not really what I was looking for, and not exactly very fair either.

    Sounds like you're missing a condition which will end the shooting after 3 shots or you're calling the function all the time unintentionally or something like that. If you want to, I can have a look at your cap (in case you don't want to upload a cap to the forum, there's always PM).

    It's so easy to get distracted.

    Indeed it is!

    But don't worry. Doing a project like you described where you have more creative freedom and aren't obligated to recreate a certain kind of style and/or gameplay, will be a good learning experience for sure.

  • A cap huh? I might whip something up later, I've already thrown in a big chunk of level and some tricky platforming...I should just copy what I need for the timing stuff into a simple cap file, but I don't really have the motivation to do it right now.

    Speaking of getting distracted...I'm getting even more distracted. Like I said earlier, Construct seems awesome, and I like how I can do interesting stuff without any real knowledge of scripting. But...it's overwhelming. I don't really need this much freedom at this point. I...think I should finish something with RPG Maker XP first, because it's so simple. Sure, my game's not too unique, sure it's not anything groundbreaking or special, but it's easy to work on and I have enough freedom for the time being. I want to make a platformer, but I don't have the patience or focus right now.

    Oh well. I'll probably work on and off with Construct and RPG Maker XP for a while. Both have different advantages for me and both have their disadvantages. I guess I should just work on one until I hit a bump and then switch to the other for a while?

    Once again, thanks PixelRebirth. I'll probably whip some caps up if you still want to help...in my Mario project I can't even figure out how to make a Goomba...sad. Maybe I just need more sleep? Making games (or rather, TRYING to make games) makes me lose sleep...

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