12-08-2009, 03:41 PM | #1 |
Gets tickled by FF
Fortress Forever Staff
Join Date: Jun 2007
Location: UK
Class/Position: Med Solly HW Gametype: Any/CTF Posts Rated Helpful 41 Times
|
Team based push trigger
Did a quick search..
I want to push players based on team. I know its implemented somewhere already but can't find it. |
|
12-08-2009, 05:23 PM | #2 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Code:
team_only = trigger_ff_script:new({ team = Team.kUnassigned }) function team_only:allowed( allowed_entity ) if IsPlayer( allowed_entity ) then local player = CastToPlayer( allowed_entity ) -- return true if the player is on the right team return player:GetTeamId() == self.team end return EVENT_DISALLOWED end blue_only = team_only:new({ team = Team.kBlue }) red_only = team_only:new({ team = Team.kRed })
__________________
#FF.Pickup ¤ Fortress-Forever pickups My Non-official Maps Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic Beta FF_Myth - FF_Redlight_Greenlight Sick of the people on the internet, always moanin'. They just moan. - Karl Pilkington |
|
12-08-2009, 06:24 PM | #3 |
Gets tickled by FF
Fortress Forever Staff
Join Date: Jun 2007
Location: UK
Class/Position: Med Solly HW Gametype: Any/CTF Posts Rated Helpful 41 Times
|
okay but what line adds the push??
|
|
12-08-2009, 06:40 PM | #4 |
D&A Member
Wiki Team Fortress Forever Staff Join Date: Apr 2007
Posts Rated Helpful 31 Times
|
You define the push in the trigger_push's properties.
|
|
12-08-2009, 06:47 PM | #5 |
Gets tickled by FF
Fortress Forever Staff
Join Date: Jun 2007
Location: UK
Class/Position: Med Solly HW Gametype: Any/CTF Posts Rated Helpful 41 Times
|
so you still use the trigger push entity but name it "blue_only"? Despite "trigger_ff_script" in LUA code?
Some inherent casting of types or something? Things like that confuse me |
|
12-08-2009, 07:50 PM | #6 | |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
trigger_ff_script is used so that the :allowed() function can be used. Other than that, it's confusing. EDIT: By the way, this thread is a staff-fest.
__________________
#FF.Pickup ¤ Fortress-Forever pickups My Non-official Maps Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic Beta FF_Myth - FF_Redlight_Greenlight Sick of the people on the internet, always moanin'. They just moan. - Karl Pilkington Last edited by squeek.; 12-08-2009 at 07:51 PM. |
|
|
12-08-2009, 08:35 PM | #7 |
Who the fuck is this guy?
D&A Member
Beta Tester Join Date: Mar 2007
Class/Position: O Preferred Gametype: AvD Affiliations: [AE] Asseaters Posts Rated Helpful 2 Times
|
Combo breaker?
|
|
12-08-2009, 09:04 PM | #8 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Beta-fest.
__________________
#FF.Pickup ¤ Fortress-Forever pickups My Non-official Maps Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic Beta FF_Myth - FF_Redlight_Greenlight Sick of the people on the internet, always moanin'. They just moan. - Karl Pilkington |
|
12-08-2009, 09:27 PM | #9 |
Who the fuck is this guy?
D&A Member
Beta Tester Join Date: Mar 2007
Class/Position: O Preferred Gametype: AvD Affiliations: [AE] Asseaters Posts Rated Helpful 2 Times
|
Damn.
|
|
12-08-2009, 09:51 PM | #10 |
Wiki Team
Fortress Forever Staff Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly Gametype: PAYLOAD Affiliations: DET- Posts Rated Helpful 19 Times
|
lol should know better than to try and best squeek!
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf (Beta) alchimy_b1 (Lua) base_payload_2015 (Models) props_trainyard |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|