733 |
733 |
734 <b>Examples:</b> |
734 <b>Examples:</b> |
735 |
735 |
736 <code lang="lua"> |
736 <code lang="lua"> |
737 -- will automatically change the health icon to a star |
737 -- will automatically change the health icon to a star |
738 SendStat('siGraphTitle','Custom Graph Title') |
738 SendStat(siGraphTitle,'Custom Graph Title') |
739 SendStat('siGameResult','Winner is Team A!') |
739 SendStat(siGameResult,'Winner is Team A!') |
740 SendStat('siCustomAchievement','This is a custom mesasge posted in the Details section!') |
740 SendStat(siCustomAchievement,'This is a custom mesasge posted in the Details section!') |
741 -- Changes the word kill to Point, call it just before sending kills/score for each hog |
741 -- Changes the word kill to Point, call it just before sending kills/score for each hog |
742 -- in case you want to change the word i.e. print Point or Points |
742 -- in case you want to change the word i.e. print Point or Points |
743 SendStat('siPointType','Point') |
743 SendStat(siPointType,'Point') |
744 -- if above function call was not used it will print 3 kills for teamName in Ranking section. |
744 -- if above function call was not used it will print 3 kills for teamName in Ranking section. |
745 -- if it was used it will print 3 Point for teamName in Ranking section. |
745 -- if it was used it will print 3 Point for teamName in Ranking section. |
746 SendStat('siPlayerKills','3',teamName) |
746 SendStat(siPlayerKills,'3',teamName) |
747 -- call siClanHealth to send the "value" of a clan that will be used for the graph creation |
747 -- call siClanHealth to send the "value" of a clan that will be used for the graph creation |
748 -- a good idea is to call it always for every hog by using the runOnGears(function) |
748 -- a good idea is to call it always for every hog by using the runOnGears(function) |
749 -- in normal mode "value" represents clan health |
749 -- in normal mode "value" represents clan health |
750 SendStat('siClanHealth', "100",teamName) |
750 SendStat(siClanHealth, "100",teamName) |
751 -- most hedgehogs killed in a round (hedgeHogName is who killed them) |
751 -- most hedgehogs killed in a round (hedgeHogName is who killed them) |
752 SendStat('siMaxStepKills', "1 hedgeHogName (teamName)") |
752 SendStat(siMaxStepKills, "1 hedgeHogName (teamName)") |
753 -- hog with most damage inflicted to his own team |
753 -- hog with most damage inflicted to his own team |
754 SendStat('siMaxTeamDamage', "100 hedgeHogName") |
754 SendStat(siMaxTeamDamage, "100 hedgeHogName") |
755 -- total number of killed hedgehogs |
755 -- total number of killed hedgehogs |
756 SendStat('siKilledHHs', "1") |
756 SendStat(siKilledHHs, "1") |
757 -- increases the wins of local teams in case the given number is greater than 0 |
757 -- increases the wins of local teams in case the given number is greater than 0 |
758 SendStat('siTeamStats', "teamName:0:") |
758 SendStat(siTeamStats, "teamName:0:") |
759 -- best shot award |
759 -- best shot award |
760 SendStat('siMaxStepDamage', "30 hedgeHogName (teamName)") |
760 SendStat(siMaxStepDamage, "30 hedgeHogName (teamName)") |
761 -- team with most kills of own hedgehogs |
761 -- team with most kills of own hedgehogs |
762 SendStat('siMaxStepDamage', "2 teamName") |
762 SendStat(siMaxStepDamage, "2 teamName") |
763 -- team with most skips |
763 -- team with most skips |
764 SendStat('siMaxTurnSkips', "3 teamName") |
764 SendStat(siMaxTurnSkips, "3 teamName") |
765 </code> |
765 </code> |
766 |
766 |
767 <b>Important:</b> |
767 <b>Important:</b> |
768 |
768 |
769 * As the game engine send stats to the front end at the end of the game one should send her stats when the game is going to finish and right before the call of EndGame(). (Note: Stats are sent from the engine in CheckForWin. If conditions are met(win or draw) then SendStats(uStats) is called.) |
769 * As the game engine send stats to the front end at the end of the game one should send her stats when the game is going to finish and right before the call of EndGame(). (Note: Stats are sent from the engine in CheckForWin. If conditions are met(win or draw) then SendStats(uStats) is called.) |