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"

Wrong animation being called.

Hi all, I have set up a script that removes the players health over time resulting in a death animation, but instead of that animation being called, some gun holding animation gets called instead? alt text

alt text

alt text

alt text

Product Version: UE 4.13
Tags:
shot48.png (189.7 kB)
shot49.png (82.8 kB)
shot50.png (481.4 kB)
shot51.png (251.7 kB)
more ▼

asked Apr 05 '17 at 01:40 PM in Blueprint Scripting

avatar image

FinalDingo
1 1 2

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

So it sounds more like your issue isn't that it's playing the wrong animation, but that your montage isn't actually being played, so you're state machine just keeps on going, since you haven't passed it anything to designate a different state.

Setting the StateMachine comment aside, I've encountered the same thing you're describing with montages. For my situation, the solution was to open the montage, and set the "Montage Group" to something appropriate. For you, I'd assume it to be the same as what I had to select; which was "DefaultGroup.FullBody" Having the wrong group selected for your skeleton/animation Blueprint will cause the montages to technically "play", but you won't see anything being done with your character. alt text

Regarding the comment about the StateMachine... you may want to add in a section in your "Update" event for your animation Blueprint to check some information from your character or Player state that can set a variable in your AnimBP like "IsAlive"

You can then use that variable to set your Locomotion graph to a "dead" state so it's not trying to play idle, stand, whatever, animations on a dead character. There's thousands of ways of going about it, so go with whatever suits your needs.

Also, on a side note.... That Tick Event appears to belong to your Flaming object.. I'd recommend not having that call your character's Death function.. Just have it do the damage (in your case, manual reduction of health). And instead, in your Character's Tick event; do your health check there (If Health <= 0 is true, call Death Function (or event if you decide later you need replication features for it)). This will save you from having to maintain logic for calling of Death to the character on several objects if you have more than that one.

more ▼

answered Apr 05 '17 at 02:09 PM

avatar image

Jason.J
52 1 5 4

avatar image FinalDingo Apr 05 '17 at 05:51 PM

Thanks for the reply, I will try this out. I did try following this example: (https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseTimers/Blueprints/index.html) However it left issues with the health bar display.

(comments are locked)
10|2000 characters needed characters left
Your answer
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