Hello there. I will need help with a project of mine in Unity 3D. I am working with 3Ds max and Blender, but examples for either of them will be OK.
My project is a hack and slash game with some MMO elements where you can make your own custom class. I have few direction where it can go from there but I want to finish and polish the key features (combat in particular) first and test if they work before I make my final decision for implementation.
What I need in particular is to know how to make a fluid combat system for hack and slash game that is based of Severance Blade Of Darkness, with some dynamic abilities with effective range indicators in the stile of WildStar. I’ve never done something like that, but I know the basics of animation. What I don’t know is how to connect the animated moves and effects to properties such as collisions with other objects, object destruction and key bindings.
I searched for related material but didn’t find what I needed in particular probably because I don’t know where to look, so can someone point me to the right source or straight off tell me how to do them. What I need is in particular will be:
-
To know how can I make so that an attack animation is connected with a combination of keys like “S + D + Q = attack07”
-
How to attach a collision box to a model (if it is possible) so I don’t have to move it together with the object at every frame of the animation.
-
How to make the connection of that collision to affect other objects as well (when hitting a blade they bounce from each other, hitting a shield destroys, cutting off your attacker’s hand then picking it up and beating him down with it and etc.)
-
How to make the affective range indicators of the abilities, visible for both you and your opponent.
My end goal will be a hack and slash game with fluid combat consisting of two parts, one are various combos and other with abilities. Think of it as a MMO mortal combat game with weapons and spells. you have the fighting element in the various attacks you can execute and then you have the MMO element with your ability set.
Any further guidance will be much appreciated !
You’re asking some pretty advanced stuff, in combination with some very basic stuff. I think you should just trust us that everything you want to do is doable, and then start learning Unity step by step. There is a “Learn” link at the top of the page that you should definitely spend a month or two working through, if you haven’t already.
Some quick answers that will probably make more sense to you later…
- That depends on what those keys do individually. Probably they do different attacks, right? So you’ll need to define a state machine (probably using the Animator) that starts doing one thing when each of those is pressed, and then when a second key is pressed within a certain amount of time, switches to the combo. And if you really want to inflict three-key combos on your users, then the two-key combo state will need to check for the third key, and switch to the attack07 combo when that’s detected.
- This one is easy. You just add BoxColliders (or other kinds of colliders) to your model. This tutorial may help.
- Using the OnCollisionEnter and OnTriggerEnter callbacks, your scripts can detect when a collision occurs, and then do stuff about it. You’re asking about a lot of different stuff you might do here; those should be broken into separate questions when you get to that point.
- I don’t understand what this one means.
It’s all doable; just be patient and focus for now on leveling up your Unity skills. Build a bunch of simpler games along the way, and work up to your masterpiece in a year or two. The awesomeness will be worth the wait!
Thanks for the info, now I atleast have a starting point. The number four means that when you cast ability you see it’s range, area of effect and etc (depends on the ability) expanding, moving and so on. Now I will give a detailed example of all the cases it will be used it and the types of spells, because there are also future questions in those examples as well and it is sortta hitting two birds with one HUGE rock.
Keep in mind that what I am listing are things that both you and your enemy can see and sorry if it’s too long to read there is a TL;DR version after it.
Example 1: You start casting fire ball with a total cast of 3 seconds and as you cast it you have an indicator with it’s max range and another with it’s current range that grows to the maximum as you cast it. If you interrupt the cast you will fire your projectile at the range it currently has reached.
Example 2: You use say “Thunder storm” that makes lightning strike the ground around the caster. The spell indicates where it will land and if it’s range grow with time.
Example 3: Say you have ability that changes it’s properties the longer you held it’s key. You hold it one second it is a close range attack you hold it two seconds it is ranged projectile and if you hold it three seconds it is an AeO ranged attack. Through all those phases it’s indicators changes fluently as you continue casting.
TL;DR
The main types of spells can be put into three groups. The first is projectile based spells the second are ground targeted spells that either fall from the sky or appear from the ground and the third are lock on spells, but I know how to do those.
As far as the indicators go the must be able to reflect correctly thing like where will the ability land, it’s travel path, it’s radius and it;s range.
Now I know that what I listed is a lot of work, but my current schedule for the month is making a basic character who can run jump and swing with a sword and some simple environment. From there on I will probably go more in depth with the collisions, but it’s slow and steady for me. Right now I do more coding learning rather then anything else, because I sure will need a lot of that.
Tanks for the quick reply, take care !