Third-Person Time between attacks

OK so umm… there’s something interesting here that makes combat pretty much impossible to an extent, and that’s the time between attacks

Before transitioning from point-and-click to third person, we had a variable called ‘time between attacks’ that would take care of giving the enemy a bit of idle time before proceeding with the next attack

The new third person system does not integrate that, so here’s my question:

How do we integrate time between attacks between attack animations? I was debating between adding one per attack animation, or one on the weapon itself, and I think I’ll go per-animation, to make this customizable (so it will go on the ‘Attack.cs’ scriptable object, or at least the value tuning can be expected to be done there)

If we can integrate that, that would be amazing. The reason I want this in, is to give the player an opportunity to actually attack the enemy back and have a fair fight. What good is a fight if you keep getting bashed with no window to fight back, approach or evade your enemy…?

Putting a delay in Enemy Attack State would probably work. However, this kind of fine tuning should wait until the rest of the combat system is in place. The next section is knockback. This might have an impact (pun intended) on how the combat flows.

1 Like

the only person who knows if this would be affected soon, later or never at all, is Brian. He’s the only one developing this system (or at least I assumed that), and he’s the only one who can tell us if this kind of combat delay will be integrated or not (at this point in time, I’m wondering how long will it take before combat is done). If so, then I shall wait. If not, we can get this question running :stuck_out_tongue_winking_eye:

That’s why I am working on converting the Ui now. I am waiting patiently until the merge tutorial is done.

wait, where are you learning to convert the UI from? I was lowkey thinking of buying GAIA (although idk which version to buy, since I can’t actually move forward from Unity 2021 LTS without severely damaging my project, and to me $289 is just WAY TOO MUCH right now) and working on the game environment instead… might work on the UI as well though, as to me it’s a painstakingly boring process that needs to get done anyway

I am doing it on my own. I asked Brian for some general advice, but I don’t want a step by step tutorial. Time to see if I am really learning anything. I did the UI Toolkit class. It was a good start. Now I am going to make some mock UI in a test project to get better before I tackle the inventory from the RPG.

1 Like

you got this man, all the best :slight_smile: - I’m dead focused on improving the code to come up with better results for now

I’ll just write this here for personal documentation (as I was fixing some of my unexpected animation issues), until a player running state is available (for when he hits the left shift button):

  • if you want your player to run in the game, set his movement speed in ‘PlayerStateMachine.cs’ to 6, and then go and double his ‘Unarmed’, ‘SwordAndShield’, ‘GreatSword’,etc (FreeLookState State Machine Blend Trees)… thresholds to 0, 0.5, 1 instead of 0,1,2 (which are for walking…)
1 Like

Attack throttling will be handled in a later section, although as @edc237 pointed out, a little bit of throttling will be handled by Knockback.

Throttling will be managed by a cooldown class, which will take the information from the Weapon for attack speed (but could be taken from the Attack as well) and initiate a Cooldown in the Cooldown class, and then the EnemyChaseState will consult the Cooldown class before allowing an attack.

1 Like

Lol we’re nowhere near almost done with this series, are we…?

At least is damage and knock back arriving soon?

Damage is already there.
Knockback hopefully this weekend (well, Saturday, if it’s not up by then, I’m likely not even answering questions on Sunday, the Superbowl is a national holiday)

2 Likes

enjoy your holidays :slight_smile: - will definitely be waiting for the updates as well about that

By the way, regarding the range and magic attack system, do you have any ideas if there will be a huge overhaul or just minor changes?

I know this is a bit of a fancy addon rather than an essential one, but I was mainly concerned because… well… I want a third camera that goes over the players’ shoulder when he’s aiming from a distance with a ranged or magic weapon

That’s going to be out of scope… But Nathan did explain thoroughly how the StateDrivenCamera works…

fair enough, I’ll check it out soon again… how about this one?

I’m still working on that. When in PlayerTargetingState, it’s fairly straightforward, as you’ve got a target… in FreelookState, I’m not sure at all the best way of dealing with it.

I got a fun idea… why not eliminate the targeting state for ranged and magic attacks? Instead, when you right click your mouse, you aim, and left click fires the arrow to where you aimed it. Makes life significantly easier for the players, and that does matter (the reason I have the targeting state, is mainly because melee attacks can miss some important hits, and in that case it’s essential, but I think it makes perfect sense for ranged and magic attacks to miss distant hits)

Privacy & Terms