unfortunatly not. i can get his health todrop - but when it reaches 0, it does not change his state. i wonder if i did the UI correctly…
I am following part 1 of the tutorial. After changing the sprite I click play and see the character spawn facing left instead of right. How do I get it to face right instead of left like in the tutorial?
Solved!
Hey, what’s up? I was having the same issue (I’m running v. 4.11.2) and I figured it out today! Not bad for someone who just started today, right? Anyway, what you want to do is go to the Event Graph of your BP_Dude and look for the area labeled ‘Tick - Updates animation’. In that group, just after CompareFloat, there is a Branch. The condition on that branch should be Bis Moving Right (or something to that effect). Click on that, and over to the right under Details, there are two fields. One is labeled Variable, the other is labeled Default Value. The one you want is Default Value. Just make sure Bis Moving Right is checked, click Play, and you should start facing right! Let me know if this helped.
- GR1M
Hey Hello G21M !
Just looked at your answer because I had the same problem! It helped a bit as my character is facing right now! Thanks!
But … My character is only facing right now, even when I go left. Did you find anything else to fix that too ?
Thank you!
[Edit] Just got an answer about this problem from himself!
If your character is facing only one side, just remove the trail coming out of “==” ine the CompareFLoat described by G21M.
Is it possible to download this project somewhere? It’s very tedious to check the videos if you forgot something or just want to check out how a single thing was done.
I had the same problem, forgot to connect the set and branch. Also the logic should be [Health <= 0] , rather than the other way around. It should look like this ->
It would be really great if you guys could go through the process of creating 2D ai that isn’t just a sprite moving from one point to another point, I can’t find any information about this anywhere. I want to have the enemies detect where the player is and move towards that location, as well as flipping the sprite when needed, and having physics enabled interactions.
I cannot link the health variable to the health widget. Any help??
Great tutorial. Thanks a lot!
Nvm got it. Great Tutorial so far.
Hello,
I think i have the same problem… my bar stays empty
EDIT: NM, found it…
Wow, thanks guys. I’m totally new to this and this helped alot! This was really great. Keep up the good work.
Quick question: I added a 2nd level and 2nd sprite (with it’s own GameMode, Pawn Class and PlayerController). Can I use the same HUD for both levels and how would I modify the HUD_Widget Graph? I figured I need to replace the “Cast To BP_Dude” but I can’t find a way to identify which Player Character is active. How would I use a “Cast to…whatever character is active” and get the current health?
Are there any live links to the assets for this? I know it’s a bit old but i’d like to try and follow along in a newer version of UE.