Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 03-13-2012, 05:02 PM   #1
Snipe
WhenGasGrenWillBack?
 
Snipe's Avatar
 
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.
Snipe is offline   Reply With Quote


Old 03-13-2012, 07:50 PM   #2
R00Kie
Kawaii! ルーキー
Lua Team
Wiki Team
Fortress Forever Staff
 
R00Kie's Avatar
 
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 ]
R00Kie is offline   Reply With Quote


1 members found this post helpful.
Old 03-14-2012, 02:46 PM   #3
Snipe
WhenGasGrenWillBack?
 
Snipe's Avatar
 
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.
Snipe is offline   Reply With Quote


Old 03-14-2012, 07:44 PM   #4
Elmo
Gets tickled by FF
Fortress Forever Staff
 
Elmo's Avatar
 
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.
__________________
Support FF:
Done: ff_monkey
Done: ff_bases
Done: ff_warpath
Forever Doing: ff_medieval (beta#99999999)
Elmo is offline   Reply With Quote


Old 03-14-2012, 07:48 PM   #5
Ricey
UI Designer
Front-End Developer
Fortress Forever Staff
 
Ricey's Avatar
 
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.
__________________
Support FF:
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
Ricey is offline   Reply With Quote


Old 03-15-2012, 12:38 AM   #6
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
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.
__________________
Support FF:
Crazycarl is offline   Reply With Quote


1 members found this post helpful.
Old 03-19-2012, 01:21 AM   #7
Snipe
WhenGasGrenWillBack?
 
Snipe's Avatar
 
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

Snipe is offline   Reply With Quote


Old 03-19-2012, 01:39 AM   #8
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
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.
__________________
Support FF:

Last edited by Crazycarl; 03-19-2012 at 01:45 AM.
Crazycarl is offline   Reply With Quote


3 members found this post helpful.
Old 03-19-2012, 03:06 AM   #9
Snipe
WhenGasGrenWillBack?
 
Snipe's Avatar
 
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
Snipe is offline   Reply With Quote


Old 03-20-2012, 02:01 PM   #10
Snipe
WhenGasGrenWillBack?
 
Snipe's Avatar
 
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
Snipe is offline   Reply With Quote


Old 03-20-2012, 05:36 PM   #11
Elmo
Gets tickled by FF
Fortress Forever Staff
 
Elmo's Avatar
 
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.
__________________
Support FF:
Done: ff_monkey
Done: ff_bases
Done: ff_warpath
Forever Doing: ff_medieval (beta#99999999)
Elmo is offline   Reply With Quote


1 members found this post helpful.
Old 03-22-2012, 09:23 PM   #12
harmonyofchaos3514
D&A Member
 
harmonyofchaos3514's Avatar
 
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.
harmonyofchaos3514 is offline   Reply With Quote


Old 03-23-2012, 12:35 AM   #13
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
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")
This gives you support for team spawns, ammo bags and more for up to four teams. All you have to do is place the entities in your map and give them the proper names. See this reference.

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.
__________________
Support FF:
Crazycarl is offline   Reply With Quote


Old 03-23-2012, 12:39 AM   #14
harmonyofchaos3514
D&A Member
 
harmonyofchaos3514's Avatar
 
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!
harmonyofchaos3514 is offline   Reply With Quote


Old 03-24-2012, 02:33 PM   #15
Marxist
Beta Tester
 
Marxist's Avatar
 
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
Marxist is offline   Reply With Quote


1 members found this post helpful.
Old 03-24-2012, 02:37 PM   #16
Snipe
WhenGasGrenWillBack?
 
Snipe's Avatar
 
Join Date: Mar 2009
Location: Maryland
Class/Position: Sniper, Spy
Gametype: Spy Deathmatch
Posts Rated Helpful 3 Times
Quote:
Originally Posted by Marxist View Post
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
thank you Marxist. I have heard that from many people about the leaky displacements.

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?
Snipe is offline   Reply With Quote


Old 03-24-2012, 02:42 PM   #17
Marxist
Beta Tester
 
Marxist's Avatar
 
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
Marxist is offline   Reply With Quote


1 members found this post helpful.
Old 03-24-2012, 02:57 PM   #18
Elmo
Gets tickled by FF
Fortress Forever Staff
 
Elmo's Avatar
 
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.
__________________
Support FF:
Done: ff_monkey
Done: ff_bases
Done: ff_warpath
Forever Doing: ff_medieval (beta#99999999)

Last edited by Elmo; 03-24-2012 at 09:19 PM.
Elmo is offline   Reply With Quote


1 members found this post helpful.
Old 03-24-2012, 05:11 PM   #19
Snipe
WhenGasGrenWillBack?
 
Snipe's Avatar
 
Join Date: Mar 2009
Location: Maryland
Class/Position: Sniper, Spy
Gametype: Spy Deathmatch
Posts Rated Helpful 3 Times
Quote:
Originally Posted by Elmo View Post
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 128x128x32x 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.
wow. thank you soo much for this info. I had no idea that this could be done... so simple.
Snipe is offline   Reply With Quote


Old 03-24-2012, 09:20 PM   #20
Elmo
Gets tickled by FF
Fortress Forever Staff
 
Elmo's Avatar
 
Join Date: Jun 2007
Location: UK
Class/Position: Med Solly HW
Gametype: Any/CTF
Posts Rated Helpful 41 Times
Quote:
Originally Posted by Snipe View Post
wow. thank you soo much for this info. I had no idea that this could be done... so simple.
No worries - your avatar makes me laugh every time i see it so I was paid in advance
__________________
Support FF:
Done: ff_monkey
Done: ff_bases
Done: ff_warpath
Forever Doing: ff_medieval (beta#99999999)
Elmo is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:55 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.