beat you to it
void HandleAttackButtonPressed()
{
// This function is a generic option, which gets the player to detect what he sees around him, and based on that,
// he can interact with the environment automatically, based on what he finds
// Uncomment the statement below if you want the player to be able to fight out of combat mode:
/* if (stateMachine.Targeter.HasTargets)
{
stateMachine.SwitchState(new PlayerAttackingState(stateMachine, 0));
return;
} */
if (stateMachine.PickupFinder.HasTargets)
{
InputReader_HandlePickupEvent();
if (stateMachine.PickupFinder.CurrentTarget) return;
}
if (stateMachine.ConversantFinder.HasTargets)
{
InputReader_HandleDialogueEvent();
if (stateMachine.ConversantFinder.CurrentTarget) return;
}
if (stateMachine.ShopFinder.HasTargets)
{
InputReader_HandleShopEvent();
if (stateMachine.ShopFinder.CurrentTarget) return;
}
// Uncomment the statement below if you want the player to be able to fight out of combat mode:
// stateMachine.SwitchState(new PlayerAttackingState(stateMachine, 0));
}
as for the action map, yes this one is an easy change I suppose… just create a new button in the action map itself, add it to your ‘InputReader.cs’ and then change the syntax in the function I just wrote above
my worry is, which parts of the code do we flush out to polish that system? (I’ll give this some time, once I understand why in the world is the EBS Saving system failing right now…?!)