Looking for a Video tutorial about Animation Manager / Lists. Will pay $30 USD.

Nikkita31

  • Posts: 130
Hi Guys.  >:(

I am currently stucked in a game that I do because of the multi-animation behaviors of my character. The character animation is showing up pretty decent but not in all states.

For example:

When you press:
1.) Left or right- Run Animation (works pretty well)
2.) Down - Duck Animation (works well)
3.) Up - Jump Animation (Working well)
4.) Q - Kick Animation (Working well)
5.) W  - Punch Animation (Working Well)

Now, The problem goes in this part..

When you press Down + (Another button)
1.) Q - Low Kick (Works well but when released it goes to it's default animation not to the duck animation)
2.) W - Low Punch (Same issue when button is released)

I just edited the jump and run movement provided by stencyl but I failed in some parts because the entire code is too complex for me.

Just let me know if you guys can help I can pay thru paypal or negotiate regarding the price. I am planning to post this on youtube as well so others can learn from this important tutorial.

Regards,
Renegade Games.

fillergames

  • Posts: 771
I dunno if giving out money over simple coding is really a required thing.

I could help with the animations related scripts, since I've been doing that for quite awhile. Post a screencap of the code, then I can see what exactly can be fixed up and such.

Also, I would not linger too much in Stencyl's pre-made assets. Yes, they're good for learning how to use the codebase, but it also becomes harder to make original code if you do so.

Nikkita31

  • Posts: 130
Hi Fillergames.

Yeah. I was looking for this tutorial for a very long time. I've seen quite a few but no actual video.  Yeah. The premade / preset stuff in stencyl is really hard to understand (For me) or to edit and I guess it was not really meant to be edited ( I did some serious facepalming and push-ups during the troubleshooting process of the animation.. :( ..) But anyway, I will post my code here.

I will still provide payment for those who are willing to do custom blocks which I guess is pretty hard and really time consuming to do. I only know some basic codes but not the hardcore stuff because my brain cannot process it. Any help is really appreciated.

regards,
Renegade Games

fillergames

  • Posts: 771
Yikes. I dunno if this will fix the issue where the low attack anims go back to the default anim (which is idle?) If you tried doing this? Add this to the script where it reverts to the idle anims if nothing was pressed.

If (Duck is down)

     If (facing left)

          Switch animation to (duck left)
     
     Otherwise
     
          Switch animation to  (duck right)

Otherwise
     
     If (facing left)
   
          Switch animation to (Idle left)
     
      Otherwise

          Switch animation to (Idle right)

end.

Another thing, you can use the scale block under "Actor>Tweening" to flip anims without using new ones. To do this, scale it by -100% or 100% depending on the direction you want. Width for left/right, Height for up/down.


merrak

  • *
  • Posts: 2492
The pre-built behaviors are designed to be very customizable without coding, which lots of options to select--which makes the actual code more complex than it needs to be if you have one goal in mind. I think the issue you're having is just one of organizing the code in a way that is easy to follow. You have a lot of "if, otherwise, etc.". Managing a large number of animation states is just a tricky problem.

I did notice that you have "if highkick was pressed" for your low kick. Is this intentional?

Nikkita31

  • Posts: 130
Hi Merrak.

Yeah, I definitely agree. The multiple animation is really giving me headaches.  Yup. If you just press Q, character will do highkick. When released, back to standing pose (this is the idle).

But when you press Q and Keyboard Down, character should do Sweep / Lo Kick. When released, should go back to Duck not to standing. For me, this is the most problematic part.

This is the Link to the game. Kindly check if you can solve this:

http://www.stencyl.com/game/play/33146

Regards,
Renegade Games.

merrak

  • *
  • Posts: 2492
I think the problem is in your lo kick and lo punch code. After 0.25 seconds, you set "enable duck" to false. This might be overriding the player having the down key pressed for one frame, enough to make the standing animation "blink".

It's hard to tell for sure, since I can't put print statements to verify the execution order. But I think you can test it pretty easily. In your lo kick and lo punch sections, instead of setting "enable duck" to false, check if the player still has the duck key held down. If the player does, then set "enable duck" to true.

TheIndieStation

  • *
  • Posts: 2256
Still having this issue?

Nikkita31

  • Posts: 130
Hi Stefan.

Yeah. I'm still having troubles here. I already took note of the advice stated above but I still need to try to find out what causes this issue. If you have the time, let me know. Hope you give this one a shot.

Regards,
RenegadeGames

TheIndieStation

  • *
  • Posts: 2256
Send me whatever you currently have to my email and I will have a look =)

merrak

  • *
  • Posts: 2492
Did that idea turn out to not solve the problem?

Nikkita31

  • Posts: 130
Hi Guys.

Yo Merrak. I will try to fix the problem later.  I want to turn this thing into a fighting game But I have to do this step by step since things like these will crack my head open. Every successful fix should be posted in video format.

Combos I am planning to do is something like this:

(Hold keyboard Left) + (Right button and Q) = Charging kick.

if done within number of seconds, then it will only execute the move.. AND of course I will definitely need expert help.

Regards,
Renegade Gamez.

TheIndieStation

  • *
  • Posts: 2256
These fighter game mechanics can be a pain, specially if you have different fighters with different combo's. And since this really depends on your combo's, I cant just make one tutorial for it as different combo's need different codes.

Nikkita31

  • Posts: 130
Hi Stefan.

I definitely agree.. and this is one of my reasons why I am paying 'coz it is really a pain. I will get back to you real soon. I am reading photon's blog about animation priorities ( just to familiarize myself about this thing) I've been trying this many many times but I can't make it work so I need some sorcery from the experts.

Let me know if you guys need the stencyl file I can send it in dropbox.

regards,
Renegade Games.

merrak

  • *
  • Posts: 2492
If you have a lot more combos and animations than you currently have, I don't think a fix to your current code is going to be the best solution. There's a limit to the number of "if, otherwise if, otherwise" you can have before the code becomes unmanageable. I think you may need to write an entire new animation manager that is better suited for your game.

I can think of a few good ways this problem can be solved.. so I can't really guess what solution TheIndieStation or FillerGames had in mind. I had a similar problem earlier (in fact, mentioned in a recent thread in this forum). Your problem is harder than mine. I only had a lot of animations. It sounds like you have a lot of animations -and- a lot of key combos. In any case, my solution had three components:

1. A separate module that detects key combinations and maps each one to an action (kick, run, etc.)
2. A separate module that maps each action to an effect, based on the current animation (e.g. what happens when you kick and are in the air)
3. On top of that, you would also need something to check if a transition from one animation to another is possible. The default animation manager uses a list... but for something like you're describing, I think a graph that explicitly states which animation can lead to another would be necessary. I don't know how many different animations you're planning on, but if it's long enough there's a good chance you would need exceptions to a simple hierarchy.

Not sure if that would be the best way to organize the code, since I've never made a fighting game with multiple combos. It's just one way I can imagine a series of guides about the solution.