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"

Creating Button Combos

Hello, I am creating a combat system and need some help on an aspect of it, I have a basic attack but I also want an Attack Combo, for instance, if I left click one it does one attack animation, If I Left Click twice it plays two attack animations and If I click three times it plays 3 combat animations.

Product Version: UE 4.19
Tags:
more ▼

asked Jul 12 '18 at 06:44 PM in Blueprint Scripting

avatar image

Mrminecraftwizz1
54 3 2 5

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

1 answer: sort voted first

The way I do it is I have an int comboCount to keep track of what hit I'm on, a bool isCombo to check if we should combo and a bool isAttacking to keep track if I'm attacking at the moment or not. On left click I check if I'm already attacking if we're already attacking it just sets isCombo to true, if not I increment the comboCount by 1 (we're doing the first combo) and play the animation montage for the first attack. In the animation montage I have 2 notifies, one in the end (reset) for resetting the attack variables (it sets comboCount to 0 and isCombo + isAttacking to false) and another notify (combo) earlier which calls the combo event which increased the comboCount by 1, sets isCombo to false and depending on the value of comboCount plays a different animation (or doesn't play if we've reached 4 combo since my combos are 4 hit ones) and of course each animation has the notifies for combo and reset (combo notify is where the next animation will start playing, reset notify is where the combo will stop if reached basically in the end of the animation).

I would send a screenshot of the blueprint but I don't have access to the project at the moment if you don't understand it you can download the free Shinbi paragon model from the marketplace it comes with a combo setup like that as an example and there is this youtube tutorial which covers the basically same system - https://www.youtube.com/watch?v=wgU_RjaVsI0

more ▼

answered Jul 12 '18 at 07:09 PM

avatar image

Enjobg
121 1 3 5

avatar image Mrminecraftwizz1 Jul 12 '18 at 08:48 PM

Thank you for the answer, I'll test out both solutions in separate projects to see which one fits my needs and can expand with.

(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