Ranking
Im not sure if it works, but its in the wiki:

check_winner
  • Called at the end of every frame to check for a winner
  • To signify that no condition was met, the callback should not return a value, or return 0 or nil
  • To signify that the game was won, the callback should return a table of the following values:
    • end_type: the type of winning condition (affects display on clients); can be one of the following: END_TYPE.END_SCORE, END_TYPE.END_DRAW, END_TYPE.END_DQ
    • winners: the index of the winner (0 for RED, 1 for BLUE)
    • losers: the index of the loser (0 for RED, 1 for BLUE)

:D
Originally Posted by Blam View Post
Im not sure if it works, but its in the wiki:

That doesn't seem to be implemented yet, it isn't in the startup.lua file. Also, I think it is supposed to be used by the server to that a server-side script can decide who wins, useful for mods like soccer where you would like the winner to be determined by if the shooter scores a goal or not (at the moment an admin has to manually /spec the loser).
Originally Posted by flamflim View Post
That doesn't seem to be implemented yet, it isn't in the startup.lua file. Also, I think it is supposed to be used by the server to that a server-side script can decide who wins, useful for mods like soccer where you would like the winner to be determined by if the shooter scores a goal or not (at the moment an admin has to manually /spec the loser).

the startup file is for hooks, this is a function.
And yes it is supposed to be a server side thingy, but so is end_game.

Also its /fspec for server admins :P
:D
That's a hook set up for a function. All in all, kinda useless...
Squad Squad Squad lead?
The standardization of Toribash Squad roles may have gone too far!
Originally Posted by Blam View Post
the startup file is for hooks, this is a function.
And yes it is supposed to be a server side thingy, but so is end_game.

end_game is listed under client events as well as server events on the wiki. check_winner is listed under server events in the wiki, so I don't think it is a function. I tested calling it and got an error message saying that such function exists.

Also its /fspec for server admins :P

Good point.
only client based scripts are allowed.
such as newbluck's lifebar script,
or saving a move using movesaver.
selling head textures for 50 tc finishes fast.i currently need 1500 tc for head avatar[not texture, avatar].