I'll Start.
#1 posted by
metlslime on 2005/08/30 18:32:17
Here's one i thought of a while ago. You all know that only the first 4 info_intermissions can get used in a level. You could set it up so that if a player meets some requirements (like finding some special secret, killing all the monsters, or something) you killtarget all 4 "regular" info_intermissions, so that the 5th one gets used instead -- and the 5th one would point to some cool secret vista.
Metl...
#2 posted by
distrans on 2005/08/30 18:38:38
...I've got the weapon drop hack to work in level before (see the first ogre in dis_cr8z, but I've never been able to get the ammo drop hack to work. Would someone care to explain in detail?
Good thread BTW!
Dynamic Lights
#3 posted by
jsHcK on 2005/08/30 19:04:50
Add an effects field with a value of 1,4 or 8 to an entity to make it emit light. If the entity is mobile (like a door or a monster) the light will travel with it.
Possible use? Light a maze using mostly glowing monsters, so as the kill-count rises, the map gets harder to navigate.
This is a great thread because tips like this aren't as easy to come by as they used to be.
Respawning Items Without QC
#4 posted by
Preach on 2005/08/30 19:16:50
Ok, just figured this one out, it follows on from the stuff I posted in the mapping help thread, but that isn't required reading to understand how to do it. Take any item that respawns in deathmatch(I've only tested ammo but see no reason why anything else should fail). Give it the following fields
targetname shells01
target shells01respawn
use SUB_regen
Then make a trigger relay with these fields
targetname shells01respawn
target shells01respawn
delay 20
Here's the flow of action. You pick up the shells(or whatever) and so the shells fires it's target. The target is the trigger relay, which begins counting to 20. When it reaches 20, it fires it's target, which is back to the shells. Here's the cunning hack, the use function of the shells is SUB_regen, the function called in dm to respawn items. So the shells are respawned! If you have multiple items you'll get odd behaviour if you don't give them all unique names.
Of course, you aren't constrained to items respawning on a timer. You could have an arena with items, two waves of monsters, and then have all the items respawn once the second wave comes in. Assuming killing all the monsters sets off a trigger_counter with target "secondwave", give the items you want respawned the following keys:
use SUB_regen
targetname secondwave
Et voila! Loads more ammo just in time for the next attack. And for once you're probably saving entities, handy for those maps which are pushing the limits in that direction. Luckily calling SUB_regen is perfectly safe on items that are already spawned. You get the respawn noise even if it's already there, but the item isn't affected at all.
Ok, I think that's enough for tonight. Tomorrow I might do a few reposts, the triggerable trigger and the heal trigger and those, along with further experiments into unusual ammo supplies and perhaps something very old and special...
Preach
#5 posted by
R.P.G. on 2005/08/30 19:38:14
That is uber cool. Hello healing pool!
Eh...
#6 posted by
bal on 2005/08/31 02:12:14
I didn't even really know all these hacks existed, must not have been paying attention when people started using them.
What's the info_notnull explosion hack mentioned in the initial post?
Thanks for the good thread. ;)
Info_notnull Explosion
#7 posted by
Preach on 2005/08/31 03:26:19
The info_notnull explosion is a classic, and it uses just one field on one entity to work. The trick is to take an info_notnull, and add a key:
use barrel_explode
Then give it a targetname and a trigger that targets it. When the trigger is fired, the info_notnull will explode. When an entity is targetted by a trigger, the QC calls whatever function is in the use field of an entity. Most entities like doors and triggers set this field when they are spawned, overwriting what you might want to add. But an info_notnull has no code in it's spawn function, so you can add any function to use, and it will be called.
barrel_explode is quite a powerful explosion, liable to injure or kill the player. A nicer, less damaging alternative is OgreGrenadeExplode which does the damage of, you guessed it, an ogre grenade. tbaby_die2 is fun for a wierd effect, it's the purple explosion of a tarbaby.
Unfortunately all these functions end up removing the entity after the animation has completed, so the only way to get multiple explosions out of one of these is to trigger it more frequently than one every 0.5 seconds. As soon as you let it fully animate once then it's gone. There may yet be a way to get repeated explosions from one entity, but I've yet to hear it.
If you root around the quake source, you can find other functions that do things besides explosion effects, and many of them can be performed from the use field of an info_notnull. In addition, any other entity that doesn't have anything in it's use field by default(eg ammo) can do this same trick and explode on a trigger. Exploding ammo probably isn't the best example, but I'm sure there's some useful example of the idea.
About Time Such A Thread Is Started...
#8 posted by
negke on 2005/08/31 04:55:49
nice one. i wasn't aware of some of the things mentioned here, either, like the respawning items and the other kinds of explosions... so thanks, indeed. :)
re #3: dynamic lights
"effects" "1" - particle field (yellow? - i don't know if one can change the color), "2" - bright light. "3" - dim light
play (different) sounds
trigger an info_notnull which contains
"use" "train_wait"
"noise" "player/gib.wav"
"wait" "-1"
*
this works with doors (noise1 and noise2), trains (noise and noise1) and other func_s. the sound has to be precached!
*some people also used "nextthink" "0" - i'm not sure what this is good for. maybe someone can clarify...
nonsolid models
create an func_illusionary entity (=no brush!) which contains
"model" "progs/player.mdl"
"frame" "1"
the model has to be precached and its angle appears to be fixed with worldspawn.