Issue with GameRules:SetGameWinner with custom team

edited January 2016 in Questions

Hi, there! I'm facing some issue with "GameRules:SetGameWinner" passing a custom team as argument (GamesRules:SetGameWinner(DOTA_TEAM_CUSTOM_1)). Instead of showing on screen the name of custom team, it shows "Dire victory!", which is weird (also, the camera goes to Radiant spot).

Just some info: - My game has three teams (goodguys, badguys and custom1); - There's no ancients in game. I have a special tower which, when two of them are destroyed, the remaining is the winner.

So, do you guys know what's happening?

Comments

  • Do you have all the same entities for the custom team as you have for radiant and dire?

  • edited January 2016 Posts: 3

    Try GameRules:SetCustomVictoryMessage()

    As for the camera view on victory, I haven't experimented with it at all, but it makes sense for the camera to go to the radiant spot upon dire victory since that's what happens in a regular game of dota - the camera shows the radiant ancient being destroyed upon dire winning.

    I'm not sure if this would work but I suggest putting in a PlayerResource:SetCameraTarget(playerid, hTarget) in the function that checks for victory conditions right before the SetGameWinner() method call and iterate through each player to force each of their cameras to lock on to the remaining tower (or whatever you wish to specify with the hTarget argument).