#5554 posted by Trinca on 2006/11/14 07:19:48
Trinca
#5555 posted by negke on 2006/11/14 09:37:59
standard triggers can only have one single function: target or killtarget or message.
put the message in a trigger_relay with the same targetname as the door and it works.
QuakeC Query
#5556 posted by Mike Woodham on 2006/11/15 13:08:18
I want to have a func_button (for a deliberate player action) and a trigger_once (for a non-deliberate/unintentional action) pointing to the same target.
Can I tell from within the target's function, which of the two activated the target? This would enable me to give a different response e.g. if activated by a button, do this, else do that (to the targeted entity)
Not Easily...
#5557 posted by Preach on 2006/11/15 16:59:11
As far as I can see, there isn't a nice self contained way to do it - meaning a way to write it that doesn't involve changing the code for the buttons and the trigger_once in some way. There is a global entity variable called "activator" that stores who is performing the triggering when something uses its targets. Unfortunately this stores the player entity that pressed the button, not the button entity itself. This inspires us to create such a global to store the entity that is doing the actual using, which I will refer to as the "mechanism"(although effector might be a better term).
Ok, first open up defs.qc and add to the bottom:
entity mechanism;
We will use this global to store the entity that is enacting the trigger, for example the button or trigger.
Next up is subs.qc, find the function
SUB_UseTargets
Right at the top of it add a temporary entity called "mech" to the existing list, followed immediately by this code:
if(self.classname == "DelayedUse")
mech = self.owner;
else
mech = self;
Next add
t.owner = self;
right after the line
t.target = self.target;
This relates to the DelayedUse line above, so that if the trigger has a delay, we still count the mechanism as the real trigger, not this temporary entity.
Now go down to the big loop at the bottom and add
mechanism = mech;
right above the line
t = find (t, targetname, self.target);
in the loop marked //fire targets(not the killtarget loop). We keep resetting this each time we run the loop, as each time we trigger something it might call SUB_UseTargets itself, which may change mechanism.
Now it's very simple to test which one of your entities set off the thing. In your new entity's use function, perform a check like
if(mechanism.classname == "func_button")
do stuff
else
do other stuff
I think this is a fairly robust system, but I've not tested it so just say if there are problems.
Preach
#5558 posted by Mike Woodham on 2006/11/15 23:48:45
Thanks, this looks good.
I will test it later this evening and report back.
Illusionary + Efrags
#5559 posted by negke on 2006/11/16 01:30:51
i have a lot func_illusionaries consisting of several brushes which are seperated from each other. this gives 'too many efrags' warnings. changing them to func_walls solves the problem, but i'd rather have them be nonsolid. creating a seperate func_illusionary for every single brush is out of question because (i think) there are more than 128.
so what's the principle underlying this, how far can the brushes be apart from each other, what's the difference between static and dynamic entites concerning this distance?
Preach
#5560 posted by Mike Woodham on 2006/11/16 05:45:03
Said in English with a very French accent and much overuse of the hands...
...soooperrrb!!
Thanks.
Negike:
#5561 posted by metlslime on 2006/11/16 13:28:44
I don't fully understand efrags, but from what I do understand, any large entity is divided into multiple efrags based on how many nodes of the BSP it occupies. This is why a large func_* with many seperate small parts is problematic.
I also don't know if/why it's different for func_wall vs. func_illusionary. But the one obvious difference is func_illusionary is a static object, and func_wall is an edict. So maybe that is partly why.
#5562 posted by Trinca on 2006/11/17 05:37:23
why in gl i dont have any HOM�s and in software i got a lot of then? is there any way to solve this?
Light Attenuation
#5563 posted by ijed on 2006/11/17 08:59:02
how can i attenuate a spotlight (light with a target) in quake - pretty sure ive read something on this somewhere but can't remember where. if i remember rightly its just a single key with float value . . .
neg!ke - why not just split the big 128 brush illusionary into 2x64 brush versions? if that doesn't work split into 4x32 and so on until you get rid of the error. don't know if that'll work because i haven't come across the problem before.
Trinca:
#5564 posted by metlslime on 2006/11/17 12:30:35
The thing you're describing is called "greyflash" -- solution: increase r_maxsurfs and r_maxedges in the console.
Ijed:
#5565 posted by necros on 2006/11/18 00:14:29
aguire's light has support for custom light attentuation on spotlights. the text on his site outlines how it works
#5566 posted by negke on 2006/11/18 01:36:29
metl: yes, static entities are definately treated differently in this respect. the first few illusionaries worked fine, the warnings only started to appear after a certain amount, i think.
ijed: i meant there are probably more than 128 (limit for static ents) brushes to be illusionary'd scattered throughout the map. most of the objects consist of around 5 brushes. apparently, that's too much already if they aren't close enough together.
my main concern was they could block the monsters but then again it wouldn't be that much of a problem either.. i might do some more tests.
Hacks And Stuff
#5567 posted by Preach on 2006/11/18 05:43:42
You could always use the non-static illusionary hack to make some of them info_nonulls with models, I think I've posted it somewhere in the teaching progs new tricks thread. Or if you're using a custom progs, making an info_illusionary clone that isn't a static entity is very easy.
:/
#5568 posted by ijed on 2006/11/18 07:00:21
just read back through aguire�s readme�s and found the relevant stuff on lighting - amazing how much control is possible, and that i forgot to check there first.
reckon preach has the dodge for the static entity limit problem . . . sounds like the only way to solve it without is by testing, as you say.
Hmm...
#5569 posted by golden_boy on 2006/11/18 07:24:03
the question just posed itself:
can I make two Quake2 teleporters point at each other, like their Quake1 counterparts? Can I do a teleporter setup like in DM6 in Quake2?
Quake2 has no trigger_teleport, but instead uses misc_teleporter, which like monsters is associated with a specific model (the idiotic disc-and-particle-thing.) Can I make it use a different model (perhaps a nice slipgate?)
Anyone knows the answers by heart or do I have to build a test map?
another question: does anyone have linux binaries of qbsp3/qvis3/qrad3 and is willing to share them? Shit just doesn't compile here. No idea why.
Without them, even a test map is hypothetical :-(
Lazarus
#5570 posted by ijed on 2006/11/18 09:12:39
was a great mod that does exactly want you want - trigger_teleport, but it forces you to use the mod, which means for DM it probably isnt what you want. you can change the model (the base) for anything you like (big rectangle with slipgate texture) although it�ll be solid, if memory serves, and the texture won�t animate, it�ll also keep the glittery yellow particle effect. its probably best just to delete the model from inside the md2 inside the pack and place it next to world geometry as you would for q1 (except it�ll be 32x32x64 for the teleport box) but since this�d mean modifying the pack anyway you might be better off with lazarus, which�ll save you from fucking about - it also has alot of other extremely nifty stuff in there, since its made for mappers and not players; it doesn�t modify weapons or anything, just gives you alot more options, like misc_actor and (very clever)monster AI.
Lazarus
#5571 posted by golden_boy on 2006/11/18 11:04:28
I know... I actually use the lazarus library for normal playing (better monster AI among other things.) but as you say, DM maps should work with stock quake.
I guess I can live with the particle fountain thingy. Guess what; I found out that you can use an info_notnull for the teleport destination :-) now that's far more flexible than those red discs! (by the way, you can aim two misc_teleporters at each other, but you keep bouncing back and forth.)
I got something to halfway work and now I can at least make .bsp files (no vis or rad sadly.)
Quake1's teleporter setup is much more elegant though. You can have invisible/huge/tiny/... teleporters in Q1. Not so in Q2. Probably no teleport traps, too (no trigger_teleport).
Sucky.
Golden_boy
#5572 posted by R.P.G. on 2006/11/18 15:38:00
There is something like if you bury a misc_teleporter 6 or 8 units into the floor, then the disc and particles no longer appear in game, but you can still teleport like normal. Try that.
Also, as you tiggered out, target the teleporters at something just in front of the other teleporter (isn't there a misc_teleport_destination?) instead of at the other teleporter itself.
.map .pk3
#5573 posted by ==Z== ze0. on 2006/11/18 21:51:26
I need help with loading Wolfenstein ET maps, for some reson i can't see the maps in Wolfenstein ET/etmain through GtkRadiant-ET-1.3
O.o i can see them if i just navigat from
My Computer\Program Files\games\Wolfenstein ET\etmain. (sorry not very discriptive lol)
please post or i would perfer you added me: Aim_Bots_Unspecified@msn.com
Thank you for your support
RPG
#5574 posted by golden_boy on 2006/11/19 05:05:07
yep, there is a misc_teleporter_dest (or something) but it's another giant red disc. If I'd use that, it would a) look funny and b) the particle fountain and the disc need some minimum distance which messes up double-teleporting. luckily, the info_notnull works very well (just like an info_teleport_destination), I'm now using it throughout. I'll also be able to properly port DM6 now, something I look forward to. :-)
the burying in the ground is something I'll try but I'd rather avoid anything that might introduce unstableness. I found out that you can turn the particles off with a cvar, so only the disc remains.
however, the trick you mentioned might allow me to build slipgates... I'll try. Thank you.
.map .pk3
#5575 posted by ==Z== ze0. on 2006/11/20 15:56:50
A quote to my last msg i can only load up the Goldrush maps such as goldrush, Super Goldrush final and thats it, i tryed ziping some of the other maps and changing the file type and then loading up the map and it comes up with an error like this Warning:Line 2 is incomplete
Thank you for your support
==Z== Ze0
#5576 posted by JPL on 2006/11/20 23:48:32
.. could you elaborate exactly on what you try to do as it is a little bit confusing. I'm not sure to understand what is your problem...
Probably
#5577 posted by HeadThump on 2006/11/21 00:27:17
something is unaligned in your map file compared to the standard format (well, whatever the parser is expecting in the editor). Sometimes when I use a Q3 to Q1 map conversion tool, I notice that it will add an extra quote to an entity listing ""worldspawn" instead of "worldspawn".
The easiest way to fix this particular problem is to put the map through a text editor using the find/replace option.
If you are not familar with what to expect when examining map files (I assume that goldrush is Quake related though it may just be Neal Young, great cover by Natalie Merchant related, har har), examine a freely available map file where everything is perfect, like Antidelevian, for instance, in a text editor and compare with your file to see if there are any descrepencies.
Goldrush Is One Of The Official Wolf:ET Maps
#5578 posted by BlackDog on 2006/11/21 01:50:30
Note that .map is not the same as .bsp, and et doesn't actually come with any .map files (that I know of). You can't edit .bsp files with radiant.
If you want to edit a .map file contained in a pk3, pull it out of the pk3 and into etmain/maps/. Radiant should see it fine from there.
|