x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Again. How can I implement a complex 2D animation?

Again, it's me. I still have a some problem on how to create a complex 2d animation by using blueprints(BP). OK, First I will show the problem during my practice. Problem:how can I use BP to make a complex animation.Such as following pics show: alt text

And the following is what I used to implement it: I define a function named "Animation State Machine" and use Tick to call it. alt text

These is "Animation State Machine" I define in my characterBP: alt text I will have a clear explain about it. local Var to store the some boolean var, and use some logic conditions to decide which flipbook as the current clip.(I just followed the youtube videos to do it )

The problem is : I dont know how to design the logic by using BP. the above pics I used is not work well. I mean for instance I used velocity's z value to check if the character is up/rising (z > 0) down/falling (z < 0). the logic path is : check the velocity's z ,then set boolean "isJumping" then play "start jump"clip, when the current frame = that clip length, turn to play "rising" clips. the following pic show the logic code: alt text

Please correct my design. and, I also wonder if there is smarter way or some professional way to implement, please tell me. Thx first.

Product Version: UE 4.20
Tags:
asm.png (30.0 kB)
asm1.png (241.6 kB)
asm2.png (238.9 kB)
asm3.png (155.0 kB)
more ▼

asked Jan 10 '19 at 12:53 PM in Blueprint Scripting

avatar image

XTjiang
1 1 1

avatar image Tuerer Jan 10 '19 at 01:01 PM

The way you described it I would say that virtually how the state machines for skeletal mesh animation work. They constantly check a bunch of parameters on tick and transition between animations accordingly.

Just one thing about your logic: checking only Z Velocity is not enough, because your character may move up or down the slope, and it will trigger rise/fall animation in your case. You have to check the "Is Falling" bool as well.

avatar image XTjiang Jan 10 '19 at 01:25 PM

Yeah, you are right. I just show a little, I has check more var about my BP. But, I just want to know if the way I used is correct? I check too many boolean var in my blueprint. But is there any better way or method to implement (maybe some high technology from blueprint or some professional idea from game design). I was mad for my blueprint. >_<

avatar image Tuerer Jan 10 '19 at 01:37 PM

Idk, I think if the Epics use practically the same way of doing that in the UE, so that must be the best mass way of doing that at the moment. I'm sure you can implement it wa-ay better and more efficient via C++ code, but we're using BPs so that's how it is.

I just had a thought about events, maybe it would be better to track some parameters using events instead of checking them on tick, if something happens quite rarely. But I'm not sure state machines can bind to events, I'll check it later. But since you're using a custom state machine in your Character BP, you can certainly use events.

Like, let's say. you have a grenade throw animation, but you can throw a grenade once every minute or so, so there's really no point in tracking the Is Throwing Grenade bool on tick. When the event fires, bool is set to true, and when the respective animation is almost over, back to false.

avatar image XTjiang Jan 11 '19 at 01:04 PM

Yeah, thx again. I hope can have more discuss with you about that. I will try the suggestion that you give to me. And I am excited about that. As I said, I am just a hobbyist but I want to create my own 2d game. I like 2d game, such as dragon's crown, Metroid, Castlevania and so on. ^_^

That is my e-mail: jkbasara@yahoo.com Hope can get more ideas from your excellent suggestions. Cool~~~

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question