Team Classes

OK I’m scripting one of those "BossFight game modes. It has two teams so far. (the boss, and the players) I have it scripted so that a random player is chosen as the boss every round, but I would like to know how to edit a class per team only. For example, if you were on the “players” team, you would have 100 health, and normal movespeed, spawning with an SMG for example. But if you were on the “boss” team (as in you ARE the boss) then you would start with 2000 health and a “super crowbar”. How would I be able to achieve that? Please help.

You need to use the wiki a lot more, everything is there.

function GM:PlayerSpawn(pl)

if pl:Team() == TEAM_BOSS then


elseif pl:Team() == TEAM_PLAYER then





the wiki? That wiki doesn’t ever help me.

How come it doesn’t help you? Everything is located there.

No no, I understand the basics of Lua (functions, statements, etc.) but the I cannot find any practical tutorials there.

The functions are documented though, it’s easy to tell that you’re wanting the boss to start the round stronger, and deal more damage. Those two hooks would be PlayerSpawn (shown above), and ScalePlayerDamage ( ) unless you do have an actual super crowbar swep