02-25-2008, 02:41 AM | #1 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Lua Requests (Lua Assistance Division)
Make any and all lua scripting requests here, and the LADs will attempt to get it done.
__________________
#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-25-2008, 02:54 AM | #2 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
ok, heres a task. this is for rock2.
i have 2 triggers(for each team), one for wo entry(call it "wolight"[red/bluewolight]) and one for yard entry spotlight(call it "yardlight"[red/blueyardlight]). heres the thing, when a "disguised" enemy spy goes through the trigger i do NOT want it to light up, but for all other enemies i do. enough info? also, dunno how we're going to do it, but if you could get something rolling with the green gas effect via lua that'd be sweet.
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
02-25-2008, 03:16 AM | #3 |
Not choking. Yet.
Lua Team
Wiki Team Fortress Forever Staff Join Date: Jul 2007
Location: Scotland
Class/Position: Demo/Def - Spy/Off Gametype: Anything but yet more fucking CTF Affiliations: FF.AvD [FF AvD/ID guild] Posts Rated Helpful 0 Times
|
Code:
if player:GetDisguisedTeam == *whateverteam* then return end else light her up (whatever code you already have).... *whateverteam* really depends on the code you already have, I guess. If you have the team variable already picked out (which I guess you should seeing as the lights are team based, but meh) Without seeing the code you have, I can't really give you much more than that. But this should point you in the right direction, and if you post/send me the code I'd be happy to fit it in for you if you like. I'd also consider what would happen when a disguised and cloaked spy enters the base... would the situation be similar to SG's tracking in that instance? If so i can expand upon the code further.
__________________
Preferable to death. But only just...
|
|
02-25-2008, 03:16 AM | #4 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Re: GambiT
Code:
triggerlight = trigger_ff_script:new({ team = Team.kUnassigned }) function triggerlight:allowed( touch_entity ) if IsPlayer( touch_entity ) then local player = CastToPlayer( touch_entity ) if player:IsDisguised() == false then return player:GetTeamId() == self.team end end return EVENT_DISALLOWED end function triggerlight:ontouch( touch_entity ) if IsPlayer( touch_entity ) then OutputEvent( self.light, "TurnOn" ) end end function triggerlight:onendtouch( touch_entity ) if IsPlayer( touch_entity ) then OutputEvent( self.light, "TurnOff" ) end end blueyardlight = triggerlight:new({ team = Team.kBlue, light = "blueyardlight_light" }) bluewolight = triggerlight:new({ team = Team.kBlue, light = "bluewolight_light" }) redyardlight = triggerlight:new({ team = Team.kRed, light = "redyardlight_light" }) redwolight = triggerlight:new({ team = Team.kRed, light = "redwolight_light" })
__________________
#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-25-2008, 03:19 AM | #5 | |
Time Lord, Doctor
Beta Tester
Join Date: Dec 2007
Location: The TARDIS
Class/Position: Engineer Gametype: CTF Posts Rated Helpful 1 Times
|
Quote:
Code:
function respawndoor:allowed( allowed_entity ) if IsPlayer( allowed_entity ) then local player = CastToPlayer( allowed_entity ) if player:GetTeamId() == self.team then return EVENT_ALLOWED end if self.allowdisguised then if player:IsDisguised() and player:GetDisguisedTeam() == self.team then return EVENT_ALLOWED end end end return EVENT_DISALLOWED end |
|
|
02-25-2008, 03:19 AM | #6 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
lol, here....
Code:
IncludeScript("base_teamplay"); function startup() SetPlayerLimit( Team.kBlue, 0 ) SetPlayerLimit( Team.kRed, 0 ) SetPlayerLimit( Team.kYellow, -1 ) SetPlayerLimit( Team.kGreen, -1 ) end anyway, the spotlights i'm talking about are the ones that light up when the enemy comes into your yard and also the one for the wardens office entry. basically trigger the lights when an enemy comes through the trigger, but i dont want it to trigger the lights when the spy is disguised. maybe it's to soon to worry about this. but we do need to figure something out with the gas...
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
02-25-2008, 03:20 AM | #7 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
thanks ya'll, Squeek that looks like what i need.
appreciate it man!
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
02-25-2008, 03:21 AM | #8 |
Not choking. Yet.
Lua Team
Wiki Team Fortress Forever Staff Join Date: Jul 2007
Location: Scotland
Class/Position: Demo/Def - Spy/Off Gametype: Anything but yet more fucking CTF Affiliations: FF.AvD [FF AvD/ID guild] Posts Rated Helpful 0 Times
|
^^ boss showing off in front of the team...
Of course, your way would let spies in that are disguised as their own team Aside from that, I guess squeek's way pretty much fits what you weant then, if thats all the Lua you have EDIT: Wow, clambering over eachother to help....
__________________
Preferable to death. But only just...
|
|
02-25-2008, 03:24 AM | #9 | ||
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
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-25-2008, 03:28 AM | #10 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
no its fine, if i'm diguised as a friendly and it doesnt set off the light they might think i'm a friendly spy. thats what i call good confusion.
the spy gas is exactly what i want with the gas. i sure as hell hope thats possible!
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
02-25-2008, 03:34 AM | #11 |
Not choking. Yet.
Lua Team
Wiki Team Fortress Forever Staff Join Date: Jul 2007
Location: Scotland
Class/Position: Demo/Def - Spy/Off Gametype: Anything but yet more fucking CTF Affiliations: FF.AvD [FF AvD/ID guild] Posts Rated Helpful 0 Times
|
I think it would be along the lines of:
Code:
player:AddEffect (EF.kGas) As for the protective suits.... that's probably the aukward bit.
__________________
Preferable to death. But only just...
|
|
02-25-2008, 03:38 AM | #12 | |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
And, the Gas effect thing requires 3 floats (numbers) after the effect tag, so I'm figuring out what each does right now. Code:
player:AddEffect( EF.kGas, number, number, number )
__________________
#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-25-2008, 03:40 AM | #13 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
yea the suits are going to be tricky to. i figured if we couldnt get suits in then every where that a suit was would be a small chamber you get in and close, and of coarse it would have to force close incase some dick tried to get in there with you. other wise you'd both die.
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
02-25-2008, 03:51 AM | #14 |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Okay, so I figured out what the three numbers are:
Code:
player:AddEffect( EF.kGas, effect duration, icon duration, speed ) EDIT: Speed doesn't look like it does anything. Each tick does 1 damage. Probably going to have to mess with the player_ongas() function to get it to work how you want it.
__________________
#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.; 02-25-2008 at 04:00 AM. |
|
02-25-2008, 09:11 PM | #15 |
Fortress Forever Staff
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy Affiliations: -=DoM=- Posts Rated Helpful 0 Times
|
i appreciate your help on this, let me know when you have something and i'll test it.
__________________
-------------------------------FF_Rock2(WIP)------------------------------ ---------------------------FF_RedGiant(Released)------------------------- --------------------------FF_Fragzone_G(Released)------------------------ --------------------------FF_Civibash_G(Released)------------------------ -------------------FF_Conc_G1(WIP)-------------------- -------------------FF_Hollow_G(WIP)--------------------- |
|
02-25-2008, 10:30 PM | #16 |
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
|
Is it possible to use the HL suit from valve? If you can add that to materials and use the prop in your map then couldn't we potentially just tie a lua to that prop to null the effect of the lua for the EF.kGas?
Or is that not a way to check if the model / prop is called on the player w/out actually coding it into the game? I would hate to have to see it being a cordoned off trigger b/c what was best about grabbing a suit was you could then get back into position once you had one.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf (Beta) alchimy_b1 (Lua) base_payload_2015 (Models) props_trainyard |
|
02-25-2008, 10:43 PM | #17 | |
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-25-2008, 11:02 PM | #18 |
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
|
Yeah...hopefully glow gets done for 2.1...then we can simply make an entity icon and tie a lua code to it. If not it's going to be difficult to see who is immune and who isn't.
The gas chamber does need an immunity trigger though!
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf (Beta) alchimy_b1 (Lua) base_payload_2015 (Models) props_trainyard |
|
02-25-2008, 11:59 PM | #19 |
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
|
Ok so i did some more research and it seems that is how the original creator of rock_2 did it...but is there a HEV suit that goes with HL 2? I would assume there has to be, but you never actually see the model so Valve may not have done it.
I'll check when I get home.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf (Beta) alchimy_b1 (Lua) base_payload_2015 (Models) props_trainyard |
|
02-26-2008, 12:17 AM | #20 | |
The last true Emperor
D&A Member
Wiki Team Join Date: Dec 2007
Posts Rated Helpful 0 Times
|
Quote:
|
|
|
Currently Active Users Viewing This Thread: 2 (0 members and 2 guests) | |
|
|