03-13-2012, 06:02 PM | #1 |
WhenGasGrenWillBack?
Join Date: Mar 2009
Location: Maryland
Class/Position: Sniper, Spy Gametype: Spy Deathmatch Posts Rated Helpful 3 Times
|
some mapping questions
As some of you know, I've been doing a lot of work in Hammer lately and I need some help with these little "problems".
First off, grenades in spawn. I am assuming that its part of the LUA that doesnt allow grenades to go off in the spawn rooms? I really want to implement that into my map i'm working on. (I also think it should be like that in EVERY map) Second, spawn rooms that have a "force-field" or lasers that kill the other teams player. Do I HAVE to use something like lasers or could I implement both a door AND a brush/trigger/whatever that kills the other teams players when they walk through an open spawn door? (the door will still only open for that specific team. this would be a fail safe for those pesky spies who like to creep in when i'm leaving spawn... lopestyler, I am talking about you...) Lastly, I was tinkering with the idea of a hybrid gamestyle. Think CTF with Command Points. The flags will be in the bases, but depending what points you control determines where you spawn on the battlefield. Obviously controlling more control points gives your team an advantage, spawning you close to the enemy base thus making it easier for you to get their flag. Phew.... long-winded post. tl dr: help me. |
|
03-13-2012, 08:50 PM | #2 |
Kawaii! ルーキー
Lua Team
Wiki Team Fortress Forever Staff Join Date: Jan 2008
Location: Nowhere, Kansas
Class/Position: Random Gametype: CTF Affiliations: BiG, Kawaii!, MustacheBrigade, GoodFellas Posts Rated Helpful 82 Times
|
No grenades in spawn is a brush entity. Trigger_ff_script with the name "no_grens" you can also use "spawn_protection" which will block grenades, infection, and prevent building. Make sure to include base_teamplay in your lua.
For spawn killing doors you can do that by using a trigger_hurt and lua that detects the team. Here is some lua from aardvark for an example. Good luck. Code:
----------------------------------------------------------------------------- -- aardvark lasers and respawn shields ----------------------------------------------------------------------------- KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned }) lasers_KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned }) function KILL_KILL_KILL:allowed( activator ) local player = CastToPlayer( activator ) if player then if player:GetTeamId() == self.team then return EVENT_ALLOWED end end return EVENT_DISALLOWED end function lasers_KILL_KILL_KILL:allowed( activator ) local player = CastToPlayer( activator ) if player then if player:GetTeamId() == self.team then if self.team == Team.kBlue then if redsecstatus == 1 then return EVENT_ALLOWED end end if self.team == Team.kRed then if bluesecstatus == 1 then return EVENT_ALLOWED end end end end return EVENT_DISALLOWED end blue_slayer = KILL_KILL_KILL:new({ team = Team.kBlue }) red_slayer = KILL_KILL_KILL:new({ team = Team.kRed }) sec_blue_slayer = lasers_KILL_KILL_KILL:new({ team = Team.kBlue }) sec_red_slayer = lasers_KILL_KILL_KILL:new({ team = Team.kRed })
__________________
Released: [ Island ] [ Rookie ] [ Limbo ] [ Sonic ] [ Tomb ] [ Skydive2 ] [ Bunkerwars ] Beta: [ Argon ] [ Reflection ] [ Urbantag ] Lua: [ game_rules ] |
1 members found this post helpful. |
03-14-2012, 03:46 PM | #3 |
WhenGasGrenWillBack?
Join Date: Mar 2009
Location: Maryland
Class/Position: Sniper, Spy Gametype: Spy Deathmatch Posts Rated Helpful 3 Times
|
thank you R00Ki3. Since I am new at all this, every bit helps. Esp when it comes to the LUA or brush entities and scripts.
The last part of my first post, would that even be possible to do something like that via the LUA? Mixing 2 game types together? Also, if i can't learn everything i need to do with the LUA, would there be someone willing to do it for me or help with the majority of it? like a collaboration or something maybe. |
|
03-14-2012, 08:44 PM | #4 |
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
|
Yes it's possible. But that's about as much as I can help as I suck at LUA.
|
|
03-14-2012, 08:48 PM | #5 |
UI Designer
Front-End Developer Fortress Forever Staff
Join Date: May 2008
Location: Winter Park, FL
Class/Position: D Eng Gametype: CTF 9v9 Affiliations: .gr , smr Posts Rated Helpful 46 Times
|
Yea it's possible. I wish Pon was still around, he'd be able to do it.
__________________
Maps : Haste |Scrummage |Mulch_Trench Voltage | Exchange Classic | Fortsake ricecakes: I demand SGs get a buff squeek.: buy it a gym membership 'I have an eye for design' - Kube 2014 |
|
03-15-2012, 01:38 AM | #6 |
D&A Member
Wiki Team Fortress Forever Staff Join Date: Apr 2007
Posts Rated Helpful 31 Times
|
Base_teamplay already handles grabbing and capturing flags. You can do a lot just by including base_teamplay and modifying it to do what you need to do. If you look at the documentation for info_ff_script, it has a list of callbacks, which are game events you can tap into and insert your own custom behavior.
Controlling spawn points is easy. They have a callback called validspawn. If it returns true, a player can spawn there. You can do any kind of logic and turn a group of spawns on or off. |
1 members found this post helpful. |
03-19-2012, 02:21 AM | #7 |
WhenGasGrenWillBack?
Join Date: Mar 2009
Location: Maryland
Class/Position: Sniper, Spy Gametype: Spy Deathmatch Posts Rated Helpful 3 Times
|
ok... need some more assistance. Im working with displacements right now and im not sure exactly how to accomplish what i want to do.
I made a mountain side and decided to run a tunnel through it. how would i go about making the displacements "wrap" around the tunnel? would i just create a bunch of small ones around or is there a way to cut them? also, can you make a 45 degree angle on a displacement (like a triangle) ?? PIC RELATED |
|
03-19-2012, 02:39 AM | #8 |
D&A Member
Wiki Team Fortress Forever Staff Join Date: Apr 2007
Posts Rated Helpful 31 Times
|
You can angle them but they still have to have four sides.
The trick is to get the brushes as close to the original shape as you can before you make them displacements. Here I've made a sort of arch. The displacements still sew and are four-sided, I've just moved those edges up where the tunnel needs to go. Then I very carefully shape the displacements just so they touch the tunnel wall. You can also sew if the two displacements share a half-edge, as shown here. EDIT: You can also just go the cheesy way--raise all the displacement vertices up and cram them all in the tunnel wall. Last edited by Crazycarl; 03-19-2012 at 02:45 AM. |
3 members found this post helpful. |
03-19-2012, 04:06 AM | #9 |
WhenGasGrenWillBack?
Join Date: Mar 2009
Location: Maryland
Class/Position: Sniper, Spy Gametype: Spy Deathmatch Posts Rated Helpful 3 Times
|
thank you crazycarl. I owe you and a bunch of others here a lot of thanks. Just added a couple trees real quick. nothin fancy.
thanks again |
|
03-20-2012, 03:01 PM | #10 |
WhenGasGrenWillBack?
Join Date: Mar 2009
Location: Maryland
Class/Position: Sniper, Spy Gametype: Spy Deathmatch Posts Rated Helpful 3 Times
|
One more question for you pros. Is it better to use a single displacement for an arch, or a bunch of blocks? which will give the map better FPS? The map I am working on has a high number of arches and I wasn't sure if i could help performance by using displacements for them.
Thanks again |
|
03-20-2012, 06:36 PM | #11 |
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
|
My experience with displacements has found that they run better.
The limit for the number of displacement you can use seems pretty high too. I managed to reach the limit in ff_warpath but that was some really extreme displacement usage!! In most cases use whatever seems most sensible. |
1 members found this post helpful. |
03-22-2012, 10:23 PM | #12 |
D&A Member
Join Date: Mar 2012
Gametype: Capture the Flag Posts Rated Helpful 5 Times
|
Since this thread exists for mapping questions, I thought I would put my question here.
I am a noob at mapping, with that said, I want to make a rock face that can be blown up, and then, closed again. The map I am working on I want to make a quick root, but that needs a demomans det bomb to open it. from what Ive been reading on the forums, and what I am learning, I think I need to create a func_wall, and then a ff_trigger that can be blown up, but I dont know what Im doing, so I am confused. I also have no clue what LUA is, and whether I need that for what I am doing. the rock im using is used in badlands, its that brown color rock if that helps. |
|
03-23-2012, 01:35 AM | #13 |
D&A Member
Wiki Team Fortress Forever Staff Join Date: Apr 2007
Posts Rated Helpful 31 Times
|
The wall should be a func_brush, and the trigger should be a trigger_ff_script--which defines the volume in which you want the detpack to work.
Lua is a scripting language that controls all the map rules. You need one for your map to work. Create a text file, and give it the same name as your map, ending in .lua, and put it in the /maps folder. Just put one line in the Lua file for starters: Code:
IncludeScript("base_teamplay") So, if you put a trigger_ff_script in your map named blue_detpack_trigger, it already knows to respond to blue detpacks. Then if you place a logic_relay entity called blue_det_relay, the Lua script will cause that to trigger. Logic_relay is great because you can fire any kind of outputs from it: remove your wall, play a sound, create gibs, etc. If you are unfamiliar with Source's I/O system, read up on it, it's really useful. |
|
03-23-2012, 01:39 AM | #14 |
D&A Member
Join Date: Mar 2012
Gametype: Capture the Flag Posts Rated Helpful 5 Times
|
That makes sense kind of, I will read up on the links you gave me. thank you!
|
|
03-24-2012, 03:33 PM | #15 |
Beta Tester
Join Date: Oct 2008
Location: Washington State
Gametype: CTF/AVD Posts Rated Helpful 2 Times
|
If there's something you want to do but you're not sure how to do it, use the tutorials at interlopers.net for help. They have an amazing database with a TON of information on doing damn near anything you could want. This site has been invaluable for me.
And snipe it's my understanding that a displacement brush is 'cheaper' (less resources used) than a regular block brush. But remember you have to seal your map behind displacements with nodraw brushes
__________________
In Progress: ff_sigma, ff_phantom, ff_cannon_classic Released: ff_high_flag_b4 |
1 members found this post helpful. |
03-24-2012, 03:37 PM | #16 | |
WhenGasGrenWillBack?
Join Date: Mar 2009
Location: Maryland
Class/Position: Sniper, Spy Gametype: Spy Deathmatch Posts Rated Helpful 3 Times
|
Quote:
Speaking of displacements again, depending on what "power" you set a displacement on, does that affect resources used and performance? I would assume that the higher the power the more performance loss? |
|
|
03-24-2012, 03:42 PM | #17 |
Beta Tester
Join Date: Oct 2008
Location: Washington State
Gametype: CTF/AVD Posts Rated Helpful 2 Times
|
Yeah that would have an impact on performance, most of the time you can probably get away with using a power of 3 and it still looks good. the higher value powers just gives you more control over manipulation as it gives more points, similar to making a cylindrical brush with 8 sides, compared to making one with say 12. Obviously the 12 sided cylinder will be closer to a true circle and look better, but it's going to be more expensive from a resource standpoint.
__________________
In Progress: ff_sigma, ff_phantom, ff_cannon_classic Released: ff_high_flag_b4 |
1 members found this post helpful. |
03-24-2012, 03:57 PM | #18 |
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
|
Just in case you don't know the subdivide function is awesome and is how I made the warpath map. Every edge should match up one to one else you'll get gaps. Matching edges two-to-one (two 128 brushes on a 256 brush) does work but you need to remember to sew it after using subdivide.
First thing first to see what it does is to make a block as a cube, do 64 or 128 square. Select it all and make it all displacement and with it all selected click the subdivide button. You now have a sphere! Whoop. Next thing is make... the corner of a room (floor and two sides) match every edge one to one. So use 3 128x128x32 brushes for example. click the 3 faces and you'll get an inward curve. I'm sure there are tutorials on subdividing somewhere but I never came across any. They're really good to shape the area and then you go along with the usual manipulation tool after.
__________________
Done: ff_monkey Done: ff_bases Done: ff_warpath Forever Doing: ff_medieval (beta#99999999) Last edited by Elmo; 03-24-2012 at 10:19 PM. |
1 members found this post helpful. |
03-24-2012, 06:11 PM | #19 | |
WhenGasGrenWillBack?
Join Date: Mar 2009
Location: Maryland
Class/Position: Sniper, Spy Gametype: Spy Deathmatch Posts Rated Helpful 3 Times
|
Quote:
|
|
|
03-24-2012, 10:20 PM | #20 |
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
|
No worries - your avatar makes me laugh every time i see it so I was paid in advance
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|