Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 06-06-2011, 08:28 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

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.)
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:35 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.