Request: well6 "closable grate"

Discuss the construction of maps and the tools to create maps for 3D games.
Post Reply
OneManClan
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm
Contact:

Request: well6 "closable grate"

Post by OneManClan »

Dear Map making/editing Gurus,

Well6 is a Classic TF map, which we play at least once a month at the Weekly AGR Sessions. It's one 'flaw' is the underwater grate, which once blown/opened (via a detpack), stays open, and thus renders the inside of the base completely bypassable. I'm hoping some Guru out there can make it so that the grate can be blown/closed shut (via another det), and reopened, continuously. Can this be done via an .ent edit?

If anyone's interested, here is the well6 ent. [EDIT: :oops: Oops, that's my failed attempt to figure it out myself. HERE is the original well6.ent]. Map making/editing is not my area so, as far as I can see/understand, there's a brush for the grate, and after its blown, there's another brush (?)with a hole in the middle. If someone can make it so that subsequent dets open and close the grate continuously, that would be 'grate' ;)

thanks,
OneManClan
ps. I did look The closest thing I can think of is the mine tunnel in rock2, which can be opened and closed continuously via a det. Here's the rock2.ent.
Last edited by OneManClan on Sun Feb 05, 2012 5:30 am, edited 1 time in total.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Request: well6 "closable grate"

Post by Baker »

I'm just posted the relevant entities from that.

If this entity is just a door that stays open, you might be able to change the "wait" value from -1 ( never closes) to something like "wait" "20" where it will close 20 seconds later.

Maybe. Seems like that should work.

http://www.quakewiki.net/archives/world ... ndex2.shtm
{
"classname" "func_door"
"angle" "-1"
"netname" "grate11"
"targetname" "blue_grate"
"wait" "-1"
"speed" "900"
"sounds" "1"
"lip" "-162"
"dmg" "0"
"model" "*9"
"classname" "trigger_multiple"
}
{
"classname" "func_door"
"angle" "270"
"netname" "grate1"
"targetname" "blue_grate"
"wait" "-1"
"speed" "200"
"sounds" "1"
"lip" "-100"
"dmg" "0"
"model" "*8"
"classname" "trigger_multiple"
}
{
"classname" "info_tfgoal"
"netname" "blue_det"
"broadcast" "Blues grate is blown"
"message" "You destroyed blues grate"
"target" "blue_grate"
"goal_activation" "2"
"goal_result" "1"
"goal_effects" "1"
"origin" "-992 840 -396"
}
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
OneManClan
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm
Contact:

Re: Request: well6 "closable grate"

Post by OneManClan »

Hi Baker, thanks for the response!
Baker wrote:I'm just posted the relevant entities from that.

If this entity is just a door that stays open, you might be able to change the "wait" value from -1 ( never closes) to something like "wait" "20" where it will close 20 seconds later.

Maybe. Seems like that should work.
YES it worked (!).. the grate slid back into place after 20 secs. :)

I had a look at the link you provided, but I'm not sure which bit is relevant to this issue.. Also I accidentally provided the broken well6.ent (which I had been working on) rather than the original well6 ent

Anyway, I tried adding:
"classname" "trigger_multiple"

but this makes the grate 'initialise' in the open position, and doesn't close. I looked at the ent for the canyon1 underwater re-detable rock wall:

Code: Select all

{
"classname" "func_door"
"angle" "-2"
"speed" "1000"
"sounds" "0"
"wait" "4"
"spawnflags" "32"
"dmg" "500"
"lip" "25"
"targetname" "bcave2"
"model" "*2"
}
{
"classname" "trigger_multiple"
"sounds" "0"
"targetname" "bcave1"
"style" "32"
"dmg" "0"
"wait" "4"
"health" "0"
"target" "bcave2"
}
{
"origin" "-3626 -726 -1140"
"g_e" "1"
"g_a" "2"
"target" "bcave1"
"angle" "-2"
"classname" "info_tfgoal"
"style" "32"
}
{
"origin" "-3778 -690 -1156"
"g_e" "1"
"g_a" "2"
"target" "bcave1"
"angle" "-2"
"classname" "info_tfgoal"
"style" "32"
}
This contains a "trigger_multiple", and a damage level of 500.. I have no idea what the 'wait 4' is doing there.. and I can't see any reference to 'det' triggers..

btw further testing has revealed that:
grate11 is the grate itself
grate1 is the bit of grate on the ground after the explosion

and while the wait "n" does close the grate after n seconds, further dets don't re-open it..
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Request: well6 "closable grate"

Post by Baker »

[The weakness of using damage is that anything can open it. You could hit it with an axe 100 x 5 axe damage = 500 damage.]

The unfortunate reality is you would probably have to have the QuakeC to truly fix the issue. Particularly since it doesn't seem to use standard doors fields to cause it to open like, for instance, the "damage" field does. Whatever is happening in the QuakeC to allow the grate to be blown open doesn't seem to merely reverse itself once it closes again.

Yeah the checking out what another map does and implementing it might fix it you'd think, but trigger_multiples make my head hurt. :D I don't know why.


BTW: trigger_multiple just means the trigger can be activated again and again. Kind of like the "This is the easy hall" message on the start map. As opposed to say a "trigger_once", which happens once and never more.

I think "wait" "4" in a trigger_multiple means that once triggered, the trigger cannot be setoff again for X seconds where in this case X = 4.

[My mapping is a bit rusty, hence I'm not 1000% on any of this]
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: Request: well6 "closable grate"

Post by goldenboy »

It's really hard to change something like this without having the map source, just being given some ent file to a map you've never seen.

How does the destructible grate work? Two doors, one with a hole in it, and one without?

Perhaps you could use the toggle spawnflag somehow. But I don't even know the map.

Level designers tend to think graphically and in 3D, not in text files. Perhaps if you decompile the map and post the source...
ratbert
Posts: 37
Joined: Thu Nov 19, 2009 3:47 pm

Re: Request: well6 "closable grate"

Post by ratbert »

WELL6 map original design was regular team fortress play. Once a blue or red base grate was detpack'ed by a enemy it was open for access. It was never meant to close again or be there again.
haze
Posts: 8
Joined: Fri Apr 09, 2010 9:18 am

Re: Request: well6 "closable grate"

Post by haze »

i don't know too much about mapping but i was able to decipher the entities in Canyon1.bsp responsible for its closeable rock wall.
I copied/modified the required entities from canyon1.bsp's closing rock wall to achieve a closeable well6 grate.

i think the trick is something with the 'style' and 'spawnflags' . I've read that the way spawnflags works changes depending on what class type it is working on. Its hard finding info on the specific values.

But basically you have your dettable entity that looks like this

{
"goal_activation" "2"
"target" "blue_det_trigger"
"netname" "blue_det"
"classname" "info_tfgoal"
"origin" "-992 840 -396"
"goal_effects" "1"
"style" "32"
}

it points to a trigger_multiple:

{
"target" "blue_grate"
"netname" "blue_det_trigger"
"sounds" "0"
"classname" "trigger_multiple"
"wait" "4"
"dmg" "0"
"style" "32"
"health" "0"
"targetname" "blue_det_trigger"
}

which points to the 2 func_door parts of the grate:

{
"spawnflags" "32"
"speed" "2000"
"netname" "grate1"
"sounds" "1"
"classname" "func_door"
"wait" "0"
"dmg" "500"
"lip" "-100"
"angle" "270"
"targetname" "blue_grate"
}

{
"spawnflags" "32"
"speed" "900"
"netname" "grate11"
"sounds" "0"
"classname" "func_door"
"wait" "0"
"dmg" "500"
"lip" "-162"
"angle" "-1"
"targetname" "blue_grate"
}
It Takes A Tough Man To Make A Tender Rocketjump
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: Request: well6 "closable grate"

Post by goldenboy »

{
"target" "blue_grate"
"netname" "blue_det_trigger"
"sounds" "0"
"classname" "trigger_multiple"
"wait" "4"
"dmg" "0"
"style" "32"
"health" "0"
"targetname" "blue_det_trigger"
}
No idea why they put a trigger_multiple in front of the door. It should work without since you say it is only moving once and stays open.
Maybe they actually intended to have it re-open, in which case there is a bug here somehow.
No idea what style 32 does on a trigger, that is usually used for lightstyles.

Anyway this trigger is not shootable and can be re-triggered after 4 seconds.

Here is one way in which you can make the door toggleable; change "health" to 20 (and perhaps remove "dmg", because I have no idea why that is there) and this trigger should be retriggered by shooting at it (you might have to remove "targetname" as well which will break the detpack triggering). Unfortunately, it will be invisible and perhaps not located next to the door. So this method is worth nothing.
{
"spawnflags" "32"
"speed" "2000"
"netname" "grate1"
"sounds" "1"
"classname" "func_door"
"wait" "0"
"dmg" "500"
"lip" "-100"
"angle" "270"
"targetname" "blue_grate"
}
{
"spawnflags" "32"
"speed" "900"
"netname" "grate11"
"sounds" "0"
"classname" "func_door"
"wait" "0"
"dmg" "500"
"lip" "-162"
"angle" "-1"
"targetname" "blue_grate"
}
So the door has two parts. They move at different speeds and one moves sideways, while the other moves up. They use uncommon lip values to restrict how far they travel. They squish the player. Their wait is set to "0" which is a bad idea, but in theory would make them close immediately upon being opened. However they have spawnflag 32 set, which is TOGGLE.

TOGGLE means "wait in both start and end states for a trigger event". This means they would probably close again if retriggered.
{
"goal_activation" "2"
"target" "blue_det_trigger"
"netname" "blue_det"
"classname" "info_tfgoal"
"origin" "-992 840 -396"
"goal_effects" "1"
"style" "32"
}
This is a TF-specific entity (probably the one that registers the detonation) and it in turn fires the trigger_multiple.

I need the QC in order to diagnose this; please give me a link to the progs.dat.

Also, in the future you should be able to know what spawnflags do by looking at the QC code (Quake's) or at a .def file. Is there a .def or .fgd file for TF mappers? If so, you should have posted it.

Another question, why is there a difference between the map source Baker posted and the one posted later? Which one is the source of the actual map you're playing?
haze
Posts: 8
Joined: Fri Apr 09, 2010 9:18 am

Re: Request: well6 "closable grate"

Post by haze »

Golden, I think you misunderstood. Sorry if i wasn't clear.

The code i posted is the finished version of what i modified in well6 to make the closeable grate that OMC is looking for. One det opens, 2nd det closes.
It Takes A Tough Man To Make A Tender Rocketjump
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: Request: well6 "closable grate"

Post by goldenboy »

Yes, I misunderstood. OK then. Glad it works.
haze
Posts: 8
Joined: Fri Apr 09, 2010 9:18 am

Re: Request: well6 "closable grate"

Post by haze »

BTw thanks for your explanation of spawnflags "32". that toggling makes sense now!

In Canyon1.bsp where i stole the code, there were 2 dettable entities that led to the trigger_multiple.( i believe it was meant to allow a larger area to trigger the event) Could that be the reason for the Trigger_multiple ? In other words if we only have one det entity, we should use a different class?
It Takes A Tough Man To Make A Tender Rocketjump
OneManClan
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm
Contact:

Re: Request: well6 "closable grate"

Post by OneManClan »

Ok I tested it, and the grate indeed can now be opened and closed via det, repeatedly. :)

Some dets however seem to not have an effect. I don't mind because it adds an element of randomness to the activity, but I'm confused by how all this works.. I can't see a reference to "det" anywhere, and there's no "damage" field..? How does the grate know that a det exploded, and where is it decided how far away the det can be before it has an effect?
ratbert
Posts: 37
Joined: Thu Nov 19, 2009 3:47 pm

Re: Request: well6 "closable grate"

Post by ratbert »

OMC which detpacks are you referring? CustomTF has two types the regular one and throw able one?

OneManClan wrote:Ok I tested it, and the grate indeed can now be opened and closed via det, repeatedly. :)

Some dets however seem to not have an effect. I don't mind because it adds an element of randomness to the activity, but I'm confused by how all this works.. I can't see a reference to "det" anywhere, and there's no "damage" field..? How does the grate know that a det exploded, and where is it decided how far away the det can be before it has an effect?
OneManClan
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm
Contact:

Re: Request: well6 "closable grate"

Post by OneManClan »

ratbert wrote:OMC which detpacks are you referring? CustomTF has two types the regular one and throw able one?
From what I can see, both are self.classname = "detpack", and T_RadiusDamage (in combat.qc) seems to make no distinction. Looking at the code however, there is a .field called ".goal_activation" which gets triggered by something called "TFGA_TOUCH_DETPACK":

Code: Select all

// Check for TeamFortress Goals that can be triggered by Detpacks
else if (head.classname == "info_tfgoal")
{
	if (inflictor.classname == "detpack")
	{
		// Don't activate timer goals
		if ((head.goal_activation & #TFGA_TOUCH_DETPACK) && (head.search_time == 0))
		{
			traceline (inflictor.origin, head.origin, #TL_BSP_ONLY, inflictor);

			if (trace_fraction == 1)
			{
				// Does the AP match the AP Criteria?
				if (Activated(head,attacker))
				{
					DoResults(head, attacker, #TRUE);
				}
				else
				{
					// If an else goal should be activated, activate it
					if (head.else_goal != 0)
					{
						te = Findgoal(head.else_goal);
						if (te)
							DoResults(te, attacker, (head.goal_result & #TFGR_ADD_BONUSES));
					}

					return;
				}
			}
		}
	}
haze
Posts: 8
Joined: Fri Apr 09, 2010 9:18 am

Re: Request: well6 "closable grate"

Post by haze »

OMC, the goal_activation "2" in the blue_det entity means it is affected by dets. If you open the ent in Ented, you will see under "activation criteria" it must be touched by a detpack to activate.

I went on your server and tested it. All dets 'regular" and 'throwable' properly activated the grate. I always throw them as close to the grate as possible. I suspect some of your dets weren't close enough to the grate. But in general I think people will understand to det right next to the grate.
It Takes A Tough Man To Make A Tender Rocketjump
Post Reply