We’re coming to the final two weeks of production on our project, “Soulshift” and we’ve made huge strides here all thanks to you helpful unity members. We’re now polishing our game before we present it to the industry professionals that will visit our school on our Industry night and we’re now trying to re-visit our combat system and trying to make it more stream-lined.
I was just wondering if there was any way that I could possibly queue user input, as our game is a Hack’n’Slash game. We currently have a 3-hit melee combo and we want to make it so that if user’s spam input. They character will do the 3 hit combo, wait slightly and then continue the combo again like normal, if the user continues to spam more input.
Is this difficult to achieve? Because, I’ve been looking into using the animation window so that I can call animation events in order to set controlled functions within our combat system, but it doesn’t seem to be the best way to make it work.
Any and all help would be appreciated! Please help us make this game the best it possibly can be. I’m thinking of making it a downloadable .exe for everyone to download and try once it’s complete. We would love to have feedback on what we accomplished and what we can possibly improve upon.
Definitely possible. Easy to implement as a queueueueue using List -
var queue : List.<String> = new List.<String>();
...
if ( Input.GetButtonDown("Attack") ) {
queue.Add( "Attack" );
}
...
switch case queue[0]:
case "Attack": ContinueCombo();
...
queue.RemoveAt(0); // removes the item at index zero and shifts the rest