@markps: Hi there! In the update I’m currently working on it will be possible to add any number of factions and set them up as either allies or enemies. It will also be possible to specify whether a unit is player or AI controlled on an individual basis, making things like summoned units or mind control easy to implement. This is probably overkill for what you need, though, and having two player controlled warring factions (and no AI factions) is easy to add in the version currently on the marketplace. The general idea of how to implement this is to remove any branch of switch that checks if the current unit is AI controlled (since this should never happen) and to change any switch that checks the faction of a target unit so that it compares the faction to the faction of the current unit instead of naïvely assuming that the current unit is of the Player faction. Here are the specific modifications to make:
-
In ATBTT_GameMode simply skip the “Find Faction of Pawn” part of the event graph and set the default value of Player Turn to true:
-
Similarly skip the branch that checks whether Player Turn is true at the end of the event graph:
-
In ATBTT_PlayerController change both switches that check the faction of the target so that it is compared to the faction of the current unit:
- In Unit_Parent at the end of the event graph, skip the switch that checks the faction of the unit:
That should hopefully do the trick. It seems to work well based on my limited testing.
@Jopel: They say that if it is sloppy but works, it still works. I personally have a hard time living by that creed, though, as I often spend hours obsessing over making something as elegant, flexible and efficient as possible, while the same time could probably be spent developing new, cool features I don’t think you are far off the mark with your solution in any case. The only problem I can see is that it’s a bit awkward to manually specify the duration of your matinée every time you change it. I have not worked with matinée at all, actually, but I assume it should be possible to have the matinée automatically run an event when it is finished instead of using a delay. I do not know for sure, but I would be surprised if this was not the case.