02-26-2008, 12:56 AM | #21 |
How 'bout TEAM specific teleports? I'd like to have Forward and Reverse teams on my concmap and I canney understand how to do it in FF.
No specifics, generic terms can be used for tele destinations and such, I'd love a basic outline though EDIT: Said class specific lewlz ;x Last edited by TheWetMule; 02-26-2008 at 01:15 AM. |
|
|
02-26-2008, 01:00 AM | #22 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
use a "trigger_teleport"
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
02-26-2008, 01:10 AM | #23 |
Team/class specific, I need, not just one teleport for everybody
|
|
|
02-26-2008, 01:21 AM | #24 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Re: TheWetMule
Code:
specific_tele = info_ff_script:new({ class = Player.kCivilian, team = Team.kUnassigned }) function specific_tele:allowed( touch_entity ) if IsPlayer( touch_entity ) then local player = CastToPlayer( touch_entity ) return player:GetTeamId() == self.team and player:GetClass() == self.class end return EVENT_DISALLOWED end blue_scout_tele = specific_tele:new({ class = Player.kScout, team = Team.kBlue }) red_demo_tele = specific_tele:new({ class= Player.kDemoman, 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 |
|
02-26-2008, 01:22 AM | #25 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
your the man squeek, you will be the first one i let play rock2!
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
02-26-2008, 01:24 AM | #26 | |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
__________________
#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 |
|
|
02-26-2008, 01:25 AM | #27 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
8-ball what?
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
02-26-2008, 11:27 PM | #28 |
Me luv you long tiem squeek
|
|
|
02-27-2008, 01:29 AM | #29 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
2 dolla!
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
03-01-2008, 11:04 PM | #30 |
Right, decided to put that nifty piece of code to the test, just want to clear up that I'm doing everything right.
After I've done that, it should ONLY teleport blue scouts, not blue demomen or something? If so, it doesn't appear to be working! It teleports me regardless of class/team |
|
|
03-01-2008, 11:58 PM | #31 |
Join Date: Mar 2007
Posts Rated Helpful 0 Times
|
Code:
specific_tele = info_ff_script:new({}) function specific_tele:allowed( touch_entity ) if IsPlayer( touch_entity ) then local player = CastToPlayer( touch_entity ) return player:GetTeamId() == self.team end return EVENT_DISALLOWED end blue_tele = specific_tele:new({ team = Team.kBlue }) red_tele = specific_tele:new({ team = Team.kRed }) |
|
03-02-2008, 12:45 AM | #32 | |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
__________________
#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 |
|
|
03-02-2008, 01:10 AM | #33 |
No no, they worked seperately, just not together :P Don't worry, you did a grand job squeek.
EDIT: As in, scout teles only or team teles only, just not together. |
|
|
03-02-2008, 06:10 PM | #34 |
LOLDROUBLEPROAST
Anyway, got another one for you, is there a way to restock people ,constantly, no matter where they are without the use of mass trigger_ff_scripts :X? |
|
|
03-02-2008, 09:41 PM | #35 | |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
__________________
#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 |
|
|
03-02-2008, 10:05 PM | #36 |
Not to seem like I'm forcing you into slave labour, but is there a way to make rockets/pipes/grenades/concs effect only the person that dropped them/used them?
|
|
|
03-02-2008, 10:16 PM | #37 | |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
__________________
#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 |
|
|
03-02-2008, 11:10 PM | #38 | |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
Code:
function player_onconc(player_entity, effector_entity) if IsPlayer( player_entity ) and IsPlayer( effector_entity ) then local player = CastToPlayer( player_entity ) local playerEffector = CastToPlayer( effector_entity ) if player:GetId() == playerEffector:GetId() then return true end end return false end function player_ondamage( player, damageinfo ) -- Entity that is attacking local attacker = damageinfo:GetAttacker() -- If no attacker do nothing if not attacker then return end -- If attacker not a player do nothing if not IsPlayer(attacker) then return end local playerAttacker = CastToPlayer(attacker) -- If player is damaging self do nothing; else no damage/no push if player:GetId() == playerAttacker:GetId() then return else damageinfo:SetDamage(0) damageinfo:SetDamageForce(Vector( 0, 0, 0 )) end end
__________________
#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 |
|
|
03-02-2008, 11:32 PM | #39 | |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
Code:
AddScheduleRepeating( "Restock", RESTOCK_ITERATION_TIME, restock ) Code:
playerStateTable = {} RESTOCK_ITERATION_TIME = 1 function player_spawn( player_id ) local player = GetPlayer(player_id) -- Remove any players not on a team from table for playerx, recordx in pairs(playerStateTable) do ConsoleToAll("RECORD: "..playerStateTable[playerx].restock) local playert = GetPlayerByID( playerx ) if (playert:GetTeamId() ~= Team.kRed) and (playert:GetTeamId() ~= Team.kBlue) and (playert:GetTeamId() ~= Team.kGreen) and (playert:GetTeamId() ~= Team.kYellow) then playerStateTable[playerx] = nil end end -- add to table and set restock to 1 playerStateTable[player:GetId()] = {restock = 1} end function restock() for playerx, recordx in pairs(playerStateTable) do if playerStateTable[playerx].restock == 1 then local player = GetPlayerByID( playerx ) player:AddHealth( 400 ) player:AddArmor( 400 ) player:AddAmmo(Ammo.kCells, 400) player:AddAmmo(Ammo.kShells, 400) player:AddAmmo(Ammo.kNails, 400) player:AddAmmo(Ammo.kRockets, 400) player:AddAmmo(Ammo.kGren1, 400) player:AddAmmo(Ammo.kGren2, 400) end end end
__________________
#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.; 03-03-2008 at 02:54 AM. |
|
|
03-02-2008, 11:59 PM | #40 |
Wonderful, you're a genius Squeek, one little problem with the reload code though, I get the error
[SCRIPT] Error calling player_spawn ([string "maps\ddbbdd.lua"]:84: bad argument #1 to 'pairs' (table expected, got nil)) ent: NULL |
|
|
Currently Active Users Viewing This Thread: 3 (0 members and 3 guests) | |
|
|