03-03-2008, 01:53 AM | #41 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Oops. Add this at the top:
Code:
playerStateTable = {} Edited the other post with this change.
__________________
#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-03-2008, 06:20 PM | #42 |
Join Date: Mar 2007
Posts Rated Helpful 0 Times
|
Great work on the auto restock squeek, love it. Can see it being used it alot of future skills maps.
|
|
03-03-2008, 08:48 PM | #43 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
any luck with the gas for rock2?
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
03-03-2008, 08:53 PM | #44 | |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
How much damage per second? Length? Etc?
__________________
#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-03-2008, 09:15 PM | #45 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
um...i dont want it to be instant, once capped count down from 10(with visual countdown on screen), then the gas comes and once it starts i want it to start hurting ppl, then after 2/3 seconds i want them dead. so you can set the damage how ever you want over the period of 2/3 seconds. then i want the gas to fade out.
this is assuming that it is possible.
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
03-03-2008, 09:19 PM | #46 | |
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-05-2008, 07:44 AM | #47 |
Join Date: Mar 2007
Posts Rated Helpful 0 Times
|
Dear LUD's!
I got 2 problems I can't seem to figure out with the quad lua: 1. How do I know when a player goes spectator? function player_spawn( player_entity ) doesnt work for that as you don't "spawn" as spectator. Is there a forward to see when someone changes to spectator? I need it to remove the custom quad hud icon for specs. 2. The hud icon use a vtf and a vmt file but I can't get them to upload to the clients. The res file looks like this: Code:
"resources" { "maps/conc_adam.bsp" "file" "maps/conc_adam.txt" "file" "maps/conc_adam.lua" "file" "materials/vgui/hud_quad.vtf" "file" "materials/vgui/hud_quad.vmt" "file" } I know, maybe I should pick another folder than materials/vgui as thats the main mod folder. I will change that. How do you precache custom content like this? base_quad.lua Code:
-- base_quad.lua ---------------------------------------------------------------------- -- Quad icon ---------------------------------------------------------------------- hudicon = "hud_quad" hudx = 5 hudy = 110 hudw = 48 hudh = 48 huda = 1 hudstatusicon = "hud_quad.vtf" ---------------------------------------------------------------------- -- Set hud icon at spawn ---------------------------------------------------------------------- function player_spawn( player_entity ) local player = CastToPlayer( player_entity ) local class = player:GetClass() if class == Player.kSoldier or class == Player.kDemoman then if player:GetTeamId() ~= Team.kRed then RemoveHudItem( player, hudstatusicon ) else AddHudIcon(player, hudicon, hudstatusicon, hudx, hudy, hudw, hudh, huda) end else RemoveHudItem( player, hudstatusicon ) end end ---------------------------------------------------------------------- -- Set quad and invul when damage is taken by soldier and demoman -- on red team ---------------------------------------------------------------------- function player_ondamage( player, damageinfo ) if player:GetTeamId() ~= Team.kRed then return end local class = player:GetClass() if class == Player.kSoldier or class == Player.kDemoman then local damageforce = damageinfo:GetDamageForce() damageinfo:SetDamageForce(Vector( damageforce.x * 4, damageforce.y * 4, damageforce.z * 4)) damageinfo:SetDamage( 0 ) end end |
|
03-06-2008, 11:28 PM | #48 |
D&A Member
Wiki Team Fortress Forever Staff Join Date: Apr 2007
Posts Rated Helpful 31 Times
|
1. try function player_switchteam (player_entity, curteam, newteam)
You'll have to find out which value stands for spectator (my guess would be 4) and test newteam for that value. There might be problems if the player tries to change to spectator but can't (like if the server won't allow it), so look out for that. 2. Have you tried using bspzip instead? |
|
03-07-2008, 05:34 AM | #49 |
Join Date: Mar 2007
Posts Rated Helpful 0 Times
|
Thx Crazycarl. I'll test player_switchteam.
The problem with precaching was simple: Just add the damn files you want to upload to the server . I was so sure they where there, but I had them on a test server, not the main pub server. Ok, Muleh, time for a comment I think :P Last edited by Lt Llama; 03-07-2008 at 06:39 AM. |
|
12-31-2009, 05:35 AM | #50 |
AKA LittleAndroidMan
D&A Member
Beta Tester Join Date: Sep 2007
Location: Dystopia
Class/Position: Demo/Medic Gametype: CTF Affiliations: [TALOS] [SR] Posts Rated Helpful 11 Times
|
I need a way to instantly return the flag after it hits an ff_trigger. Brownies to whoever can help, this is the last thing I need to release my map!
__________________
|
|
12-31-2009, 05:40 AM | #51 |
AKA LittleAndroidMan
D&A Member
Beta Tester Join Date: Sep 2007
Location: Dystopia
Class/Position: Demo/Medic Gametype: CTF Affiliations: [TALOS] [SR] Posts Rated Helpful 11 Times
|
And yea, I necro'd a nearly 2 year old thread. Whatcha gonna do?
__________________
|
|
12-31-2009, 06:32 AM | #52 | |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
Having info_ff_scripts trigger triggers is something that has always been planned but never actually done. Not really sure of its status now. If you're really crazy, you can do something like check the flag's origin every x seconds to see if it is in some specific bounds, but, yeah, triggers will just ignore the flag.
__________________
#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-31-2009 at 06:33 AM. |
|
|
12-31-2009, 06:34 AM | #53 |
AKA LittleAndroidMan
D&A Member
Beta Tester Join Date: Sep 2007
Location: Dystopia
Class/Position: Demo/Medic Gametype: CTF Affiliations: [TALOS] [SR] Posts Rated Helpful 11 Times
|
Damn
__________________
|
|
12-31-2009, 06:42 AM | #54 |
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
|
lmfao!!
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf (Beta) alchimy_b1 (Lua) base_payload_2015 (Models) props_trainyard |
|
12-31-2009, 06:44 AM | #55 |
AKA LittleAndroidMan
D&A Member
Beta Tester Join Date: Sep 2007
Location: Dystopia
Class/Position: Demo/Medic Gametype: CTF Affiliations: [TALOS] [SR] Posts Rated Helpful 11 Times
|
Ok, well now I have another problem.
I added the remove_projectile lua from this thread to my lua, and it breaks my lua for some reason. It allows me to select a team, but now there's 4 teams instead of 2, and all the class choices are blacked out. Just like when you load up a map with no game type in the lua. All I have in there is base_ctf lua, and then the SetVelocity lua you gave me for my ramps. Code:
IncludeScript("base_ctf"); ------------------------------------------ -- jump triggers ------------------------------------------ base_jump = trigger_ff_script:new({ pushx = 0, pushy = 0, pushz = 0 }) -- push people when they touch the trigger function base_jump:ontouch( trigger_entity ) if IsPlayer( trigger_entity ) then local player = CastToPlayer( trigger_entity ) player:SetVelocity( Vector( self.pushx, self.pushy, self.pushz ) ) end end -- blueside red ramp rredjump = base_jump:new({ pushx = -1500, pushy = -1500, pushz = 0 }) --blueside blue ramp rbluejump = base_jump:new({ pushx = 1500, pushy = 1500, pushz = 0 }) --redside red ramp lbluejump = base_jump:new({ pushx = -1500, pushy = 1500, pushz = 0 }) --redside blue ramp lredjump = base_jump:new({ pushx = 1500, pushy = -1500, pushz = 0 }) ------------------------------------------ -- remove projectiles (Thanks squeek) -- http://forums.fortress-forever.com/showthread.php?t=19904 ------------------------------------------ remove_projectiles = trigger_ff_script:new({ }) function remove_projectiles:allowed(allowed_entity) if IsNotProjectile(allowed_entity) then return false end return true end function IsNotProjectile( allowed_entity ) return IsPlayer(allowed_entity) || IsGrenade(allowed_entity) || IsTurret(allowed_entity) || IsDispenser(allowed_entity) || IsSentrygun(allowed_entity) || IsDetpack(allowed_entity) end
__________________
|
|
12-31-2009, 06:46 AM | #56 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
"||" is not an operator in lua. It's "or".
Code:
function IsNotProjectile( allowed_entity ) return IsPlayer(allowed_entity) or IsGrenade(allowed_entity) or IsTurret(allowed_entity) or IsDispenser(allowed_entity) or IsSentrygun(allowed_entity) or IsDetpack(allowed_entity) 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 |
|
12-31-2009, 06:48 AM | #57 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Also, the console will report lua errors (if you're on a local server). If the 4-teams-of-death show up, the console will almost always have some sort of lua error near where it loads the lua files.
__________________
#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-31-2009 at 06:48 AM. |
|
12-31-2009, 06:51 AM | #58 |
AKA LittleAndroidMan
D&A Member
Beta Tester Join Date: Sep 2007
Location: Dystopia
Class/Position: Demo/Medic Gametype: CTF Affiliations: [TALOS] [SR] Posts Rated Helpful 11 Times
|
Works perfectly, thanks!
__________________
|
|
03-29-2010, 06:26 PM | #59 |
Join Date: Sep 2007
Posts Rated Helpful 2 Times
|
Hello.
This is for K_thehame, Classic TFC escape style map. Ive been testing the map.By my self.As i fiinish the map.All the respawns have worked perfect. But when i uploaded the map on to the public server.And tested with a few players.The respawns went random. So i changed a few things.But the outcome is the same. When 1 player joins.The respawns work fine.If more then 2 players join the respawns go random. It seems the initialspawn spawn.Is the one causing the problems. When players join the map.They respawn in a room.Where theres an interigation.For about 62 seconds.Then all players automaticly respawn to the next room.Wich is dungen/holdingroom.Where the game begins. TRIGGERS: In the interrogation room,I have The ff_script trigger called waypoint.Which is set as disabled.And a Trigger _once. When a player joins.They trigger the Trigger_once.Which triggers the logic_timmer1.Once the logic_timmer kicks in.It plays the sounds/lights and Enables The ff_script called waypoint.And enables logic_timmer2. Once logic_timmer2 kickes in.It plays the next effects sounds/lights. Then All players should respawn to the dungen.Where the respawns are called spawn1. In the interrogation room.The respawns are called initialspawn. LOGIC_TIMMER: In the interrogation room I have 2 logic_timmers. loggic_timmer1 and logic_timmer2. Also In the interrogation room.I have a playerclip brush.Holding the players from moving. Again when 1 player joins.Everything works fine.Only when 2 or more players join.Do the respawns go random. Heres the lua.file -- ff_k_thegameb2.lua ----------------------------------------------------------------------------- -- includes ----------------------------------------------------------------------------- IncludeScript("base_teamplay"); IncludeScript("base_location"); IncludeScript("base_respawnturret") ----------------------------------------------------------------------------- -- global overrides ----------------------------------------------------------------------------- function startup() --62 seconds in the interrogation room! AddSchedule("breakout", 62, setBreakoutSpawn) -- set up team names SetTeamName( Team.kBlue, "NONE" ) SetTeamName( Team.kRed, "NONE" ) SetTeamName( Team.kYellow, "NONE" ) SetTeamName( Team.kGreen, "SPYS" ) -- set up team limits SetPlayerLimit( Team.kBlue, -1 ) -- NONE. SetPlayerLimit( Team.kRed, -1 ) -- NONE. SetPlayerLimit( Team.kYellow, -1 ) -- NONE. SetPlayerLimit( Team.kGreen, 0 ) -- THE SPYS HAVE TO ESCAPE. team = GetTeam( Team.kGreen ) team:SetClassLimit( Player.kScout, -1 ) team:SetClassLimit( Player.kSniper, -1 ) team:SetClassLimit( Player.kSoldier, -1 ) team:SetClassLimit( Player.kDemoman, -1 ) team:SetClassLimit( Player.kMedic, -1 ) team:SetClassLimit( Player.kHwguy, -1 ) team:SetClassLimit( Player.kPyro, -1 ) team:SetClassLimit( Player.kSpy, -1 ) team:SetClassLimit( Player.kEngineer, -1 ) team:SetClassLimit( Player.kCivilian, 0 ) end -- first we need a global variable spawnnumber = 0 --then you create a type of spawn point. --The entity must have the same name in Hammer. initialspawn = info_ff_teamspawn:new({ num = 0 }) spawn1 = initialspawn:new({ num = 1 }) spawn2 = initialspawn:new({ num = 2 }) spawn3 = initialspawn:new({ num = 3 }) spawn4 = initialspawn:new({ num = 4 }) -- keep going sequencially --spawn# = initialspawn:new({ num = # }) --then create the logic to decide who can spawn there function initialspawn:validspawn(spawn, player) local num = self.num if spawnnumber == num then return true else return false end end -- finally we need a trigger to change the global --Make SURE players can't touch any waypoint they've passed before. waypoint = trigger_ff_script:new ({}) function waypointntouch( touch_entity ) if IsPlayer( touch_entity ) then -- change the global spawnnumber local num = spawnnumber local nextnum = num + 1 spawnnumber = nextnum ApplyToAll({AT.kRespawnPlayers}) end end -- finally we need a trigger to change the global --Make SURE players can't touch any waypoint they've passed before. waypoint2 = trigger_ff_script:new ({}) function waypoint2ntouch( touch_entity ) if IsPlayer( touch_entity ) then -- change the global spawnnumber local num = spawnnumber local nextnum = num + 1 spawnnumber = nextnum end end -- finally we need a trigger to change the global --Make SURE players can't touch any waypoint they've passed before. waypoint3 = trigger_ff_script:new ({}) function waypoint3ntouch( touch_entity ) if IsPlayer( touch_entity ) then -- change the global spawnnumber local num = spawnnumber local nextnum = num + 1 spawnnumber = nextnum end end -- finally we need a trigger to change the global --Make SURE players can't touch any waypoint they've passed before. waypoint4 = trigger_ff_script:new ({}) function waypoint4ntouch( touch_entity ) if IsPlayer( touch_entity ) then -- change the global spawnnumber local num = spawnnumber local nextnum = num + 1 spawnnumber = nextnum ApplyToAll({AT.kRespawnPlayers}) end end The map is 99% done. Just need to fix this respawn issue. Thanks. Last edited by VEXEMP; 03-29-2010 at 06:33 PM. |
|
03-30-2010, 12:06 AM | #60 | |||
D&A Member
Wiki Team Fortress Forever Staff Join Date: Apr 2007
Posts Rated Helpful 31 Times
|
Quote:
Also, instead of Quote:
Quote:
|
|||
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|