Data Realms Fan Forums
http://45.55.195.193/

Function for which team I'm on.
http://45.55.195.193/viewtopic.php?f=73&t=21589
Page 1 of 1

Author:  Roast Veg [ Fri Feb 25, 2011 8:00 pm ]
Post subject:  Re: Function for which team I'm on.

self.Team is a number, normally within but not restricted to 1-4. These relate directly to the team colour.
Code:
function Update(self)
    if self.Team == 1 then
        print("Ouch! That's gotta hurt!")
    elseif self.Team == 2 then
        print("Ooh! They went there!")
    elseif self.Team == 3 then
        print("No way! That was unexpected!")
    elseif self.Team == 4 then
        print("Well, now we know how NOT to do it.")
    else
        print("Another one bites the dust!")
    end
end

Author:  Abdul Alhazred [ Sat Feb 26, 2011 2:04 pm ]
Post subject:  Re: Function for which team I'm on.

The teams are actually numbered from 0 to 3, but for readability reasons it is better to use the following constants:
Code:
Activity.TEAM_1
Activity.TEAM_2
Activity.TEAM_3
Activity.TEAM_4

Author:  Roast Veg [ Sat Feb 26, 2011 6:37 pm ]
Post subject:  Re: Function for which team I'm on.

Yes it will.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/