Movement(validation) as a cross

Yes, that is important information. With this, everyone will have this cross. I used the ShootAction because movement isn’t exactly ‘kill’. Anyway, the easiest would be to create a new ShootAction and put that one on the players in that one team, instead of the existing ShootAction. But you don’t have to redo everything. You can have a derived ShootAction that will only have the changed stuff. You’d need to change GetValidActionGridPositionList to be virtual

public virtual List<GridPosition> GetValidActionGridPositionList(GridPosition unitGridPosition)
{
    // ... all the original code
}

Then create a new derived shoot action and override that method

public class CrossShootAction : ShootAction
{
    public override List<GridPosition> GetValidActionGridPositionList(GridPosition unitGridPosition)
    {
        // ... all the original code, but with the 'ignored diagonals' code included
    }
}

This new action should behave the same as the old one, but will not allow diagonal shooting. Replace the ShootAction on the relevant units with this new one

I just made an if to check if its the right team, Im not sure but I think I can copy it into the killing. And it worked or is there any big issues with doing this?

The „Shoot“-Action or as I called it killAction, Is ony for „The Killers“

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms