Can anyone advise the best way to calculate game score for sides for the script in the 1st post?
I have 2 sides fighting for 4 frontMarkers atm. Start with 2 markers per side.
I want the score counter increase score say every minute for each marker owned by side.
When marker changes from blue to red (there are triggers for this) we have to stop blue counter and start red counter for it, etc, etc.
Then total score per side is calculated as a sum of score at each marker / 10.
I know more or less how to do this via including this counter into onTickgame method but I would like to have it as a separate method (or class?) that can be called from onTrigger method for instance with stopScoreCounter(marker, army) and startScoreCounter(marker, army) or something like that. Unless it would be much more complicated than using inTickgame method.
I want to have more readable code than if it is split into existing methods (ontickgame, ontrigger, etc.)
|