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"

Witcher 3 esk combat system

Hey!, I'm trying to make a combat system for an rpg with attacking, blocking but I've had no luck finding any tutorials can someone please help me make a combat system in blueprint or at least show me a tutorial or documents for something similar.

Thanks a lot.

Product Version: UE 4.8
more ▼

asked Jul 05 '15 at 07:40 AM in Blueprint Scripting

avatar image

22 14 12 15

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

1 answer: sort voted first

thats a complicated question, you should probably break the problem down a bit more into parts that you want to learn.

first, make a character perform an animation on command: https://answers.unrealengine.com/questions/24180/how-do-i-add-a-simple-melee-attack-animation-to-my.html

then, make collision box components that deal damage: each attack can set the relative location and box extent of your hit box, as well as setCollisionEnabled to toggle whether it registers hits, and on overlap, you can apply damage to the actor, or you can call an interface function that tells the actor that they were hit. in the actor that was hit, in the definition of their interface event, you can check if they are blocking with a boolean or by checking what state they are in.

you will want to make some kind of state machine to keep track of what state the characters are in. you can use an enum or a name to keep track of this in the event graph, or you can use a skeletal mesh state machine graph.

when dealing damage, you may want to calculate the damage based on player stats and formulas. something like player level multiplied by weapon damage minus enemy level multiplied by enemy armor defense.

some attacks will be upper body attacks, full body attacks, root motion attacks, or they may even trigger their own cutscene.

then there are combo systems (anim notifies + state machine), lock on targeting (vector math, using dot product to set closest enemy reference, rotating camera/player orientation), sound effects (anim notifies, play sound at location), camera animations, UI(widget components for health bar and damage toast), item drops (on destroy, spawn physics pickup), ragdolling enemies (simulatePhysics), particle effects, etc...

more ▼

answered Jul 05 '15 at 01:47 PM

avatar image

9.6k 320 205 450

avatar image mojachiee Jul 05 '15 at 06:20 PM

Thanks awesome, seems pretty clear and pretty straight forward ill give it ago.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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