Func_Msgboard: Teaching Old Progs.dat New Tricks.

News | Forum | People | FAQ | Links | Register | Log in

|  | Teaching Old Progs.dat New Tricks.

Posted by metlslime [209.213.199.133] on 2005/08/30 18:28:13
You know about the info_notnull explosion hack. You know about making monsters drop weapons or alternate ammo using the .weapon and .ammo_whatever hacks. You know about making items float in the air by spawning them on a temporary platform. Let's have a thread where we talk about new ways to use existing behavior and get novel gameplay. If you're a "retired" mapper, this is a great time to do some armchair level design and suggest ideas you'll never have a chance to use yourself.

I'll Start.
#1 posted by metlslime [209.213.199.133] 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 [131.172.4.45] 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 [69.198.128.221] 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 [86.129.219.66] 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. [24.136.180.235] on 2005/08/30 19:38:14
That is uber cool. Hello healing pool!
Eh...
#6 posted by Bal [83.199.49.68] 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 [86.129.219.66] 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 [85.176.68.136] 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.
Also,
#9 posted by negke [85.176.68.136] on 2005/08/31 05:00:43
is there a way to use the teleport glitter, lavasplash, lightning (without chton) and possibly gravity (without naming the map e1m8)? probably not, eh?
Nice Thread
#10 posted by Spirit [213.39.187.244] on 2005/08/31 06:17:24
how about using some marker like "->" or "Code:" in the post title to mark ready code? it would make the thread even more useful i think
Code: Lightning And Monster Triggers
#11 posted by Preach [86.129.219.66] on 2005/08/31 08:50:58
Teleport glitter, such a nice name for it. I thought it was possible to do this like the explosions, but that's not the case, spawn_tfog will always put them at the origin. This is because spawn_tfog is a function with a parameter in the QC, it's defined as
void(vector org) spawn_tfog. Use will always pass a null parameter to this, the value '0 0 0' for a vector.
However, this same thing actually allows us to get lightning beams working! I'll detail the trick first, then explain how it works. You need something to trigger the lightning, lets say a trigger_once with target l1 for simplicity's sake.
Make an info_notnull with these keys, doesn't matter where it is
targetname l1
use FireBullets
v_angle 'x y z'
where x y z is the angle you want to fire the lightning at.
Then make an info_notnull in the place you want the lightning to start with these keys.
targetname l1
use W_FireLightning
ammo_cells 9999999
This fires the player lightning attack, so it does damage, and has a 600 unit range. Each time the lightning is fired it uses one cell from the ammo_cells count, and it won't fire with none, so set it nice and high if you don't want a limit. The most important thing is that the FireBullets entity is one entity higher up in the maps entity list than the W_FireLightning.
How does this unlikely thing work? Well, W_FireLightning fires a bolt along the vector v_forward. The firing thing pretty much works like any other info_notnull does, the only problem is this v_forward vector. v_forward is usually set to the player's facing duing player functions, so we need to find a function that sets it for use.
This is where the other entity comes in. It calls FireBullets. How is this safe? If you look at the FireBullets code you might notice it has parameters (float shotcount, vector dir, vector spread). Luckily, all these values are null, so the shotcount is 0 and it fires nothing. Luckily before it fires it aims the v_forward vector along it's v_angle. The order in which the entities are spawned is vital, becuase that's the order they will run their 'use' functions when they are triggered.
Wooo, that took a while. Ok, for a little bit of fun, how to make a trigger that will be triggered by anything that touches it, not just players. This includes everything from rockets up. I know somebody wanted this in mapping help a while back, but I only figured out how to do this today. Make a brush with class info_notnull and keys
think InitTrigger
nextthink 0.1
touch multitrigger
and any of the trigger_once/trigger_multiple fields you like. Two caveats. One of them is about sounds. The "sounds" field won't work, but if you set the noise field to a sound precached already then that will play. The second one is this trigger is a bit dangerous. Don't give it a message or you'll end up crashing the game if a non player triggers it, I expect. Also, the activator will always be world, so it may not trigger everything right. Of course, activator would be player otherwise, so anything that relies on that probably would be inappropriate for a trigger activated by anything.
Ok, done for now. Have fun
Preach
#12 posted by jsHcK [69.198.128.221] on 2005/08/31 09:37:51
Thanks for posting the respawning items hack. I wanted to ask you about this yesterday but I didn't want to impose.
I now have two ways to build a functional healing pool, and one way to build an ammo generator. Thanks again.
Enableable Trigger_changelevel:
#13 posted by czg [81.191.27.124] on 2005/08/31 10:03:23
Make an info_notnull brush entity and give it values like this:
"map" <mapname>
"use" "trigger_changelevel"
"touch" "SUB_null"
"solid" "0"
"targetname" <name>
The trigger does nothing until it is triggered, upon which it becomes a trigger_changelevel.
Works by calling the actual trigger_changelevel spawnfunction in the use field, which normally crashes with most classes because they usually precache stuff there, but trigger_changelevel doesn't.
Firing Stuff
#14 posted by czg [81.191.27.124] on 2005/08/31 10:59:02
Premise: Set a monster's firing function as an info_notnull's use function to make it fire monster missiles of your choice.
Problem: All the monster missile functions require the self.enemy field to be set to the entity for which to aim towards.
Solution: Entity references in quake is really just a number indexing the entity in edict list. The player will always be entity 1. If you set the info_notnull's "enemy" field to "1", you'll get a entity that fires a missile towards the player when triggered. I'm sure you can, by looking through the edict list when you have completed the map for release, figure out what the entity index for any entity will be in your map, and so make it aim towards any entity.
For example, in the map I uploaded below, all the info_notnulls have "enemy" "7", which I found out through the edicts list is the info_player_start in this particular map. I think that your results may vary on this, as it could be that editors like to save the entity order in not exactly the same way every time, and also other uncertain factors.
Examples:
"use" "OgreFireGrenade"
Fires an ogre grenade towards self.enemy.
"use" "CastLightning"
Shoots a shambler lighting bolt towards self.enemy.
"use" "hknight_shot"
Fires a single (just one) hellknight magic missile towards self.enemy.
Requires a hellknight to already be present in the level for the precaches to work.
"use" "ShalMissile"
Deploys a voreball that starts seeking towards self.enemy. I had some problems with this when it collides with un-alive things. Looked like it just disappeared without a trace.
Requires a vore to already be present in the level for the precaches to work.
"use" "Wiz_StartFast"
"health" "1"
Fires two wizard slimewotsits towards self.enemy. The health field is required because the actual function that fires the missiles checks if the scrag is alive first. (See below.)
Requires a scrag to already be present in the level for the precaches to work.
"use" "Wiz_FastFire"
"owner" <entity-ref>
Fires a wizard slimewotsit towards self.enemy. The owner field is required because this function checks that whatever spawned the missile (usually a scrag) still is alive first. Thus the owner field here must refer to an entity that is "alive". That is, it must have a "health" field set to anything non-zero. "owner" "1" should work, as that refers to the player, which usually is alive.
Requires a scrag to already be present in the level for the precaches to work.
"use" "boss_missile"
Fires a Chthon fireball towards self.enemy. This requires that self.enemy is alive (has health), or else it will start seeking after the player no matter what you intended. I tested this with a info_player_start as the target, and it worked once I gave it "health" "1".
Requires a monster_boss to already be present in the level for the precaches to work.
The result:
http://czg.spawnpoint.org/stuff/og...
http://czg.spawnpoint.org/stuff/og...
(Sadly didn't manage to capture the shambler bolt)
Map file:
http://czg.spawnpoint.org/stuff/og...
Third-Hand Information
#15 posted by jsHcK [69.198.128.221] on 2005/08/31 11:51:50
Kindly provided by John Payson and Fat Controller.
http://www.planetquake.com/fatty/d...
Monster Weapon Firing
#16 posted by Preach [86.129.219.66] on 2005/08/31 11:57:10
That is genius czg, I'd triedsomething like this before, but that's much neater than my method was. One especially useless thing you can do with monster functions is add them to creatures that don't have that kind of attack. So you can have a knight with missile attacks by adding the function to the th_missile of the knight. Wiz_StartFast and ShalMissile work alright, CastLightning is a tad unfair, sham_magic1 is a bit better but causes wild animation frames after the attack until it goes into pain or melee attack.
You could combine this with additional hitpoints and possibly quad to make a boss monster type thing out of a knight. For those who've never seen it, adding a key of "armortype 1" and of "armorvalue x" gives a monster x additional hitpoints. Quad is accomplished by setting a key of super_damage_finished to something overly large, like 9999999. However, without some kind of visual cue your boss monster is different to a regular knight, it's not really fair on the player. Maybe you could get away with it if you used some of the effect flags, but I'd still think of this mostly as something to mess about with for fun, rather than something you'd want to include in a released map.
I've still got a few of these things I've not written up, I'm gonna look to making an example map for one, then I'll see about posting the details.
Somethings I Forgot
#17 posted by czg [81.191.27.124] on 2005/08/31 12:17:50
About the "use" "Wiz_FastFire" bit, there's a remove(self); call at the end of that, so the info_notnull will be gone when it fires once. It can't be fired multiple times.
About the setting "enemy" "1" thing to make them target the player, this obviously won't work with coop, as they'll only target the FIRST player. Also I guess when other players connect they'll be added to the end of the entity list (?) and thus be impossible to find the index for. (Might join at different times, before/after certain events that create/remove edicts.)
CastLightning is a tad unfair
The shambler lightning bolt could be used for traps, like having it fire across a hallway once every second so the player has to time a jump across. And also just for decorative purposes, as and alternative to the event_lighting setup.
So. Hellspawn
#18 posted by HeadThump [65.140.59.223] on 2005/08/31 12:49:33
that fire off Shambler bolts? I am in evil mapper heaven.
Cujo!
#19 posted by R.P.G. [24.136.180.235] on 2005/08/31 12:58:50
"classname" "monster_dog"
"armortype" "1"
"armorvalue" "999999"
"super_damage_finished" "999999"
/me imagines a monster_dog chasing the player around a level until the player finds a weapon and ammo cache
Rpg
#20 posted by inertia [134.53.108.1] on 2005/08/31 14:07:39
:D
A Few Quick Ones On Fatty's Site
#21 posted by NotoriousRay [69.250.87.12] on 2005/08/31 14:26:10
http://www.planetquake.com/fatty/d...
Logic Gates...
#22 posted by metlslime [209.213.199.133] on 2005/08/31 16:05:58
In case some people haven't heard of this, there's an old trick discovered independently by various mappers to get more complicated logic into your entity triggering.
The basic concept is to create some box room off in the void, and put a spikeshooter, a func_door, and a shootable button in it. When the door is open, the spikeshooter will shoot the button, so if this "logic gate" will pass the message on to whatever the button targets. If the door is closed, the spike will hit the door instead of the button and the event gets blocked.
Use this the way you'd use an "if" statement in a scripting language.
CastLightning Is A Tad Unfair
#23 posted by Preach [86.129.228.37] on 2005/08/31 19:19:40
I probably wasn't clear on this when I said it, but I just meant CastLightning is a tad unfair when you give it as an attack to a knight. It fires instantly without any warning or charge up so it's impossible to avoid. As it's own entity I'm sure it's fine.
Great Thread
#24 posted by Blitz [65.96.61.71] on 2005/08/31 20:52:59
All good stuff so far...there's one I'm wondering about though, maybe someone could explain it.
Remember zippie's 100b map 'stamppot' ? There was a teleporter you go through and you end up disoriented and your movement is all weird. I could be wrong, but I think it was more than just clever brush work/player placement.
Sounds Like Your
#25 posted by HeadThump [65.140.58.111] on 2005/08/31 21:16:21
clipping into a HOM there (<--spelt it right that time)
But
#26 posted by inertia [134.53.108.1] on 2005/08/31 23:18:44
you didn't spell 'your' right :p
The World Clearly Needs...
#27 posted by mwh [82.33.185.193] on 2005/09/01 01:21:41
... a 'crazy progs tricks' themed speedmapping session!
Blitz:
#28 posted by czg [85.93.227.233] on 2005/09/01 01:58:32
"angles" key on the info_teleport_destination IIRC.
Either "angles" or "viewangles" or something like that.
One Homonym At A Time
#29 posted by HeadThump [65.140.58.129] on 2005/09/01 04:47:00
my friend, and years from now I'll be a spelling God!
CZG: Multiple Player Entities
#30 posted by Preach [86.129.224.78] on 2005/09/01 09:07:42
The first n entites are always reserved for players, where n is the maxplayers of the current server. So if you're running a 2 player coop server, an entity with "enemy 2" would target the second player. Not much use though, as in a single player game an entity targetting entity 2 is gonna be shooting at the origin - as the next entities after the players are bodyques, used to mark corpses when players die. As far as I know, there's no way to hack in any co-op only behavior, and even if you could, you certainly would have difficulty customising the map for the number of players.
That said, I'm looking at one tiny prospect in a function in items.qc for causing events to occur only in coop, but don't hold your breath.
Double Post - But Coop Solution
#31 posted by Preach [86.129.224.78] on 2005/09/01 10:01:36
This is one big hack, it combines quite a lot of stuff towards one end, and one of the steps is extremely unlikely. It uses the player lightning hack, the logic gates and the use function. But what it does is creates a trigger that will be fired at the start of the map if it's single player, but will not be fired if the game mode is coop(or deathmatch). It's not as good as having a coop only flag, but it would let you alter the gameplay if it's being played as coop.
Ok, so, an overview of what's gonna happen first. We will build a logic gate to test for coop. The logic gate will not use any actual gates, it will just be a shooter and a shootable button. However, rather than use a regular spikeshooter, we instead use an info_notnull based on the player lightning shooter that will only fire if the game is not coop.
Ok, so, the stuff. Build a room away from the main map with a shootable button at the end. Give it a low amount of health, no more than 30hp. Give it a target of notcoop, this is the trigger that will be fired if the game is not coop : - )
Now for the more complicated bit. Make an info_notnull with these fields
targetname cooptest
v_angle x y z
use FireBullets
Then make another info_notnull straight after that with these fields
targetname cooptest
use W_FireLightning
nextthink 0.3
think CheatCommand
The second info_notnull should be in sight of the button, and the v_angle of the first entity should be the angle the second one needs to fire at to hit that button.
Ok, one more entity is needed to trigger cooptest, but it's important that this doesn't happen until the lightning info_notnull has had time to run cheatcommand. So the easiest way to do this is with another info_notnull, with the following keys
target cooptest
nextthink 2
think DelayThink
And that's it, not bad for four entities by my reckoning. Oh, you wanna know how it works? Ah, that's a good trick. CheatCommand is none other than that family favourite "impulse 9". Which happens to give the entity 200 cells, when before it had none. W_FireLightning requires the entity to have cells before it will fire. And in coop, impulse 9 doesn't work, so the lightning remains without any cells and doesn't fire. Seems I was a bit pessimistic earlier...
Wierd...
#32 posted by generic [69.244.212.159] on 2005/09/01 12:49:13
A tried adding "effects" "1" to a func_door to what I thought was no avail. Instead, all I got was a glowing swarm-of-bees around the map origin. What was REALLY strange was that this "swarm" seemed to be responding differently to the various sounds ocurring on the map, i.e. shotgun blasts, rocket explosions, etc. O_o
P.S. Only in Fitzquake though :)
Brush Models And Effects
#33 posted by Preach [86.129.224.78] on 2005/09/01 13:28:56
A brush based model such as a func_door will always have it's origin at the centre of the map when it's in it's natural position - ie the position it was in when you built the map. If it then moved down 64 units when it opened, then the centre of the swarm would also move down 64 units. So I'm guessing the effect was just being applied to the origin of the entity, which happens to not be anywhere near the door.
What you could do is move the door so that it's over the origin, then use an entity editor to move the door back to where it should be, by giving it a key of origin x y z, where x y z is the displacement to move it back into position. You may have to perform further editing to make everything work right. For example, when I just tested this I needed to add a trigger_multiple to set the door off, as the automatically generated trigger still lay at the origin. Things like not linking multiple doors may also help.
As to the weird reaction of the particles, I also saw this in fitquake080. I suspect that the swarm is reacting to other things that create particles, like gunshots/explosions, rather than the sounds, but something odd is happening.
Omg
#34 posted by NotoriousRay [69.250.87.12] on 2005/09/01 14:36:11
the particles are coming FROM INSIDE THE LEVEL!!!111
Re: Double Post - But Coop Solution
#35 posted by necros [70.31.50.57] on 2005/09/03 17:19:38
woah, rockage! ^_^
Dynamic Mapmodels And Overwriting Paths
#36 posted by Preach [86.129.220.254] on 2005/09/15 06:30:00
This thread's almost fallen off the page, so I thought I'd put a couple more things on here. The first is how to make a non static entity with a model. This is like the func_illusionary trick, but because the entity remains dynamic you can remove the entity later. You can also set angles on it, something neg!ke said wasn't possible with a func_illusionary.
The downside is that you have to mess about with modelindex to make the model display correctly. Make an info_notnull with these properties:
mdl progs/player.mdl
modelindex n
think SUB_regen
nextthink .3
Where n is the modelindex of the model you want to load. How does modelindex work? As the quake engine precaches models for the game, it places them into a numbered list. The modelindex of a particular model is it's number on this list. Index 0 is the null model, index 1 is the world itself. The next models will always be the brush models from the bsp, then the models precaches by the QC in the order that the models are first precached by the spawn functions.
This all makes it a big pain to work out which model has which modelindex. I'd recommend running the map through darkplaces or aguires engine, as these have commands that will display the list of models along with their modelindex. Be warned, the order in which models are precached may change if you alter the entities in your map. Also, different skill settings may have a different modelindex, so be careful.
On the plus side you can set all the things like frame number and angles without a problem, and even give the same entity a use function if you desire.
Ok, now for overwriting paths. What this does is allows a one time alteration of the path of a func_train. You can't toggle it back, and you can't switch it again to another path. But someone might be able to find a use for it.
Ok, here goes. To make the explanation simpler, we are going to alter just one point on the path, you can expand this to replacing multiple points and doing more complex things quite easily, it just takes more fiddling with triggers. Make a path of path_corners with targetnames p1 -> p2 -> p3 -> p4 -> p1. Then make the replacement p1 path_corner, making sure it is further down the entity list than the original p1. Give the replacement p1 the same targetname and target.
At this stage what should happen if you run the map is that the train goes between the first four points, the second p1 path_corner will be ignored. Now for the trick, add a key to the original p1 of
use s_explode6
Now, when you want to change the tracks, just fire a trigger that targets p1. This will run s_explode6 on the original point, which removes it in 0.1 seconds. The new p1 has no use function, so it remains. Why use s_explode6 instead of SUB_Remove? Well, just for neatness really, it's possible that you'll be triggering p1 from a touch function, and removing entities during a touch function can be dangerous.
That's the basic idea, anyhow, but you can do quite a bit with it, it's mostly how you set up the new p1. For example, there's no reason the new p1 has to target the same entity as the original p1, it could go p1->p1a->p1b->p2 and then back through the original path. You could choose never to return to the original path, do something like p1 -> q1 -> q2 -> q3 -> q4 -> q1. And then you could pull the same trick again with q2, switching onto yet another path...
You might be tempted to try this with monsters following paths as well. In theory this should work, but there is one problem. If you remove the point the monster is currently heading for, it'll start heading for the world origin and won't ever resume it's path. This doesn't happen for func_trains as they calculate exactly how far they have to move as soon as they start moving. Monsters have to hit the trigger of the path_corner, and constantly correct their course using the navigation AI. Bit of a shame, but there's not as much use for changing monster paths as func_trains offer anyway.
Question
#37 posted by R.P.G. [24.136.180.235] on 2005/09/15 10:03:39
How many of these tricks will become invalid when loading the map in a custom progs.dat, such as Nehahra or Zer? That's perhaps the only thing that might stop me from using some of these.
Teaching New Progs New Tricks
#38 posted by Preach [86.129.220.254] on 2005/09/15 10:59:27
It's hard to say exactly how many would still work with a new progs. Potentially all of these could be broken by a new mod, if it was written correctly. But I'd say in the vast majority of mods, the vast majority of tricks will work. Like the use trick would stop working in only two circumstances; the mod completely rewrites the entity triggering system(which would mean you'd have to map differently for it anyway), or the mod adds a use function to the entity you're trying to use. The former would really only occur if it was some total conversion thing, and the latter is unlikely to affect info_notnulls.
I'd say that probably all of these tricks would still work in zer, and quite a lot of them in nehahra. As a rule of thumb, a mod that just adds content without changing the base stuff should accept these tricks. The more it alters what went before, the greater the chance something will fail, which is why zer should run them but nehahra may not.
Just An Aside
#39 posted by mwh [82.33.185.193] on 2005/09/16 01:09:38
I know QdQStats will break the coop detection stuff, because it allows some of the 'cheats' in coop (for route planning purposes).
You Know,
#40 posted by necros [70.31.50.57] on 2005/09/18 20:53:55
having mapped for this game for a few years and all that, i thought it was really cool that there were so many tricks i never knew about. thanks for these-- i already found a use for the respawning items trick. ^_^
Neg!ke
#41 posted by Mike Woodham [86.137.1.69] on 2005/09/19 02:59:53
What do you mean by 'create an func_illusionary entity (=no brush!)'?
In BspEditor, there is no choice but to have a func_illusionary attached to a brush. This is where you can walk through what appears to be a solid wall.
If I use "model" and "frame" anyway, the model does not appear, just the brush.
Unbrushed
#42 posted by Preach [86.129.212.220] on 2005/09/19 03:37:12
The idea is to make a regular point entity, and give it the classname func_illusionary, as though func_illusionary were a custom mod entity. In worldcraft, this causes problems as the fgd file says func_illusionary is a brush class. One way to get round that is to remove the definition of func_illusionary completely, as it has no parameters, and name both brush and point func_illusionary entities manually. I don't know how much of that extends to BSPEditor, but you may want to look at doing something similar.
Mmmm...
#43 posted by Mike Woodham [86.137.1.69] on 2005/09/19 04:57:33
OK, so I remove the func_illusionary from the ents.qc and now I can't see it in the editor.
I then create a light entity and rename it to func_illusionary and add 'model' and 'frame'.
I have Qbsp on -verbose and see that a texture is not being found, and when I look at the map file, a texture has been added to the func_illusionary:-
{
"frame" "1"
"model" "progs\player.mdl"
"classname" "func_illusionary"
"origin" "0 0 0"
{
//"0000" "0"
( -8 8 8 ) ( -8 -8 8 ) ( -8 -8 -8 ) NONE 0 0 0 1.000000 1.000000
( 8 8 8 ) ( -8 8 8 ) ( -8 8 -8 ) NONE 0 0 0 1.000000 1.000000
( 8 -8 8 ) ( 8 8 8 ) ( 8 8 -8 ) NONE 0 0 0 1.000000 1.000000
( -8 -8 8 ) ( 8 -8 8 ) ( 8 -8 -8 ) NONE 0 0 0 1.000000 1.000000
( -8 -8 8 ) ( -8 8 8 ) ( 8 8 8 ) NONE 0 0 0 1.000000 1.000000
( 8 8 -8 ) ( -8 8 -8 ) ( -8 -8 -8 ) NONE 0 0 0 1.000000 1.000000
}
}
The actual origin of the entity is not '0 0 0' but I can now see the player model in-game where I set it in the map (not 0 0 0).
If I now try it again with "model" "progs/ogre.mdl", the engine gives an error of 'no precache' of the model for the func_illusionary even though I have ogres in the map.
Does this mean that the engine is seeing the func_illusionary before the ogre is precached, and if so, can I do anything about it without resorting to messing with the progs.dat?
#44 posted by negke [85.176.89.151] on 2005/09/19 05:21:28
in the map file a monster_ogre entity must be placed before (are rather above) the func_illusionary.
i don't know about texture thing you said, but there must not be a brush assigned to the illusionary. try to delete the brush and set the { and } accordingly.
Neg!ke
#45 posted by Mike Woodham [86.137.1.69] on 2005/09/19 06:01:35
I cut'n'pasted the func_illusionary to the end of the file and then ran Qbsp from outside of the editor (because the editor seems to change the order of things arbitrarily), but still no show :-(
Precaching
#46 posted by Preach [86.129.212.220] on 2005/09/19 06:01:42
First off, I don't think that the brush info at the bottom should be there, but I can't say why it appears. Perhaps try deleting all those brush info lines from the map file to make it look like the other point entities then try a recompile. Then again, if it's working with a player model maybe that's what BSPEditor expects.
The precache thing I suspect is fixable. Precaches occur in the spawn functions of entities, and the spawn functions are called in the order that the entities are listed in the map files. So if your func_illusionary entity is higher up the list of entities than the ogres in your map are, then the ogre.mdl won't have been precached yet, even though one would be before the map loads.
So just make sure there's at least one ogre higher up the entity list, and that error should go away.
Too Sloooow
#47 posted by Preach [86.129.212.220] on 2005/09/19 06:07:18
I took twice as long as neg!ke to say the same thing, never mind that post
Ogres At War
#48 posted by Lardarse [82.32.58.225] on 2005/09/19 13:36:10
I'm not sure that this is interesting enough, but I'll post it anyway.
If you have a monster_ogre_marksman next to a monster_ogre, the end result will be 2 ogres that can get mad at each other. I don't know if any map uses this yet (or wants to use it) but someone might find a use for it...
This bug only works, because in the code, the classname isn't changed when it tells it to just put in a normal ogre.
Lardarse
#49 posted by Ankh [83.16.98.218] on 2005/09/20 02:14:47
Didn't you play PuLSaRs Hellbridge recently? :)I think that on this map you can see some ogres fighting on skill 3.
Question
#50 posted by inertia [134.53.108.134] on 2005/10/04 22:07:50
is it possible to make shootable doors? basically, you shoot the door, and it opens. then after a bit, it closes. ideally, whenever you shot the door, it would open up again -- even if it was in the process of closing.
i want to do something like the doors in q3's tourney4 map (pro-t4).
Inertia
#51 posted by JPL [213.30.139.243] on 2005/10/04 22:52:14
You just have to set a health value (5 is in general ideal, i.e you can open the door with axe), and set wait at a positive value (-1 never return)... I think I did this for a secret area door hidden in a wall in my last map... I think other people here could confirm...
Inertia (bis)
#52 posted by JPL [213.30.139.243] on 2005/10/04 22:53:08
I guess you understood I was talking about func_door fields there... ;P
Jpl
#53 posted by inertia [134.53.108.134] on 2005/10/04 22:59:23
thanks! and yes obviously they are teh doors ;)
Inertia
#54 posted by R.P.G. [24.136.180.235] on 2005/10/05 09:00:11
What JPL described will work; however, shooting the door while it closes will not have an effect--you can only shoot it while it's closed. You could minimize this problem by giving it a very fast "speed" field, though.
Rpg
#55 posted by inertia [134.53.108.134] on 2005/10/05 23:25:39
i just might do that, thanks
Preach
#56 posted by negke [82.83.37.33] on 2005/12/01 05:51:52
about the trigger that can me touched by anything in #11:
i did it exactly like you said (btw it's multi_trigger), but i couldn't get it to work. in the test map i made it was supposed to just fire a trigger_relay with a message.
there were also some unknown bboxes with that shouldn't have been there and they disappeared when shooting them. they seemed to be related to the touch-trigger.
As For Messages
#57 posted by czg [213.115.252.84] on 2005/12/01 06:46:43
If anything that prints a message has an activator other than the player, the message won't be printed to the player.
You can see this at the end of terra5 where a trigger_counter counts the deaths of the fiends and wakes up chtohohothothton and prints some messages when they're all gone. However if you trick the fiends into jumping in the lava, there's a trigger_hurt there that kills them, and then the messages aren't displayed because the activator was the trigger_hurt.
Same thing with the logic gates you can build with trap_spikeshooter and doors in front of a button. You can't have the button print a message because it's activator is the trap_spikeshooter, not the player.
So I dunno if I'm quite following you up there, but if you are trying to prove a trigger was fired by something else than the player by printing a message, you should try something else. (Perhaps a light switching on of a door opening or something.)
Yes, You're Right
#58 posted by negke [82.82.172.67] on 2005/12/01 09:11:52
i thought it would be fine if not the trigger itself had the message but some other entity that is fired by it.
i tried it with a light then and it worked.
to have a message displayed, i guess i would have to let it activate another trigger which spans over the entire room the player is in at that moment, or something like that...
Boo!
#59 posted by negke [82.82.172.67] on 2005/12/01 09:29:46
gibs don't trigger it, either.
there goes my idea... :/
Monsters That Stick To A Defined Area
#60 posted by therealthan [210.142.230.145] on 2005/12/13 21:01:16
I am not 100% sure this really does work or not, but I THINK that if you create a func_wall entity that surrounds a monster, and kill the func_wall when the level has loaded, the monster will stay in the same place as if the func_wall was still there, yet be able to see and shoot the player. If the monster has a jumping attack, then if it jumps toward the player, it will come out of the box and act as normal.
I am about 50% sure this works, as I remember doing this when I made apsp1, trapping some enforcers on a ledge. The func_wall may have been made from clips.
I've seen some other strange func_wall tricks used in other levels. RPG used some funny trick in one of his mini Ep1 maps, where there were some nights trapped apparently within func_wall brushes. that acted like statues, but came alive later in the level. I would be interested in how that works, RPG.
Woah
#61 posted by necros [70.31.50.57] on 2005/12/13 22:40:34
holy fuck, does that work? :o can anyone check? i would, but, alas, no quake. :S
regarding the rpg trick, i think you could do it by using the func_wall with the model set, the killtargetting the func_wall and just teleporting in the real monster.
Func_wall Trick
#62 posted by negke [82.83.57.219] on 2005/12/14 00:00:39
restrincting a monster to one are are does not work like that. also, having a func_wall with the clip textures let's qbsp stop with an error message.
the rpg trick is achived through func_walls with skip textures, and then killing them when the monsters are supposed to become active.
^
#63 posted by negke [82.83.57.219] on 2005/12/14 00:03:52
oh, of course you can making monsters stay in a certain area by sealing it with trigger_monsterjumps (that should have height and speed set to "1", so it's less obvious), for example.
Posting Drunk
#64 posted by R.P.G. [24.136.180.235] on 2005/12/14 03:33:49
the rpg trick is achived through func_walls with skip textures, and then killing them when the monsters are supposed to become active.
Exactly. Monsters behind func_wall made from skip (so it appears invisible), and then killtarget the func_walls when you want the monsters to activate. They suddenly "see" the player and come alive.
As Demonstrated In Neg!ke's Recent Doggy Map
#65 posted by mwh [134.99.112.244] on 2005/12/14 05:04:22
we
As Demonstrated In Neg!ke's Recent Doggy Speedmap
#66 posted by mwh [134.99.112.244] on 2005/12/14 05:04:37
when are we going to see the speedmap session based on tricks from this thread?
Skip
#67 posted by therealthan [210.142.230.150] on 2005/12/15 03:34:03
Are you using tyrann's skip tool, or as aguire built it into his compilers. I think I have the skip tool, but I remember Tyrann saying it had some issues so I have steered clear.
This thread is awesome by the way.
Than
#68 posted by R.P.G. [24.136.180.235] on 2005/12/15 09:54:51
I used Tyrann's skip tool. I've never had any problems with it.
Bump For MW
#69 posted by aguirRe [213.101.72.153] on 2006/01/02 17:07:03
.
Been A While, Time For A Hack
#70 posted by Preach [131.111.249.139] on 2006/06/19 07:33:13
There've been a few hacks posted in the mapping help thread since this thread last saw light of day, so if anybody saved them it'd be nice to have them here too. Today we're going to see how you can safely remove weapons and ammo from the player.
I discovered this trick looking for something quite different. Doors that require keys compare their items field to the player's items, and subtract off what they find if it matches. So I was experimenting by changing the .items field manually, rather than setting the gold/silver key flags. You can make a door that only opens if you have quad for instance, but the problem is the quad items flag gets subtracted once you open the door. This doesn't affect the powerup, you'll still do quad damage for 30 seconds, but it removes the icon from your screen. And once the 30 seconds is over the flag is subtracted again, which causes an overflow of the items field and all the icons start lighting up - it's bad.
However, the nice thing about the door is that it safely removes weapons, as these are just stored in the items field. So the simple way to remove a weapon from the player would be just to have a door with an item set to that weapon's item number. You can also sum weapon numbers, and if the player has all of those weapons, it removes them all. Two problems exist for this niave approach:
One: Just removing the weapon from the player's item doesn't force the player to change weapons, so if they are currently using a weapon you want to remove they will still be able to use it until they switch away from it.
Two: If you're removing weapons later in a map, you may not know if a player found the grenade launcher or not. The removal is all or nothing, if the player doesn't have all the weapons you want to remove then none of them get removed and the door remains locked (also it sends the message "you need the gold key"...)
We can solve both these problems at once, whilst at the same time removing ammo from the player. The trick here is to use BackpackTouch to give the player all the weapons they need to open the door, then instantly take them away. At the same time, we give the player full ammo, then take it away with another BackpackTouch, this time with negative ammo counts. And when the ammo count is updated, quake checks which weapon the player should be using, so you won't end up using a weapon you don't have.
So, here's the entities you need to add. I'm assuming you want to remove every weapon except the axe(see below), which gives an items field of 128.
First, a brush based info_notnull with the following fields
touch BackpackTouch
think InitTrigger
nextthink 0.2
ammo_shells 100
ammo_nails 200
ammo_rockets 100
ammo_cells 100
items 127
Then another info_notnull with
touch BackpackTouch
think InitTrigger
nextthink 0.2
ammo_shells -100
ammo_nails -200
ammo_rockets -100
ammo_cells -100
Finally, add a regular func_door with
items 127
You want to ensure that the player hits all of these entities in this order, in as quick sucession as possible, and don't let them avoid any of them. So dropping the player onto the func_door through the other triggers is probably best. Putting the two info_notnulls on exactly the same region of the map is wise, as long as the one with positive ammo counts is higher on the entity list. If you still have problems, the following extra entity can help - an info_notnull with
touch teleport_use
think InitTrigger
nextthink 0.2
This trigger sets force_retouch to 2, which means all objects retouch everything next frame. Presumably this means you retouch it, which resets force_retouch again and over again while you stand in it. Oh well.
So, why is the axe exempted from this? Well, it's quite annoying really. There are sections of the code dedicated to what to do if the player doesn't even have an axe, and these all work well and good, but then there's one lazy line in client.qc that always switches you to the axe if you have no ammo, without checking if you have an axe first. Grrr. So you can't completely disarm the player, but you can get fairly close.
A few other things. One is the annoying messages saying "you recieved -100 shells etc.." that you can see in the console. Add an extra info_notnull in the same spot, with the following fields
touch powerup_touch
think InitTrigger
nextthink 0.2
noise misc/null.wav
netname \n\n\n\n\n
This spams some newlines so the messages are only visible in the console. Creative types might include a message here explaining where all your weapons went.
And A Final Word Or Two
#71 posted by Preach [131.111.249.139] on 2006/06/19 08:02:12
I split up this post, since it was getting quite long. The trick relies on just the function door_touch, so you might feel using a full blown door is overkill. Couldn't we just make a further info_notnull with touch set to door_touch? Well, yes and no. You can do it, and it's obviously nicer in terms of level design to remove weapons with a hidden trigger, but it's more work than you'd think. The code for linking doors means that you'd need to set the info_notnull's owner field to point to itself, which requires mucking around with entity numbers. Just using a door simplifies the explanation, and keeps the focus on the trick to remove the weapons, rather than the fiddly details of faking a door trigger.
My final comment is, after all that, it is possible to make a door that opens based on having certain items, by adapting some of the tricks here. For the purposes of this example we will use a red armour(items bit 32768), but it should work for powerups too.
The important thing here is that you know exactly what flag is being removed by the door, so you can add it straight back on with another
call to BackpackTouch. The difference here is that we don't spawn the trigger until after the door opens, and we use the teleport_use function to force the player to retouch the newly spawned trigger. I guess iD didn't see Init_trigger being used outside the spawning sequence, as it would make a lot of sense just to put force_retouch 2 into that piece of code. Still, we make do, here's the deal:
Add a func_door with
items 32768
target restore
Surround that with a larger brush info_notnull with
touch teleport_use
think InitTrigger
nextthink 0.2
Finally add an info_notnull again larger than the door with
touch BackpackTouch
items 32768
use InitTrigger
targetname restore
netname \n\n\n\n\n
Notice that we call InitTrigger with use, not with think. The netname is for neatness once you open the door.
The door will always give the message "You need the gold key", this is hardcoded and unavoidable, plus quite misleading for the player. So you'll also want a trigger_multiple spamming out "You must have red armour to proceed..." on the door. Remember to remove it once the door opens.
A final word of caution, be careful how you impliment these into a map. The player cannot lose a key, so it's always possible to progress. The same is not true of armour, or even less so a quad. So what do you do if the player takes the armour, but doesn't get back to the door with any left? Should that be game over? And if so, can you at least automatically tell the player they've failed (perhaps an exercise for the enthusiastic reader, how to use this hack for a general armour detection trigger rather than a point check at a door. The corresponding check for a powerup is much easier :-) )Perhaps the best thing a door like this could be used for is not allowing them forward until they have a certain weapon...
And that brings us full circle I guess. Have fun!
.
#72 posted by necros [70.31.50.57] on 2006/06/19 09:46:03
am i right in guessing that would work for runes? they have bitflags, iirc, so you could use those for extra keys..?
Not Exactly
#73 posted by Preach [131.111.249.139] on 2006/06/19 10:46:54
The runes don't actually set anything on the player, they set the bits of a global float called serverflags. So this can't be caught directly by a door. There is a roundabout way of using runes to trigger things, but it involves a system of "logic gates". You have a trigger_multiple at the door that targets the following info_notnull:
use func_episodegate
spawnflags [1-15]
This info_notnull is positioned as a blocker in the first logic gate. This is then inputted into a NOT gate that will target the door open. Kinda round the houses though, as you could basically do the same thing by using a spawnable trigger for the door (using the info_notnull hack) that is spawned when you pick up the rune.
However, it is still possible to make extra keys, they just won't have an indicator on the HUD. Simply use item flags that don't indicate any weapons. 128 represents IT_EXTRA_WEAPON, so it's unused. You can also go a few powers of 2 higher than 4194304(IT_QUAD). So just making a BackpackTouch that gives you one of these dummy items will give you a new key.
The main edge this method has over the two ways of doing runes is that it'll work properly in coop, ie. only players who have taken the key will be able to open the door. The downside is that if they die, the key may be lost forever, as the BackpackTouch works only once.
The way round this is, strangely enough, to use the actual key_touch function instead of BackpackTouch. Just set the items, netname and noise as you desire, and it'll just work.
You'll probably need to have a seperate entity to represent the key visually, that gets removed when the key_touch info_notnull is fired, but not in coop mode. So that's a combination of the coop trigger hack, and one of those dynamic func_illusionary things from the mapping help thread. Phew, and all that to get things working in coop.
If you don't care about coop, you might as well just go down the route of spawning the door's trigger when you "pick up" the key, it's easier and fewer entities for the same result.
Quick New One
#74 posted by Preach [131.111.249.139] on 2006/06/19 16:46:21
For those of you who want to emulate Half-Life, here's how to make monsters mad at one another. You really need to script fights carefully though, you aren't creating alliances between groups of monsters, you're just selectively annoying them as if they shot one another. So after they kill their one target, they'll just stand around unless attacked again, even if others are fighting.
Perhaps a good way to choreograph a bigger brawl would be something like
ogre 1 gets mad at fiend 1
fiend 1 gets mad at ogre 2
ogre 2 gets mad at fiend 2
fiend 2 gets mad at ogre 3
...
fiend n gets mad at ogre 1
that loop should make sure everyone fights.
Anyway, getting ahead of myself, what you do:
Set up your monsters, run the map, type edicts in the console and note down the entity numbers of the monsters you want to fight.
Add a brush over each monster, and convert to info_notnull with the following settings
owner n
use InitTrigger
targetname que1
touch spike_touch
where n is the edict number of the monster you want it to get mad at.
Then two more triggers to set the thing going, a trigger_once with target que1, and an info_notnull with
use teleport_use
targetname que1
In fact, this is such a minor thing, you could even tag it onto the info_player_start you use and save an entity.
Of course, the way it works is that the triggers behave like a nail fired from the monster in the owner field into the target monster, so it gets mad according to the infighting code. You don't have to use trigger brushes, spike_touch and teleport_use if you don't want - voreball and ogre grenade explosions set off from point info_notnulls with owner set have the same effect, if more dramatic in execution. Be warned, this will fail on monsters of the same type - for a minute there I used two knights to test it and thought the hack wasn't gonna work!
New Style Trigger?
#75 posted by Mike Woodham [86.143.87.28] on 2006/06/26 11:09:38
I want a trigger_once that is not 'switched on' for use until some other pre-defined action has taken place; perhaps by a monster dying or a button being activated. This trigger will be in an oft' used area and may be 'touched' many times before I want it to become a trigger_once. The player must remain unaware of the trigger.
I don't want to use doors or buttons, or add any extra brush work, so no 'logic-gate' scenarios.
Is this achievable through some clever use of the trigger_once fields or spawnflags. Or will I need to resort to QC?
Mike
#76 posted by negke [82.83.12.11] on 2006/06/26 12:00:49
http://www.celephais.net/board/vie...
highly useful hack
#77 posted by negke [82.83.12.11] on 2006/06/26 12:05:12
hmm, on a second thought i always used
"use" "trigger_once"
"touch" "SUB_Null"
probably just another way (without apparent downsides).
Neg!ke
#78 posted by Mike Woodham [86.143.87.28] on 2006/06/26 12:34:17
Thanks for the speedy reply, I'll get on to it.
Neg!ke/Preach
#79 posted by Mike Woodham [86.143.87.28] on 2006/06/26 12:51:09
Great stuff!
Mike:
#80 posted by metlslime [204.15.3.5] on 2006/06/26 13:26:00
Surely logic gates are a better choice than creating a new progs.dat for this one thing.
But I am curious to know if there is a simply one-entity hack to do this; that would be useful.
Oops...
#81 posted by metlslime [204.15.3.5] on 2006/06/26 13:27:41
I must have had this page open for like an hour before commenting :P
Metlslime, Maybe...
#82 posted by Mike Woodham [86.143.87.28] on 2006/06/26 14:23:36
...I can open a .qc file, fiddle with it and recompile in less time than it takes me to build brushwork. My editor compile GUI can then re-run the map in one click with -onlyents selected to run the map with the new progs.dat in about three seconds. So, apart from the fact that I'm not too good with QC, I would find it easier.
My map will have to have my progs.dat to play as it has a mixture of monsters, so again, it is easier for me.
But I am not a 'wheel inventor' so the notnull thing suits me fine.
Having no professional interests in gaming, programming, IT, web-design etc, all of this mapping lark is just a bit of fun that takes an hour or so of my time every other day when I'm at home. And I enjoy poking around in Quake's inards even if I get lost every now and then:-)
Killable Cthon By FrikaC
#83 posted by metlslime [67.188.209.101] on 2006/08/14 00:33:59
FrikaC posted a killable Chthon on I3D:
http://forums.inside3d.com/viewtop...
Invisible Monster Only Barrier
#84 posted by than [220.47.234.129] on 2006/08/14 10:05:31
Ok, this DOES work. He's how to make an invisible barrier that stops monsters but not players. This only works for monsters that don't swim or fly, and if the monster jumps or is pushed, they may pass the barrier.
First build a 32unit high step where you want the barrier to be. Apply a regular solid texture to the brushes. Now make a clone of this brush and position it above the existing brush. Make it 64 units high - it can actually be as high as you like, but lets use 64 units for now. Apply the clip texture to this. Select both brushes and make them into a func_wall entity. Now move the whole thing down into the floor slightly so that the solid brushes are 16 units below the floor (if this doesn't work, try 8).
Compile the map and run it in Quake... hey presto! The monsters should be stuck behind the barrier. Hopefully, you should be able to walk through the barrier without problems.
Turns out I used this weird trick in apsp1 after all. It was reused twice in dm3rmx when I rediscovered how it was done, though I killed the barriers in that to allow the monsters to pass after a certain time.
File
#85 posted by than [220.47.234.129] on 2006/08/14 10:13:09
Here is an example map of stupid test things which happens to also contain the trick I mentioned in the above post: http://than.leveldesign.org/files/...
Ignore all the stupid shit I put in there, and just watch how the enforcer won't come out of his little box. Try the same thing with a fiend... you'll be in for a shock.
Than!
#86 posted by biff_debris [68.114.159.180] on 2006/08/14 11:04:30
You are simply a one-man repository of l33tness. This'll come in big use with my base map =D
Monster Barriers...
#87 posted by metlslime [204.15.3.5] on 2006/08/14 13:09:06
A trick I use is even simpler -- players can cross any gap in the floor that is 32 units or less across, becuase they have a 32x32 bounding box and use hull1 to do their collision.
Monsters, on the other hand, use hull1 or hull2 for collision, BUT they use hull0 to do their pathfinding. Since there's a gap in hull0, they think they can't cross it. So just like cattle guards at the entrances to pastures, you can simply put grates or other gaps where you want the monsters to be blocked.
Gratuitous cattle guard picture: http://www.3rf.org/album/ComancheS...
And an example in antediluvian: http://www.celephais.net/shite/ant...
Nice Metl
#88 posted by inertia [24.164.73.173] on 2006/08/14 13:38:42
That's pretty nifty. They will come at you one the floor is "filled" like with a func_door, right?
Killable Chthon With Map Ents
#89 posted by scar3crow [216.145.71.254] on 2006/08/14 14:47:58
http://forums.inside3d.com/viewtop...
FrikaC explains how to make a Chthon that can be killed by the players weapons rather than electrodes, without doing any qc coding or using another progs.dat
Cool.
#90 posted by Drew [202.126.96.62] on 2006/08/16 00:45:45
very well written, too. Helped me understand certain aspects of the coding process more intimately (though we're still 'just friends' at this point).
But since I can't test it, I'd like to clarify one thing... he won't pop out and start going? almost immediately after starting the map he'll begin tossing his loud fireballs around? or am I confused?
Also...
#91 posted by drew [202.126.96.62] on 2006/08/16 00:47:23
is there a way to make a monster invulnerable until a certain point, at which he'll become vulnerable to weapons/lighting/smooshing?
Temporarily Invincible Monsters
#92 posted by negke [82.82.176.159] on 2006/08/16 02:27:57
this is possible. simply add a "invincible_finished" "#" field.
the awkward thing is that the # seconds start counting down when the map starts, so events involving such monsters have to be carefully planned.
Hay Guys
#93 posted by NotoriousRay [68.33.252.95] on 2006/08/16 23:28:02
i hear that FrikaC has a way to make a killable Chton without quake-c? or was it marcus sklar. . .
No No...
#94 posted by metlslime [67.188.209.101] on 2006/08/17 00:16:27
you're thinking of that level from 1997, called "THEFLY" or something... I think it was by this guy Marcus Klar...
Huh.
#95 posted by Drew [202.126.96.62] on 2006/08/17 00:23:38
no way to trigger it huh? that takes alot of the fun out of it...
#96 posted by Drew [202.126.96.62] on 2006/08/17 00:36:47
I know this is probably getting annoying, but how do you get monsters to drop weapons/ammo? when making a floating weapon, do you simply place it on a func_wall and then kill it upon starting the map? Any other "widely known" hacks?
Drew:
#97 posted by metlslime [67.188.209.101] on 2006/08/17 00:44:42
as far as i know, you trigger this cthon the normal way. I'd have to re-read the tutorial to be sure, though.
And yes, you kill the func_wall immediately after map load, using a trigger on the start point or something. At least that's the traditional way to do it. I wonder if this would work instead:
"classname" "func_wall"
"nextthink" "0.1"
"think" "sub_remove"
or would that not work because func_walls already have a think function?
Metlslime
#98 posted by Preach [213.120.158.227] on 2006/08/17 06:38:33
A func_wall has no think function, so that would almost work as it stands. The problem is that the items will not have been dropped to the floor by 0.1 seconds in, so you'd remove the func_wall too soon. Setting nextthink to 0.5 would be safe(items drop at 0.2 seconds in), and probably won't be seen by the player anyway.
Preach:
#99 posted by metlslime [204.15.3.5] on 2006/08/17 13:00:11
Cool, so that would work.
I much prefer a clean hack to a messy hack.
Sound...
#100 posted by distrans [131.172.4.44] on 2006/09/04 22:45:09
...hiya, I'm at the stage where the only thing left to do in this map before release is to enable a switchable ambient sound (ambient_drone). Is this doable via an info_notnull hack? It only needs to go from 'on' to 'off' once. I can't really afford to use brush entities as I'm a bee's thingy from the markedgesurfaces vanilla limit.
Thanks in advance.
Not So Loud
#101 posted by Preach [81.153.25.16] on 2006/09/05 02:53:15
Yeah, it's fairly doable. You won't get the same sound attenuation as with a normal ambient sound, it'll just be like a door or platform, but other than that it works well. These fields on an info_notnull:
noise1 ambience/drone6.wav
noise3 misc/null.wav
think plat_hit_bottom
nextthink 2
targetname noisebegone
use fd_secret_done
plat_hit_bottom and fd_secret_done are functions that play noise1 and noise3 respectively and not a lot else. The usual notes about making sure something precaches these sounds apply - ambience/drone6.wav is precached by an ambient_drone and misc/null.wav is precached by a platform or door with sounds set to 0.
If you don't have a door like that already and can't include one because you're close to the limits, then you can terminate the looping sound with any other non looping sound. So if this represents the power going out, you might want to have an explosion to punctuate it. enforcer/enfstop.wav and one of the lightning gun sounds would also probably work nicely here. Otherwise just try and find a short, quiet sound like a ricochet so it's not noticable.
Many Thanks Preach...
#102 posted by distrans [131.172.4.45] on 2006/09/05 18:09:58
...you are the bomb. Now, are we going to progress that Mechanised Enforcer Weapons Platform any further? Asaki is finishing up the code, I just need to know if you are going to make the wish list of skin and model mods.
MEWP!
#103 posted by inertia [134.53.176.37] on 2006/09/05 20:59:26
err
Found By Accident
#104 posted by MadFox [84.26.78.10] on 2006/09/28 16:07:46
while searching for a way to let Shallrat breach some vorebabes I thought it might be good to look for the multigrenades qc
They have the same second subroutine I need.
I saw the earthquake.qc and wondered if it wasn't possible to fit it in Quake1 without the DOE pak.
And to my surprise it worked.
There may be a strange target t2 in the map but for I can see it works.
http://members.home.nl/gimli/Q1Ear...
Madfox:
#105 posted by metlslime [204.15.3.5] on 2006/09/28 17:55:28
nice work, but this thread is about NOT changing qc code, but instead using the bsp file to create ususual features.
Alright
#106 posted by MadFox [84.26.78.10] on 2006/09/28 21:22:02
out of toppic, sorry my enthousiasm.
I'll try to relate to the general abuse.
Maybe better then creating a new toppic.
Sometimes it harder to find the wrong toppic with a right idea then,
nevermind.
Objects That Selectivly Clip
#107 posted by Preach [131.111.8.98] on 2006/11/23 14:27:47
We're going to learn a new field we can add to almost any entity to change how it blocks other entities in the game. And that field is
owner n
Where n is the number of the entity that you want to "own" this entity. What does this mean? Well, it's easiest to understand by example. When an monster/player fires a projectile, the owner field of the projectile is set to the firing entity. This means that the two object will no longer clip or touch, they ignore each other for all collision purposes. The purpose is so that your own rockets don't explode on you as soon as you fire. Side effects include that you can't use a vore's own voreballs against it(directly).
So, what can we do with this? Well, you can set it on almost anything(doors being the big exception that already have owner specified in their own code). If you set, say, a monster's owner to 1, then it'll be noclip to the player. Kinda stupid, but cute, especially if you do it to a knight as it leaves them incapable of attacking you. You can't hit them with hitscan weapons, but you can get them with nails. This is because a traceline is in some ways a collision between yourself and the target entity.
So that's neat but not all that useful. A better use would be to have monsterclip that only clips selected monsters, like I suggested in mapping help. But surely you can only set the monsterclip to have one entity as it's owner? Yes, but that's the wrong way round to do it. What you do is make it so that all of the monsters you don't want to clip against it have the monster's owner set to the monsterclip. It's a symmetric relationship, so now all those monsters will disregard that one entity. Of course, they'll still hit all the other monsterclips in the map equally. You'll have to place them so that all the monsterclip they are likely to encounter that you want them to ignore is grouped as one entity.
The owner field might suggest that there's some kind of hierarchy going on here, but it's not the case. If the ogre has the player as an owner, and it's grenades have the ogre as their owner, the grenades still clip against the player. So you're basically limited to one link per object, it can be noclip to one entity of it's choice, and as many entities as you like can be noclip to it. The trick is to use the limited resource as creatively as possible.
What else could you do with this? Well, probably some good(evil) traps, shame this wasn't about for the speedmap pack last week. You could add HL2 style combine force fields that the player can't move through but the monsters can. I'm sure other people can think of things I can't. Maybe you could do something really clever for a coop only map, where player 1 and player 2 (entity 1 and entity 2 on the map) aren't treated symmetrically? It'd be cool to hear people's ideas.
Sounds Awesome
#108 posted by than [220.47.251.83] on 2006/11/24 05:45:44
Preacher, you are the don of hacks. That one sounds particularly prime though, and it will get used.
Levitating Enemies
#109 posted by ijed [200.113.171.22] on 2006/11/24 07:37:33
how about a shalrath (or shambler?) stood on an invisible func_train that only it can touch - either flying around a room and landing now and again to use its normal walking movement or else with a series of func trains causing it to jump around like in nehahra or the end of azure agony.
.
#110 posted by [81.154.13.249] on 2006/12/03 11:20:37
MONSTER_FISH FRAG COUNT FIX !!! (sort Of)
#111 posted by Omus [131.227.231.25] on 2007/01/11 17:29:49
Here's something I just came up with.
Don't you hate not getting 100% kills due to the infamous monster_fish error? Well this doesn't stop the fish being counted twice, but you can manually increase the killed monsters count. Create an entity with these properties:
classname info_notnull
use boss_death10
Trigger it and the killed monster count will magically go up by one. BTW this method also kills the info_notnull, so you'll need one for every fish in your level. I suggest making each fish target one so they automatically call it on death.
Fish Frag Count Fix
#112 posted by Orl [71.226.230.220] on 2007/01/13 14:51:13
Awesome hack Omus. I've always waited for something like this, and it works like a charm.
Nice Find
#113 posted by negke [82.83.49.192] on 2007/01/14 03:06:45
though on the other hand, it will screw up the monster count if playing with a fixed progs.dat
A Very Basic Trick
#114 posted by frag.machine [201.72.97.5] on 2007/02/11 15:32:34
It's very likely that most of you already know that...
You can manually set the skin field for any regular Quake monster. This, combined with the armorvalue/armortype and super_damage_finished tricks can lead to some new mini bosses (like a super shambler, for instance).
How?
#115 posted by Spirit [80.171.152.37] on 2007/02/11 16:23:19
It's Very Simple, Actually
#116 posted by frag.machine [201.72.97.5] on 2007/02/12 03:47:10
Assuming you have a soldier.mdl with 2 skins (0 is regular grunt and 1 is your boss grunt):
{
"classname" "monster_army"
"armorvalue" "1000"
"armortype" "1"
"skin" "1"
"super_damage_finished" "9999"
}
His shotgun will deliver 4x the normal damage, but without the quad damage sound. And this sucker can take more than 1000 hit points.
The idea can be extended to any regular monster.
Useful, But...
#117 posted by Omus [131.227.112.165] on 2007/02/12 12:40:14
If you have new skins you to include external files for the custom model right? In that case you might as well create a custom progs and run it as a mod.
Not Necessarily
#118 posted by Lardarse [62.31.162.204] on 2007/02/15 00:46:21
A lot of modern engines support replacement model textures, and these can be used to add skins to a model that doesn't have them.
But...
#119 posted by metlslime [69.181.182.38] on 2007/02/15 05:21:33
can you replace skins that don't exist in the original mdl?
Odd Occurance, I Noticed
#120 posted by HeadThump [4.136.90.27] on 2007/02/15 06:01:44
some months ago I was dicking around with Air Quake source and Dark Places with the intention of making some high(er) poly md3 models for it. I added a func_model type entity to the Air Quake source, designed a bouy type model and texture to test it with, and I added it to a map.
The md3 model showed up, but the texture didn't. I tried the various recommendations in the vast DP literature, and none of them worked to bring the skin in.
So I then converted the model to a Quake mdl, and indexed the colors of the skin texture to the Quake pallette. It showed up in game perfectly, not the mdl model, but the md3 and the md3 skin! So, apparently you need to have an mdl version for DP to recognize an external
skin.
Metl
#121 posted by aguirRe [213.101.72.85] on 2007/02/15 09:33:40
I'm not sure, but I think you can from QC request skins/frames from ext texes that don't exist in the 8-bit mdl/spr.
Of course, it won't work so well then if you disable ext texes or don't support them.
#122 posted by Omus [131.227.112.103] on 2007/02/15 14:37:26
I see about the engines allowing external skins, and metlslime, I imagine you would use some sort of naming convention (eg: wizard_skin00.tga, wizard_skin01.tga) to support multiple additional skins in these engines.
Still, you have to include these new files somehow. I have always imagined these map hacks were useful mainly for maps that you don't want to bother zipping up properly or include a readme (speedmaps) or maps you want to run on vanilla Quake with no extra assets.
HeadThump - I know that with md2 models and some engines, you have to preserve the original paths of a model (where to look for the skin is hard-coded in the model). So if Quake 2 installs a model at: models/monsters/gladiator/tris.md2 (model) models/monsters/gladiator/gladiato... (skin)
... you have to rename the files (the skin at least) and preserve these paths under a Q1 mod directory. The same may be true of Q3.
Oh Yeah..
#123 posted by Omus [131.227.112.103] on 2007/02/15 14:40:28
.. sounds like when you converted your md3 to mdl, it was able to find the skin (treating it as an external skin) because mdl models aren't as fussy about paths.
Thanks Omus
#124 posted by HeadThump [4.136.111.120] on 2007/02/15 15:48:59
It's been a while since I visited my little project, but I think I'll see if that possibilaty is the case.
I checked the paths at the time to see if they matched up, but I may have only done so relative to the mod path and not the models internal structure, thus missing a crucial subdirectory.
I Guess...
#125 posted by metlslime [204.15.3.5] on 2007/02/15 21:08:08
the thing I'm worried about is that "replacing a texture that exists in the mdl" might be a feature of a number of engines, but it seems completely up to chance whether each implementation happens to work even when the texture isn't in the mdl file.
So you could try it, and it could work in some engines, but who knows which ones.
Omus
#126 posted by frag.machine [189.4.76.181] on 2007/02/19 16:43:23
[quote]
If you have new skins you to include external files for the custom model right? In that case you might as well create a custom progs and run it as a mod.
[/quote]
Yeah, but the thread theme is about making new stuff without new progs.dat, so I believe it's still on-topic :).
Player Weapon Damage
#127 posted by ijed [190.82.51.17] on 2007/02/28 22:17:58
Can I increase it with superdamagefinished as for monsters? If so how - because it'll need to be set for coop as well. I'm guessing this will be more difficult than a standard monster hack . . .
The idea is to boost the players close combat attack to make it a viable alternative to the SSG and not just the SG. And make it a choice against tougher creatures, since I've omitted knights from my pack.
I reckon about the same damage as a rocket, so two hits would kill and ogre, four a shalrath - though I'd have to playtest alot so as not to unbalence the game.
Not Without Modifying The QC
#128 posted by Lardarse [62.31.162.204] on 2007/03/03 04:11:31
Also, quad wwould affect all weapons, not just the axe.
Ah Well
#129 posted by ijed [200.112.93.96] on 2007/03/03 23:32:05
It was just a thought, maybe for the next time. It´d also affect alot of things, eg. it´d be easy to lose ammo backpack pickups by gibbing too many monsters.
Question
#130 posted by mechtech [24.228.65.15] on 2007/04/09 04:22:58
Any way to use stuffcmd in a map ent??
Mechtech
#131 posted by JPL [82.234.167.238] on 2007/04/09 08:09:50
it is possible in Quoth Pack. Just use info_command or trigger_command, and and your command in the message field. Maybe you should ask Kell or necros for further details.
Which Brings Me
#132 posted by aguirRe [213.101.71.249] on 2007/04/09 11:18:11
to a bug in info_command in Quoth; there should always be a newline "\n" at the end of the string, otherwise the engine might not execute the command properly.
The Quoth doc doesn't include this information.
Bprint?
#133 posted by Gulliver [76.184.134.9] on 2007/06/18 23:21:44
I want to do a coop map. It would be nice if there was a way to broadcast a message to all players (like "the gate is open"). The closest thing I could find is ClientDisconnect(), but that still bprints "left the game." after the message that I put in .netname. Is there some way to hide that 2nd message? I tried flooding it off the screen but it didn't work. It just moves my message up on the console.
Sorry. I Meant ClientConnect()
#134 posted by Gulliver [76.184.134.9] on 2007/06/19 00:30:17
#135 posted by Lardarse [62.31.162.204] on 2007/06/19 02:52:37
sprint() ?
#136 posted by Lardarse [62.31.162.204] on 2007/06/19 02:53:10
Umm... bprint(), sorry
Not Sure What You're Asking, Lardarse
#137 posted by Gulliver [76.184.134.9] on 2007/06/19 07:09:21
Bprint is broadcast print, no?
Not An Easy One
#138 posted by Preach [131.111.8.96] on 2007/06/19 09:22:22
I don't know that this one is possible. What you'd really want is a function that has the .netname bit printed *after* the rest of the text, so then you can newline all the previous lines away. However, assuming there are none in the monster files, the only such examples are in the clientobituaries, and only in the messages for client vs client deaths(for example: telefragging). So I don't think there's a way to hack those in.
Thanks, Preach
#139 posted by Gulliver [76.184.134.9] on 2007/06/20 00:56:06
That's about what I figured. Just wanted to check with an expert.
Progref
#140 posted by mechtech [71.77.32.60] on 2008/02/09 16:58:25
Map is a group of some of the tricks found here and other places. I use it as a way to remember those info_notnull tricks. Please give it a look
and email if I missed something good.
http://www.mediamax.com/mechtech10...
Sounds Cool - Will Check Out L8R
#141 posted by RickyT23 [86.137.238.33] on 2008/02/09 17:48:37
:D
Mechtech
#142 posted by MadFox [84.26.196.113] on 2008/02/09 22:46:18
Maybe it is my winrar, but I get a corrupted file.
Zip Format
#143 posted by mechtech [71.77.32.60] on 2008/02/10 18:10:42
Changed format to zip
http://www.mediamax.com/mechtech10...
Mechtech
#144 posted by gb [89.27.242.240] on 2008/02/10 23:16:27
That download seems unbelievably slow, can you put it on shub-hub or something? It stalls at 1% here repeatedly.
Last Try
#145 posted by mechtech [71.77.32.60] on 2008/02/11 01:51:27
Sorry for that crappy (free) host
http://shub-hub.com/files/maps_sin...
Thats Mad!!
#146 posted by RickyT23 [86.137.238.33] on 2008/02/11 16:07:40
I dont know how usefull it will be, the toggleble trigger_multiple could be a usefull reference. Also the pentegram of lightning - I had a look at the map file in notepad, and it didnt really make sense to me how you managed to get all of the correct angles for each lightning bolt, but I'll have a look at it later again!!
Cheers
Mechtech
#147 posted by gb [89.27.219.208] on 2008/02/11 23:56:43
Good idea. Comments:
- can you make all doors wait -1 or remove them?
- can you use a uniform texture theme?
- func_train message is misplaced
- could you make the messages more descriptive?
- perhaps use floor switches, those posts are a bit in the way.
- perhaps add breakables?
- add Than's moving floor gun turrets?
- add glass?
- make trigger_multiple and triggered lights more obvious?
- add monsters dropping guns, or alternate ammo
Quoth demystifies many of those things, luckily, like respawning items, custom traps, and hordespawn. Plus more nice things. No moving water or statues though.
Fiends And Low Ceilings
#148 posted by Lardarse [62.31.162.204] on 2008/02/27 21:00:33
I've just thought of a trick that might not work, as I haven't been able to test it. It also requires Quake 1.07 (I think all custom engines these days are derived from 1.08)
If you set the "gravity" field on an entity, the effects of gravity on it change. 1 means normal, 2 means doubled, etc... 0 is taken to mean 1, otherwise everything would not be affected by gravity by default.
So what can be done with this? Well, in theory, any monster that jumps can be made to jump further (or not as far). Unless you're using trigger_monsterjump, which is configureable by the mapper already, then the use is really limited to fiends. Giving them a gravity setting of about 1.2 may help to make them more effective in indoor areas, by making them hit the ceiling less.
I'd be interested to know if this actually works...
Semi-random Monster Placement
#149 posted by Lardarse [62.31.162.204] on 2008/03/26 04:16:38
You can set multiple teleport triggers on each monster entity, and randomize by using Fitzgibbon's patented shooter trigger randomizer, or make the teleporters trigger at different locations depending upon the route the player decides to take. (HeadThump replying to Ankh in another thread)
Can anyone explain this one for me?
Hey Lardarse
#150 posted by HeadThump [4.136.90.242] on 2008/03/26 04:38:14
Give me a few minutes and I'll construct a simple map that illustrates
the second method, the first method with the logic gates is a bit more complicated and I wanted to make a fairly playable map to illustrate it.
Here You Go,
#151 posted by HeadThump [4.136.90.242] on 2008/03/26 05:28:16
http://mortisville.quakedev.com/te...
This example shows how to place teleporters for a creature to have alternative routes depending on the route a player takes. The creature here is hidden inside the center block, and all the relevant entities are close by that area.
Oh, And Here Is The Second Version
#152 posted by HeadThump [4.136.90.242] on 2008/03/26 06:04:58
http://mortisville.quakedev.com/te...
I added a crude logic gate to the original map that will give one of four results, two telefraged creatures, one telefrag and one creature, or two more creatures in addition to mr tough stuff from the first demonstration.
It isn't difficult to refine this technique to suit your needs. Look in the extra box room to see how it is done.
Re: #11 And Monster Triggers
#153 posted by Lardarse [62.30.157.25] on 2008/06/20 21:55:16
Is this safe to use as a door opening trigger? I know that doors will create their own triggers, but it's too large for my purposes...
Re: #148 And Fiends In Low Ceilings
#154 posted by Lardarse [62.30.157.25] on 2008/06/20 23:42:14
While this trick does work, it's not really that necessary. Using one of the equations of motion:
v*v = u*u + 2*a*s
and rearranging for s (distance)
s = (v*v - u*u) / (2*a)
then plugging in the relevant numbers: u (start velocity) = 250 (we are only concerned with the vertical here); v (end velocity) = 0 (when you reach the peak of the jump); a (acceleration) = 800 (due to gravity); and you get
s = -39.0625
Now add the height of a fiend (88), and see that it will miss a 128-high ceiling by just less than 1 unit. Except for 2 small problems. Firstly, the qc adds 1 to the z component of the fiend's origin juszt before it jumps (so it will brush the ceiling very slightly), and secondly, it's possible for v_forward (the direction that fiend will jump in) to have a z component (if the player jumps at the right moment).
Still, it's something more to play wih...
Monster Triggers
#155 posted by Preach [131.111.213.35] on 2008/06/21 01:18:24
It should work as long as you don't want a message for the player on that trigger. Just remember that firing nails through the trigger will also op - not just monsters.
Good To Know
#156 posted by Lardarse [62.30.157.25] on 2008/06/21 03:56:59
But I decided that it's not worth spending the brushes on in this map, so I'll save it for next time...
Mind The Gap
#157 posted by negke [82.83.51.90] on 2008/07/30 11:26:17
Probably obvious from Preach's post but just as a reminder:
Monsters don't cross gaps in the floor and more often than not this is a disadvantage. Apart from monsterjump triggers, this can be fixed by filling the gaps with skip-textured func_walls which have their "owner" fields set to "1" (player), so they're invisible and don't block the player's projectiles but allow monsters to walk on them.
The downsides are that they block monster attacks (unless the monsters' owner fields are set to the entity number of the func_wall - however, then they won't be able to walk across the gap, I think) and also coop players' projectiles.
More Doors Stuff
#158 posted by Lardarse [62.31.165.111] on 2008/08/14 15:18:57
Is it possible to make a door not open until it's touched? I imagine the obvious way is to make a trigger brush 1 unit wider than the door, but I was wondering if there's a method that doesn't use any additional brushes apart from the doors.
I Think So
#159 posted by Lunaran [24.158.1.74] on 2008/08/14 18:01:14
"touch" "door_use"
and give it a targetname so it doesn't spawn a trigger
that's a good idea to save models, actually. does it work? :)
Hm, No
#160 posted by Lunaran [24.158.1.74] on 2008/08/14 18:18:58
the triggers automatically spawned by doors don't have models, just bounds.
and door_use will only work if you set the door's owner to itself. I think. Shit, I don't know, I'm posting from work and browsing the progs src on inside3d, don't listen to me.
Func_wall
#161 posted by Preach [86.147.250.88] on 2008/08/14 20:53:47
The trick here is to start with a func_wall, not a func_door. Add the following keys:
touch door_fire
state 1
speed 100
pos2 'x y z'
owner *edictnumber*
where pos2 a vector describing the offset that you want the door to move by, '0 0 128' makes it open upwards by 128 units. You need to set sounds using the noise1 and noise2 fields, and precache those sounds elsewhere. The wait and speed fields work as before.
One weird trick you can do with this set-up is to set pos1 to a different vector. Then when your door closes, it will go to a position offset from it's original location by the value of pos1. There might be one other nice thing you can do, but I haven't quite worked out the details yet, will post later if anything comes of it...
Cool
#162 posted by negke [82.82.177.105] on 2008/08/14 21:10:33
While you're at it, how does one make a secret door that moves up first, then in the specified direction?
Addendum
#163 posted by Preach [86.147.250.88] on 2008/08/15 01:11:53
I should have added to the above post that *edictnumber* needs to be replaced with the actual edict number of the func_wall - in other words you need to make the func_wall its own "owner".
To make a secret door move up first, and then in the direction specified, I think that setting the SECRET_1ST_DOWN flag and then setting the third component of the angles vector to 180. Remember that map editors only give you y axis control(apart from the up/down hack) in the angles field so you'll need to put this angle in with a text edit.
The aim of this is to set the angle such that when you perform makevectors on the angle, the V_UP vector points downwards. Since the first two components specify the V_FORWARD vector, I'm pretty sure the last one then just rotates the V_RIGHT and V_UP pair about that vector. If the angle has no pitch(x component) then V_UP is straight up when the roll(z component) is 0. It makes sense that changing that to 180 would invert it.
Owner And DP
#164 posted by negke [82.82.183.96] on 2008/08/15 14:52:34
It seems the owner hack doesn't work in DP - at least with my button-gugattack setup.
Check
#165 posted by Preach [217.44.86.125] on 2008/08/15 15:22:39
Are you use that you've specified the correct entity number? It's not a hack per se to make something the owner of itself, that's what a regular door does as long as it's not linked to any other doors. The only hack is specifying a number in an entity field.
My Bad
#166 posted by negke [82.83.43.177] on 2008/08/16 09:45:22
I guess the way I used it doesn't work in any engine. I had the edict number of a shootable button assigned to a Gug in order to prevent him from accidentally fire it with his bile attack. It seemed to work in BJP but I just tested it again and in fact it doesn't.
Ownership
#167 posted by Preach [217.44.220.53] on 2008/08/16 11:12:03
That's because the gug's bilebomb will have a different entity number than the gug itself, and so the number in the button won't make any difference. There's no hierarchy of ownership in quake, if A owns B and B owns C, then A and C can still collide. In addition, blast radius attacks still hurt the owning entity, the main idea behind the ownership is so that the projectile can be spawned inside it's owner without it blowing up from the contact. It's actually quite a neat way of preventing out of bound glitches with the projectiles.
How To Do #101 In Reverse?
#168 posted by Lardarse [62.31.165.111] on 2008/09/10 22:56:21
And by that, I mean an ambient_drone from off to on. Any ideas?
#169 posted by Omus [91.85.172.175] on 2008/09/11 00:48:30
You obviously tried swapping the sounds around from that same solution?
Umm...
#170 posted by Lardarse [62.31.165.111] on 2008/09/11 05:35:05
Let's just blame that one on lack of sleep, shall we?
Turning On Ambient Sounds
#171 posted by negke [82.82.184.174] on 2008/09/11 09:19:18
Works with the standard sound hack.
A trigger with "use" "train_wait" and "noise" "ambience/drone6.wav". It will start looping the sound after being fired (the sound has to be precached). Afaik, turning it off again is not possible, though.
Don't Forget
#172 posted by necros [99.227.108.217] on 2008/09/11 09:24:09
once the player moves out of range of the new sound, it will no longer be looping if the player goes back into range.
it's unfortunate, but afaik, there is no way to have a true ambient sound be customizable. it can only be hard-coded. :(
Hmm...
#173 posted by Lardarse [62.31.165.111] on 2008/09/11 18:13:55
Surely you can use trigger_relays to force the ambient to start every 5 seconds (or at some multiple of it's length). Sounds a little bad if you hear it suddenly start, but it will keep it playing...
But...
#174 posted by metlslime [64.175.155.252] on 2008/09/11 20:56:02
you get clipping artifacts when the sound restarts, since even if you made the sound loop perfectly, quakec is not going to reliably time the cut at exactly 5000ms or whatever.
Necros
#175 posted by negke [82.82.190.28] on 2008/09/12 10:29:06
It does keep looping infinitely regardless of where the player goes.
Preach
#176 posted by negke [88.70.230.181] on 2009/02/11 16:46:45
#16 - How does that work exactly; could you post an example entity? Is it also possible to override a monsters existing th_missle function, e.g. to let scrags shoot voreballs and hellknights shoot Chthon etc?
No
#177 posted by necros [99.227.108.217] on 2009/02/11 19:12:10
because the th_ functions are set in the monster spawn functions. you'd have to 'build' the monster you want from scratch and then modify from there.
#178 posted by Spirit [80.171.29.223] on 2009/02/14 12:09:25
"build" in quakec or in a .map hack?
Is It
#179 posted by onetruepurple [83.30.144.47] on 2009/02/14 12:42:11
similar to how does one build a killable Chthon with info_notnull hackery?
http://forums.inside3d.com/viewtop...
Spirit
#180 posted by necros [99.227.108.217] on 2009/02/14 19:29:29
i was referring to the post a little while ago about building a monster with an info_notnull
Megahealth - More Than A Short-lived Pleasure
#181 posted by negke [88.70.226.111] on 2009/06/14 17:11:40
As we all know, having large amounts of health can never be wrong, but unfortunately the Megahealth item doesn't like us to be enjoy our surplus very long. Time to change it:
"classname" "info_notnull"
"origin" "# # #"
"think" "PlaceItem"
"nextthink" "0.2"
"touch" "health_touch"
"healtype" "2"
"healamount" "100" // up to 250
"maxs" "32 32 56"
"model" "maps/b_bh100.bsp"
"modelindex" "#"
"noise" "items/r_item2.wav"
"targetname" "mh"
"killtarget" "mh"
"delay" "0.1"
Now, what's so special about this? The killtarget actually prevents the item from rotting down to 100 like normal Megahealth packs do. This way, nothing will be wasted if one doesn't engage in battle immediately.
You could also do this at map start, for example, by creating an info_notnull brush entity with the same fields except "maxs", "model" and "modelindex", and changing "think" to "InitTrigger"
Doom-style Backpack Full Of Ammo
#182 posted by negke [88.70.226.111] on 2009/06/14 17:26:43
A neater way (for some situations, e.g. secrets) of using the BackpackTouch hack mentioned earlier in this thread:
"classname" "info_notnull"
"origin" "# # #"
"think" "PlaceItem"
"nextthink" "0.2"
"touch" "BackpackTouch"
"model" "progs/backpack.mdl"
"modelindex" "#"
"ammo_shells" "20"
"ammo_nails" "50"
"ammo_rockets" "10"
"ammo_cells" "25"
This will create a backpack that looks and behaves exactly like those the monsters (or players in DM) drop. Of course you can also put some weapons in, with "items" "#" and "netname" "Weapon name". Just don't squish the sandwiches, though.
#183 posted by Willem [24.163.61.78] on 2009/06/14 18:44:18
Ooh, love the backpack idea! Neat stuff, negke!
Neg
#184 posted by necros [99.227.133.158] on 2009/06/14 21:42:30
couldn't you just killtarget/target a regular MH pack? why does it have to be a notnull for the trick to work?
Necros
#185 posted by negke [88.70.59.4] on 2009/06/14 22:30:05
Indeed you could.
The info_notnull just lets you set custom heal values.
Negke
#186 posted by Lardarse [62.31.165.111] on 2009/06/16 12:09:12
For reasons that you will probably not understand even when explained to you, you should make the nextthinks in the above two hacks 1.2 and not 0.2
Well, Try It Anyway
#187 posted by negke [88.70.95.86] on 2009/06/16 13:01:18
I thought items are spawned/drop after 0.2 seconds. I've never encountered problems with this value anyway.
#188 posted by Willem [24.163.61.78] on 2009/06/16 13:11:38
I thought it was 0.1 so, yeah, this should work...
0.2 After The Spawning Frame
#189 posted by Lardarse [62.31.165.111] on 2009/06/16 17:46:55
But time starts at 1, not 0
Scripting Languages Besides QuakeC
#190 posted by inertia [75.179.159.179] on 2009/06/17 00:44:35
Has any work been done to incorporate, say, Lua into a progs?
The Horror, The Horror
#191 posted by ijed [216.241.20.2] on 2009/06/17 18:43:35
I wouldn't recommend it.
AFAIK it wouldn't be difficult, but Lua gets messy over time and, to me at least, is harder to debug than qc.
Other Langs In Quake
#192 posted by inertia [75.179.159.179] on 2009/06/18 06:16:59
The reason I ask is because I love programming in highly-expressive languages, specifically Scheme and Haskell. I know Lua isn't "all that", but something nicer than QC would make me happy. After all it's a hobby, and hobbies should be f.u.n.!
#193 posted by starbuck [92.237.128.247] on 2009/06/18 15:02:56
Haskell is pretty fun. Studied it in the first year of Uni up in Edinburgh. Phil Wadler, the designer of Haskell was the lecturer, and I'll never forget the first lecture, when he tore off the shirt he was wearing to reveal a t-shirt with a giant lambda symbol on it.
He also shouted LAAAMBAAAA!!!. Dude really loved lambda calculus. Think I laughed at that for a solid week. For reference he also looks like this:
http://homepages.inf.ed.ac.uk/wadl...
#194 posted by inertia [75.179.159.179] on 2009/06/18 19:55:27
That is awesome. I've noticed that a lot of people worship the lambda. Have you heard the story about how Feynman, for his intro physics class, hung a bowling ball from the ceiling? He stood up against the wall, pulled the ball up to touch his nose -- and let it go. Of course, on the return swing, it did not touch smash into his face. His point was that physics works, and you have to get an intuitive feel for it to be good at it.
There's a nice thread here about 'why did Church pick lambda?':
http://groups.google.com/group/plt...
Triggering From A Monster
#195 posted by necros [99.227.133.158] on 2009/06/27 22:32:11
is it possible to trigger a target with a monster as the activator?
i've tried spawning the monster on top of a trigger_teleport, having the monster walk onto the trigger_teleport (with path corners) and lowering a monster into a trigger_teleport with a func_door.
the trigger_teleport had a target, but somehow i was still the activator when the monster would go through the teleporter.
all i can think of would be to make a dummy monster that targets the entity, and make the spike_touch hack kill the dummy with the owner pointing to the activator monster, but that's convoluted as hell and really ugly.
Yes, It Can Happen
#196 posted by Preach [86.156.59.30] on 2009/06/28 00:36:04
For example, if a monster kills another through infighting, and the dead monster had a target, then the killer will be the activator of the target. This caused a very tricky to identify bug in a recent map whose author will remain nameless here...
So it can happen.
Making it happen on demand is a bit trickier. I think I've come up with a hack that will do it though. Add an info_notnull and set its enemy field to the entity number of the monster in question. Then set its use field to trigger_multiple. Then if you use the info_notnull, it will fire its targets with its enemy as the activator.
How it works: originally I was going to try doing it with the "naked trigger_multiple" hack, where you make a trigger that monsters can touch, and have the teleporting monster touch it. That trick relies on short-circuiting the multi_touch function which usually guards against non-player touches.
Unfortunately, skipping that function also skips the line which sets the trigger's enemy to the touching monster/player/fireball. This enemy is then used as the activator - so you still wouldn't get the monster as the activating entity. Instead you get whatever was in the enemy field to being with - world being the default. I got half way through typing up a solution involving the spike_touch hack setting off a trigger_multiple with health, before I saw the short cut that would save an entity...
Not properly tested it btw, but I'm pretty sure that will work as intended!
Thanks
#197 posted by necros [99.227.133.158] on 2009/06/28 00:50:59
that sounds like a much better solution. this brings me to another question i should have asked: how *do* you find the edict numbers?
typing edicts in the console outputs ALL the edicts, and even with condumping, it only actually prints the last 80-100 or so. (the map has over 600 edicts).
all i can think of is to maybe make a progs, but can you even bprint() the edict number?
Oh
#198 posted by necros [99.227.133.158] on 2009/06/28 00:58:45
this always happens, i figure out how to do it after i ask. :P
Aannnd
#199 posted by necros [99.227.133.158] on 2009/06/28 01:05:19
it works. thanks!
btw, it's 'use' 'multi_trigger', not 'trigger_multiple'
Edict Hunting
#200 posted by Preach [86.156.59.30] on 2009/06/28 01:18:42
This is actually reminds me of something I've had in the back of my mind as a desirable feature for a "development" quake engine. Better searching of the entity list with the edict command. The biggest improvement would be to be able to specify a classname, like
edicts monster_knight
would output a list of every knight in the map.
Once you have that, partial matches would be the next most handy feature, so that
edicts monster_
would return a list of all the monsters in your map. If you really needed flexability, you could extend it to match other fields instead, like
edicts targetname skulldoor
would give you all the entities targeted by "skulldoor". If anyone other than myself would be interested in that, I might take a look at hacking it together...
There are workarounds until such things are available. If you save the game instead of running the edicts command, you can open the save file in a text editor and get essentially the same information out of it - or even run -condebug and read through the output file at the same time. The only thing that the save game lacks is...entity values themselves! So the latter method is needed for those
That Would Be Pretty Badass
#201 posted by necros [99.227.133.158] on 2009/06/28 03:45:34
except that it's only real use would be for hacks, correct?
That Would Rock
#202 posted by negke [88.70.60.74] on 2009/06/28 09:03:34
It could also be useful for checking targetnames and goalentities etc. Though I would probably use it only for hacks, yeah.
QC Application
#203 posted by Preach [86.156.59.30] on 2009/06/28 11:40:04
I'd also find it really useful when debugging mods, although not so many people are going to care about that. I'm gonna go away now and see if I can get the new version of fitz to compile...
Half Way
#204 posted by Preach [86.156.59.30] on 2009/06/28 14:44:14
The following replacement code will perform partial matches on classname. Find the function in pr_edict.c and replace it entirely with this. I've only tested it in fitzquake085 so far, but I don't see any reason why it wouldn't work in the original source. Other engines might have changed the functions that it calls, but I'd say even that is unlikely...
/*
=============
ED_PrintEdicts
For debugging, prints all the entities in the current server
PREACH: If supplied with a second argument, only reports entities whose classname initially match the argument
=============
*/
void ED_PrintEdicts (void)
{
int i;
edict_t *ent;
switch (Cmd_Argc())
{
case 1:
{
for (i=0 ; i<sv.num_edicts ; i++)
ED_PrintNum (i);
Con_Printf ("returned %i entities\n", sv.num_edicts);
break;
}
default:
{
int j,len;
len = strlen(Cmd_Argv(1));
j = 0;
for (i=0 ; i<sv.num_edicts ; i++)
{
ent = EDICT_NUM(i);
if( !strncmp(Cmd_Argv(1),pr_strings + ent->v.classname,len) )//match initial substring
{
ED_Print(ent);
++j;
}
}
Con_Printf ("returned %i of %i entities\n", j, sv.num_edicts);
break;
}
}
}
Getting it to match against any field is a little bit more tricky, so I'm gonna keep working on that now. Once I get that, I'll post the code and a binary.
And A Follow Up
#205 posted by Preach [86.156.59.30] on 2009/06/28 15:51:17
Phew, not too bad. You can grab the following function added to fitzquake085 from:
http://www.btinternet.com/~chapter...
void ED_PrintEdicts (void)
{
int i;
edict_t *ent;
switch (Cmd_Argc())
{
case 1: //regular call
{
for (i=0 ; i<sv.num_edicts ; i++)
ED_PrintNum (i);
Con_Printf ("returned %i entities\n", sv.num_edicts);
break;
}
case 2: //match against classname
{
int j,len;
len = strlen(Cmd_Argv(1));
j = 0;
for (i=0 ; i<sv.num_edicts ; i++)
{
ent = EDICT_NUM(i);
if( !strncmp(Cmd_Argv(1),pr_strings + ent->v.classname,len) )
{
ED_Print(ent);
++j;
}
}
Con_Printf ("returned %i of %i entities\n", j, sv.num_edicts);
break;
}
default: //match against given entity field
{
int j,len;
int *v;
ddef_t *search_field;
search_field = ED_FindField(Cmd_Argv(1));
if(!search_field)
{
Con_Printf ("Bad field name\n");
break;
}
j = 0;
len = strlen(Cmd_Argv(2));
for (i=0 ; i<sv.num_edicts ; i++)
{
ent = EDICT_NUM(i);
//this is ugly as hell, WTF Carmack?
v = (int *)((char *)&ent->v + search_field->ofs*4);
if( !strncmp( Cmd_Argv(2),PR_UglyValueString( search_field->type, (eval_t *)v),len)) //match initial substring
{
ED_Print(ent);
++j;
}
}
Con_Printf ("returned %i of %i entities\n", j, sv.num_edicts);
break;
}
}
}
Only minor bugbear I have with it is that tab still activates autocomplete on the second parameter, but it completes commands, which is unhelpful. Otherwise, it's cool.
#206 posted by necros [99.227.133.158] on 2009/06/28 19:40:15
//this is ugly as hell, WTF Carmack?
lol
nice work! :)
Nice One
#207 posted by negke [88.70.251.60] on 2009/06/28 22:28:01
Let's see how this works out in the field.
#208 posted by Willem [24.163.61.78] on 2009/07/04 20:55:00
"//this is ugly as hell, WTF Carmack? "
Well, Carmack's reply would probably be something like, "We were trying to ship a game on new technology. This ugliness was maybe .00000001% of the workload. Unimportant." :)
#209 posted by necros [99.227.133.158] on 2009/11/15 03:26:13
we've covered removing items from the inventory via a func_door function hack.
is it possible to co-opt sigil_touch() to remove runes from the player?
i was thinking if you gave built a trigger from scratch with a touch function of sigil_touch and gave it a spawnflags # corresponding to the appropriate rune (1, 2, 4, 8) except negative, it might be possible to subtract it out of the serverflags global variable.
except that the way they added the flag is in a form i'm not familiar with (and i don't know much about bitwise manipulation except what i've learned here).
serverflags = serverflags | (self.spawnflags & 15);
except that serverflags = serverflags | (serverflags & self.spawnflags);
would have seemed to me the correct way of adding the flag in.
what does the actual line do? will it prevent subtracting the flag off?
#210 posted by metlslime [98.248.107.212] on 2009/11/15 09:17:24
serverflags = serverflags | (self.spawnflags & 15);
first, the & character is bitwise AND operator, which means that for each bit, the result is 1 only if both inputs are 1 for that same bit. 15 is 1 + 2 + 4 + 8, So self.spawnflags & 15 is going to only allow those first four bits in self.spawnflags to be used in the next step.
The next step: | is the bitwise OR operator, which means that for each bit, the result is 1 if either input has a 1 for that bit. So serverflags = serverflags | x is going to turn on any bit in serverflags that is in x, and leave on any bit that was already turned on before.
So basically, only the first four bits in serverflags can be turned on with a rune, and, you can't turn any bits off.
Ah
#211 posted by necros [99.227.133.158] on 2009/11/15 19:39:30
damn shame, thanks though :)
The Meta Hack
#212 posted by negke [88.70.57.95] on 2010/07/30 14:02:53
Just in, the latest discovery in the hacking business. A trigger_command in id1! Well, sort of.
As it turns out, it's actually possible to execute console commands from within the map by simply adding a linebreak followed by a string of commands in the "map" field of a trigger_changelevel. For example:
"classname" "trigger_changelevel"
"spawnflags" "1" // no_intermission has to be set for this to work
"map" "\ngod; impulse 9"
The trick works because the trigger uses stuffcmd to change the level which we can exploit to run our own commands. However, there's a catch. In the engine, we have a hardcoded line that prevents the changelevel from being issued multiple times, which means this hack can only be used in this form once, and afterwards the player can't proceed to the next map after exiting the level normally. It will just stay in intermission mode forever - one might regard it as acceptable after a large map with no follow-up; or with a Shub ending.
Even in this state, the hack has a lot of potential, especially for mischief. You could, for instance, rename the player to "Asshole" and make his client connect to a server. :D Or mess with his entire config, unbind all keys etc. But since we're all nice and friendly people (right? :P), rather things like changing map-related cvars come to mind, e.g. setting r_wateralpha for the glass hack or adjusting fog values.
Luckily there's a sort of workaround for the changelevel/next map problem mentioned above. After changing cvars for map compatibility, you can add a "restart" or "map yourmap" command to the end of the string to reload the server with the exit trigger intact. Or, if you set any non-permanent stuff (e.g. cheat codes or gravity), you have to add commands to save and reload the game. ->
Following this line of thought, Preach came up with two very useful setups the hack allows us to use.
The first one is a kind of security measure to make sure all necessary commands are executed before the map is played. Set "serverflags 256" in the middle of your command string and use a func_episodegate with spawnflags 256 as a detector. If the episodegate doesn't spawn, the player (presumably) hasn't run the map yet and needs all the stuffcmd set; if it spawns, there's no need to restart.
The other one is an actual autosave option, albeit not a very transparent one. Place trigger_changelevel entities as checkpoints and set their map fields to "\nsave autosave; wait; load autosave" (you could also use "quick", or better yet, the mapname instead of "autosave"). This will save and instantly reload the game on each checkpoint - however, it's quite 'bumpy' and may even cause annoying delays in larger maps and engines with long loading times (DP). In this sense a button-controlled checkpoint system would probably be the best solution.
Addendum
#213 posted by Preach [77.98.129.22] on 2010/07/30 19:50:14
Negke and I were discussing this last night for as long as steam would allow, and I think there are some exciting possibilities. However, I have just thought of a potential small wrinkle in the serverflags 256 detection code. Suppose that someone loads the map, instantly receives a string of commands including "serverflags 256;restart", and then begins playing the map on the second time round. Supposing they save the game, they might not load that saved game for a long time. If serverflags 256 has been cleared by subsequent playtime, then on trying to load their savegame they may end up back at the map start!
How did this arise? Well, when a savegame is loaded the engine does two things. Before it looks at the savegame data, the engine runs the first three frame of the lodaded map as if it had just been started from scratch, in order to get all of the precaches loaded. It then updates all of the entities and qc variables to match what was stored in the savegame file. If our hack runs during those first handful of frames, then the restart command will be sent before the savegame is loaded, and so you end up right at the start of the level.
It isn't the end of the world, because now serverflags will be set to 256, and so if you load the saved file a second time it will work correctly. It's just good to make people aware that this problem can occur though. The alternative design would be make sure that your hack trigger fires later than the first three frames, but this has two negative effects. One is that the restart will be more visible to players, as they will see frames rendered first. The other is that in the scenario outlined above, none of your essential console commands get executed when the game is loaded. If the serverflags cvar got reset, it's probable that some of the others did too.
Renaming The Player
#214 posted by ijed [190.22.113.5] on 2010/08/02 13:50:59
That reminds me of Zelda on the gameboy, where it was possible to steal from the shop and be called THIEF for the rest of the game.
Changing The Skybox In Quoth
#215 posted by ericw [198.53.216.92] on 2010/08/26 10:47:06
Cool trick: you can change the skybox while a map is running in most engines, via an info_command.
The command is "sky [skyname]" (works in Fitzquake, DirectQ, Quakespasm). Unfortunately Darkplaces uses a different name, "loadsky". I guess you could have a pair of info_commands with both commands, but then the player sees an "Unknown command" message for the one their engine doesn't recognize. :-/
This could be used for some neat effects. Maybe have a setting sun sky turn to night after spending some time indoors?
#216 posted by necros [99.227.131.204] on 2010/08/26 19:07:41
This could be used for some neat effects. Maybe have a setting sun sky turn to night after spending some time indoors?
my lost map pack had this in there.
you can also string multiple console commands together like this:
sky void;loadsky void;fog 0 0 0 0\n
so there's no need to have multiple info_commands.
further, i think it's an undocumented feature, but if you set spawnflag 4, whatever commands are on that particular info_command will be run whenever the map is run or loaded from a save.
this stops the problem with fog/sky settings not being saved because they aren't in the worldspawn settings.
Ditto
#217 posted by Preach [77.98.129.22] on 2010/08/26 20:05:58
This could be used for some neat effects. Maybe have a setting sun sky turn to night after spending some time indoors?
We did this in Travail too! We had to cheat a bit for people with older engines though by covering the sky with a non-solid black brush.
Chthon Style
#218 posted by negke [88.70.240.46] on 2010/11/20 22:40:08
Looking for a replacement teleportation effect (as spawn_tfog can't be used anywhere else than 0 0 0 - or so it seems), I came across two more things Chthon allows us to do. They are quite obvious, but I'm posting them just for the record.
Lava splash: Target an info_notnull entity with a "use" "boss_death2" field.
This might be useful for spawning a powerful monster or when lowering a platform into a lava pool. The downside is that this will increase the kill stats by 1, but it should be okay since it evens out the max count.
Meteor shower: An info_notnull with "use" "boss_missle1".
This will start an infite attack of lava balls from a fixed position aimed at the player - for an environmental hazard with a little more kick. Each missle will play Chthon's throwing sound, but that shouldn't be a problem, especially if the entity is high above or in some distance. To stop it, simply killtarget the entity.
Needless to say, a monster_boss has to be placed somewhere in the map for precaching.
Correction About The Lava Splash
#219 posted by negke [88.70.55.36] on 2010/11/23 17:01:18
Use "boss_death9" instead for a more immediate effect, and killtarget the entity 0.1 seconds later to keep it from raising the kills count.
Despawning Items At Start Of Map
#220 posted by ZealousQuakeFan [188.220.248.12] on 2011/01/23 18:47:33
Using the triggered respawn of items to repopulate arenas with items, but this is after the player has picked it up. Is there a way to despawn an item, so it only appears in the arena for a particular wave?
#221 posted by negke [88.70.78.10] on 2011/01/23 20:34:01
Since you're using Quoth, the spawndelay feature (or however it's called) should suit your needs.
#222 posted by necros [99.227.131.204] on 2011/01/24 00:19:16
sounds like he's asking to both add and then remove an item during play.
so you'll need to make your item spawn in and then, you should killtarget them to remove them when their time is up.
#223 posted by ZealousQuakeFan [188.220.248.12] on 2011/01/24 01:36:22
It's not a massive problem. I can make little cages around the item, it's the problem of a fight taking some time to get going.
Feels crap to take it and lose half the time as you wait for the fight to ramp up, and I thought it would be neater to have an empty arena and just drop the powerups in as the particularly nasty monsters start flooding in :)
I guess the cage thing also has the advantage that they'd probably hear it better.
Another way round it would be increasing the duration of the powerup, so they just take it and don't have to worry about them missing the respawn. I guess that'll require code editing though :E
Not Necessarily.
#224 posted by necros [99.227.131.204] on 2011/01/24 02:19:11
you could create a variant of the trick i used in ne_tower with getting a quad damage after killing the two death lords.
create a number of of empty rooms with the powerup of your choice in them.
in each room, put a teleport destination on top of the powerups, but make sure the teleport destination is part way into the floor or ceiling so that the player won't fit when they teleport.
now, create a huge trigger_teleport that corresponds to each of the destinations and give them all targetnames.
what you'll do is start off a long train of teleports with delays after picking up the first powerup.
sure give each relay a delay of 30.
give all those trigger_teleports a targetname2 that is the same.
so you pick up the first powerup. that triggers a relay that will trigger the teleport trigger 30 seconds later that teleports you into the first room where you get a new powerup. the engine then pops you back to the old spot because you don't fit in the room. that new powerup starts another relay that, 30 seconds later, will teleport you into the next room. etc etc.
finally, when you kill the boss or whatever, killtarget all the trigger_teleports from the targetname2 which will remove them all and stop the chain.
#225 posted by ZealousQuakeFan [188.220.248.12] on 2011/01/24 02:30:51
That's brilliant :D
Negke Re 218 Above
#226 posted by Mike Woodham [109.156.210.82] on 2011/03/13 16:00:45
What determines the fixed point of the meteor shower - it is not the position of the not_null? It appears to be 0, 0, 0
Also...
#227 posted by Mike Woodham [109.156.210.82] on 2011/03/13 16:01:58
... what is the purpose of the '1' in 'boss_missile1'?
#228 posted by necros [99.227.131.204] on 2011/03/13 19:02:03
boss_missile1 is actually chthon's animation (not the missile spawning function).
his attack animation is looped, unlike all other monsters. this is why he just starts firing and never stops.
the lavaballs SHOULD spawn relative to the origin of whatever entity you use.
specifically, one should spawn at 100 units forward, 100 units right and 200 up, relative to the origin and the other 100 units to the left.
Necros
#229 posted by Mike Woodham [109.156.210.82] on 2011/03/13 20:04:36
Oh, I didn't think about that.
However, it ignores the origin of the info_notnull and works off 0, 0, 0. Also in practice, it doesn't look right as the source of the lava balls moves i.e. they do not emanate from a fixed point as the player moves, due to the position of the boss (arms) being recalculated.
Changing "use" to "boss_missile" does have the lava balls coming from a fixed point but it is impossible to survive the onslaught.
If you could trigger it on/off and slow it down, it could be a good anti-player device.
Try This
#230 posted by necros [99.227.131.204] on 2011/03/13 20:21:21
make info_notnull with 'use' 'boss_missile' and 'targetname' 'meteor'
now make a trigger_relay:
'targetname' 'meteor'
'target' 'meteor'
'delay' '1'
should now loop infinitely every second and shoot.
make multiple relays and start them at different times to stagger missile launches for a more natural effect.
if you have access to multiple targetnames, you can give a 'targetname2' that's unique to the relay allowing you to turn it off again without killing all the launchers as well.
Note
#231 posted by necros [99.227.131.204] on 2011/03/13 20:22:40
make sure 'delay' is set in the relay otherwise the engine will crash wtih an infinite loop error.
Necros
#232 posted by Mike Woodham [109.156.210.82] on 2011/03/13 21:46:58
Just playing with it now and using a trigger_multiple with "wait" set at one second. Three problems:-
1. almost instant death (100 - 120 hit points)
2. the first lavaball does not go anywhere, it just hovers until it disappears (subsequent balls do head for the player)
3. regardless of the position of the info_notnull, the source of the lavaball definitely remains at 0, 0, 0.
So although the position of the not_null is created in the map file, the code for the boss_missile ignores it and uses 0, 0, 0.
Pity, it seemed to have potential as a boss fight - e.g. carry out some task to turn the weapon off whilst whilst avoiding the lavaballs
Hm
#233 posted by necros [99.227.131.204] on 2011/03/13 21:55:00
you're doing something wrong then. maybe your info_notnull has brushes?
bmodels have origin of '0 0 0' at map start.
the code can't ignore the origin as it's explicitly used when spawning the missile with this line:
org = self.origin + p_x*v_forward + p_y*v_right + p_z*'0 0 1';
#234 posted by necros [99.227.131.204] on 2011/03/13 21:57:39
does "ShalMissile" work? it's homing, but a lot less damage.
Aha!
#235 posted by Mike Woodham [109.156.210.82] on 2011/03/13 22:30:36
So this is one of those pointsize entities eh?
I have just checked the Entity.qc file and for some reason both 'notnulls' are wrong:-
/*QUAKED info_notnull (0 0.5 0) ?
/*QUAKED info_notnull2 (0 0.5 0) ?
should be:-
/*QUAKED info_notnull (0 0.5 0) (-4 -4 -4) (4 4 4)
/*QUAKED info_notnull2 (0 0.5 0) (-4 -4 -4) (4 4 4)
Just shows how often I use the info_notnull tricks.
Thanks, I'll look at this a bit more know.
#236 posted by necros [99.227.131.204] on 2011/03/14 04:08:17
there are times when the info_notnull requires a brush to work. maybe you changed it to do one trick?
#237 posted by Mike Woodham [87.127.250.2] on 2011/03/14 17:01:24
Yes, possibly. Fourteen years of intermittent mapping... oh my word, is it really that long?
Necros
#238 posted by Mike Woodham [87.127.250.2] on 2011/03/16 14:07:35
You were right. I used it as a special trigger where it was in a frequently used cross roads but must not be activated as a trigger until certain other events had taken place, hence the need for a brush.
It pays to keep notes even if they take days to sort through!
Necros
#239 posted by Mike Woodham [86.177.187.246] on 2011/03/20 21:39:50
I have tidied up the ents.qc so everything is now as it should be within the editor: info_notnull is the point-size entity and info_notnull2 is the brush-size one.
I have also been playing with several 'missiles' and seem to have two distinct scenarios. The boss_missile works as you would expect with the player being bombarded with the lava balls. However, ShalMissile and LaunchLaser both go from the not_null origin to 0 0 0.
What is it that allows the boss_missile do do what we want but stops the other two from doing it. It seems as though boss_missile has the player as its 'enemy' all the time as it reacts as the player moves but the others are fixed. Is this something to do with what the 'activator' is? Are we able to do anything about this from the editor?
Incidentally, the LaunchLaser gives a great effect even like this - if you have the not_null close to 0 0 0 and operate the entity via a trigger_multiple, you have a build-up of an intense orange yellow glow that fades in to maximum and then fades out to nothing when you move out of the trigger's area. Looks neat and I am sure it could be used somehow.
#240 posted by necros [99.227.131.204] on 2011/03/20 23:04:46
LaunchLaser will not work because it requires data to be sent to the function:
LaunchLaser(vector org, vector vec);
so you'd need to send 'org' as the point to spawn the laser at and 'vec' as the direction you want it to fly to, which is why it doesn't work.
ShalMissile SHOULD work.
in the function, the line:
missile.origin = self.origin + '0 0 10';
while incorrect from a qc standpoint, should still work. (or maybe you don't need setorigin when you're spawning an entity in the same frame??).
are you sure use used a point entity when you tried ShalMissile?
#241 posted by necros [99.227.131.204] on 2011/03/20 23:06:21
in case it's not clear, there's no way to send the required data to LaunchLaser.
when you run a function via 'think' or 'use' it's the equivalent of just typing LaunchLaser(); in code, so while it works, it sends, the engine fills in the missing variables with 0. (or '0 0 0' in the case of vectors, 'world' in the case of entity and so on).
Ice
#242 posted by negke [88.70.94.12] on 2011/03/21 16:40:50
Not really a sophisticated hack, but a nice little trick I just came across in an old map.
It's possible to simulate a crude ice sliding effect by putting a flat shootable trigger_multiple with a high wait value on the floor (possibly target it on mapstart to avoid the bleeding) - basically the old invisible wall trick. The player will slide over it like he does when landing on top of a monster; he can change the direction but he won't come to a stop until he reaches solid ground.
There probably aren't many situations where this might come in handy, except maybe in winter-themed maps or for certain traps.
So...
#243 posted by Scampie [72.12.65.211] on 2011/03/22 03:58:45
on the idea of the killable cthon frikac made long ago, is it possible to make, for instance, an enforcer that shoots player rockets? and if not an enforcer or other monster, perhaps a monster that appears like the player model?
#244 posted by jt_ [24.11.39.160] on 2011/03/22 04:32:56
Couldn't you change the skin on the grunt? I thought it had more than one skin, the other being the players. I'm not 100% sure on that though.
Didnt A Negke Map
#245 posted by nitin [203.202.43.53] on 2011/03/22 04:59:01
have monsters shooting non-standard missiles?
#246 posted by necros [99.227.131.204] on 2011/03/22 07:25:33
scampie: yeah, you basically build a monster out of an info_notnull, filling in th_missile and such with whatever attack function you'd like.
as nitin said, neg's map lower forecourt has things like lightning dogs.
jt: nope, only one skin on grunts.
Necros
#247 posted by Scampie [72.12.65.211] on 2011/03/22 07:32:38
thanks for confirming
Monsters With Different Attacks
#248 posted by negke [88.70.53.253] on 2011/03/22 08:34:11
Yes, it's possible but it's really an ugly hack. One has to keep in mind that the qc monster functions are tied to the animations in the mdl, so creating custom monsters will result in "invalid frame #" warnings and, more importantly, the attacks won't be animated.
In Particular
#249 posted by Lardarse [62.31.162.25] on 2011/03/22 10:16:51
Not having any animation for the attack essentially means no warning before the attack happens, which is unfair to the player.
6 Frames Or So
#250 posted by ijed [190.22.72.103] on 2011/03/22 11:55:01
Isn't any warning anyway. It just doesn't look very good.
#251 posted by Spirit [82.113.106.205] on 2011/03/22 12:43:59
It is also more of a gimmick, I prefer the stock monster.
Spirit
#252 posted by Scampie [72.12.65.211] on 2011/03/22 20:05:49
I'm going to release a map entitled 'Made by Spirit' and it will be nothing but spawn that shoot shambler lightning in a tiny box.
#253 posted by ZealousQuakeFan [81.141.88.35] on 2011/08/02 23:58:02
Would it be possible, using info_notnull, to create a zombie that doesn't attack the player but just wanders around? :E
I'm assuming not because it'll just try to call an attack function and crash when it doesn't find it but asking anyway :p
?
#254 posted by onetruepurple [89.79.96.4] on 2011/08/03 00:13:46
"th_missile" "plat_hit_bottom"
"noise1" "zombie/z_idle.wav"
No, That's Not Possible.
#255 posted by necros [99.227.131.204] on 2011/08/03 00:43:30
in order to wander around, you need ai_walk (part of the th_walk sequence), unfortunately, ai_walk calls the function that searches for clients which would lead it to wake up and eventually attack you.
Oh
#256 posted by necros [99.227.131.204] on 2011/08/03 00:44:42
well, just thought of this, but if you made the zombie mad at some monster it couldn't reach, it would just wander around and not attack you (unless you fired at it).
the qc hack to do that is a little annoying though as it relies on edict numbers that change when you're making a map.
To Elaborate On That
#257 posted by Preach [94.171.245.254] on 2011/08/10 17:46:07
(I know this is a huge bump, I've been 10 days without internet...)
You could even get the zombie to walk in a path by
1) Making it mad at a func_plat instead of a monster
2) Giving that func_plat a health value so that the zombie stays mad at it
Keeping the platform out of sight is important so that the zombie doesn't try to attack it. Giving it a health value isn't too dangerous as long as you leave .takedamage set to 0 (TAKEDAMAGE_NO).
As necros mentions though, the hack to do this relies on entity numbers which means it lacks and resilience if the position of the relevant entities in the entity list changes for any reason (updated map, change in entity counts over skill levels, different mod).
The best mitigation is to ensure all of the entities involved in the hack are the first things loaded from the map - which usually means they should be the first ones added to the map in the editor. If it's too late for that you may want to edit the entity file by hand to achieve this.
#258 posted by ZealousQuakeFan [81.141.94.109] on 2011/08/10 18:51:59
hmm, okay, I might be able to do something with this :)
I take it as soon as the player attacks the effect is lost? Not that that is a major issue.
Yup (NT)
#259 posted by Preach [94.171.245.254] on 2011/08/10 20:27:35
Shootable Buttons No Bleed?
#260 posted by Ghd Fladjern Tilbud [178.70.213.70] on 2011/12/03 15:52:12
Is it possible to make shootable funcs_ like buttons not bleed on activation (with stock progs.dat)?
#261 posted by necros [99.227.131.204] on 2011/12/03 18:51:12
i don't think so. in order to take damage, an entity needs to have .takedamage set to a non-zero value and blood particles are spawned when .takedamage is non-zero.
Not Entirely
#262 posted by Preach [86.129.221.49] on 2011/12/03 18:52:44
The problem is that spawning blood is a decision taken entirely on the part of the weapon firing code (since explosions spawn none, and lightning burns orange instead). In particular the shotgun and axe code will always spawn blood if they can damage the target, so any hack which prevented the blood appearing will necessarily set .takedamage to zero, and therefore make the entity shootable no more.
There are two interesting alternative though. One would be to make the button shootable only by explosions. For this you wouldn't even have a shootable button, just a func_door to give the illusion of movement. You add a point sized info_notnull next to the button and add the following fields:
"takedamage" "1"
"th_die" "button_killed"
"speed" "1"
"pos1" "self.origin"
"pos2" "self.origin"
"health" "1"
"max_health" "1"
Then make it target the "fake" button and whatever event you want it to fire.
This button can be refired after 2 frames, and you can't add .wait to extend this because the movement functions are intended for a BSP object. So you might need to add a trigger_relay between the info_notnull and the things that it is meant to trigger in order to introduce a delay.
The other alternative would be to make a button that is fired by touch. This would mean a number of compromises need to be made:
1) Anything that touches the button would activate it, like monsters.
2) The activator for the button will be set wrong, which matters if it's meant to wake up monsters or send a message to the player.
3) Hitscan attacks (shotguns, axe and lightning gun) will not activate the button.
If these are all acceptable then start by taking the existing button as a base. Read all the fields which are set in-game using the edicts command. Then change the button's classname to func_wall and add all the fields you read from the edicts command to it manually along with
"touch" "button_fire"
Grenade Shooter
#263 posted by Orl [130.156.175.242] on 2011/12/05 19:41:21
Hopefully this should be a simple hack, but I couldn't find a clear explanation in the thread. I want to do an action similar to post #11, having lightning fire out of a point entity at a certain direction. However instead of lightning, I want it to be a grenade.
I attempted to do this using the keys and values but replacing them with rockets, but it did not work, as I expected.
So I guess to sum things up, can I have something similar to a spike shooter, that instead of spikes, fires grenades, or any other projectile I want it to?
If I can get a solution, I will post a few screenshots of my current map soon :)
Exciting!
#264 posted by RickyT23 [90.220.150.150] on 2011/12/05 20:09:31
Someone tell him quick so we get screenies!!!
How About...
#265 posted by rj [86.0.164.53] on 2011/12/05 20:29:06
post #14? ;)
presumably you could set up another info_notnull for the shooter to target, compile the map, get the edict number and add it in as the shooter's 'enemy' field...
Can It Be?
#266 posted by generic [67.233.156.211] on 2011/12/09 19:44:41
Is it possible to overload the model field for torches? Perhaps re-directing it to a custom bsp model for, say, a lantern while keeping its sound and light values in tact.
#267 posted by negke [31.18.187.170] on 2011/12/09 21:42:43
Might be easier to use a point light and point trigger for the sound along your custom light model (illusionary for static).
#268 posted by mh [137.191.242.106] on 2011/12/15 15:41:45
External BSP models don't light properly though... but I guess that for lanterns you could just light them fairly bright and say that it's the light from the lantern that's making them bright.
For Madfox - Crosspost From Modelling Thread
#269 posted by Preach [77.98.165.95] on 2012/05/23 00:00:51
To add the lightning sound effect to your map:
Go to the first page of this thread and read post #8 by Negke. If you want to use the sound which was included in the zip with your map, then precache it yourself in the spawn function for the info_tessla. If you want to use a sound which is already precached, then I recommend "weapons/lhit.wav".
Thanks
#270 posted by MadFox [94.215.210.233] on 2012/05/23 01:06:14
I will try that, I knew it was somewhere.
I Think
#271 posted by Orbs [62.195.2.36] on 2012/05/26 18:20:35
the thing with grenades has already been done:
check sm129_efdat
#272 posted by ZealousQuakeFan [82.16.91.127] on 2012/12/10 19:44:38
Is there any way to have a monster jump start deactivated and then switch on when a trigger fires?
Might As Well Not Jump
#273 posted by Preach [77.98.165.95] on 2012/12/10 21:12:53
The usual way of creating a trigger, detailed here among other places:
http://tomeofpreach.wordpress.com/...
This works just fine for trigger_monsterjump.
Healer
#274 posted by mechtech [65.190.42.20] on 2012/12/19 18:17:25
example map of healer stations
for reference
image
http://www.quaketastic.com/upload/...
map
http://www.quaketastic.com/upload/...
Wiki Page For These Tricks
#275 posted by than [182.164.57.115] on 2013/03/28 13:34:24
has been added here: http://quakewiki.org/wiki/Map_base...
I'm not really very knowledgeable about these hacks as I've only really used the explosion effect before, so please add and modify what I've written.
Also, do I need to get permission to quote stuff from here or even copy it wholesale? I wanted to use Preach's explanation of the explosion, because it is better than my own, but I wasn't sure if he would mind...
Anyway, like I said, please add more stuff to that page and improve what's there.
Just Remembered
#276 posted by than [182.164.57.115] on 2013/03/28 16:00:43
there is some kind of trick to get particle effects to appear on stuff. I've seen it on keys in a couple of maps, and I think I even saw it on a monster before. It could be used to signify a high health monster using the armortype hack.
Anyone know how it works? Is it as simple as adding an effects field or is there something more to it?
#277 posted by Scampie [72.12.65.92] on 2013/03/28 17:14:36
Is it as simple as adding an effects field
Yes-ish
"effects" "1" works well, a bunch of fireflys
"effects" "literally everything else" either makes a giant glowing flicker light, does nothing, or makes more fireflys and flickering light.
Logic Gates
#278 posted by than [182.164.57.115] on 2013/03/29 05:52:26
I already posted this in mapping help, but I think it might be worth putting it in here to...
Quake logic gate tutorial:
http://www.quaketastic.com/upload/...
I will add it to the wiki with images soon.
Logic Gates Again
#279 posted by Preach [77.98.165.95] on 2013/05/11 00:53:47
So I wanted to make a post about logic gates, dug up this thread and found the very last post was about...logic gates!
Than: I read through your tutorials and had two ideas. The first was a simpler construction for the "if...else" device - I think it's easier to understand as well as saving an entity, so I thought I'd share. The idea keeps two spikeshooters aiming at the if and else triggers. Set the two shooters up next to each other, then create a single blocking door just large enough to block one of the shooters. Have that door move up and down between the two firing paths, so it blocks one when it is up, and the other when it is down. Diagram:
Up
>.....| [+] (if)
>.......... [+] (else)
Down
>.......... [+] (if)
>.....| [+] (else)
The other suggestion I have is more radical: replace the trap_spikeshooter with an axe! Less obliquely use an info_notnull with "use" "W_FireAxe". Set the angle of firing with "v_angle" (although since you're free to build the firing range at any angle you might as well choose to fire due north and not bother setting v_angle at all!).
The axe fires an instant hit traceline which starts 16 units above the info_notnull and traces for 64 units. This removes the need to create a stream of spike entities and wait for some number of frames until they score a hit. The axe has a few advantages over the player's other instant hit attacks - it's quieter, needs no ammo, and doesn't require extra entity hacks to set up the angle of attack.
The big appeal of the axe over the spikes in my mind is the instant reaction of it - making the system much more tidy. This leads me onto the discussion I wanted to raise in the first place. For a few days I've been wondering about trying to find a better hack for the doors. The fastest reaction time a door can have is 0.1 seconds. You can get better reaction times turning an input on by having the spike shooter aim near the bottom of the door, which then moves quickly out of the way. However, this is traded against worse reaction time when turning that input back off.
Another issue with doors is that you might actually miss inputs, if a second input comes in too soon after the first and the door is still moving. This might destabilise a complex set-up which 'knows' how many triggers it takes to turn inputs on and off, essentially inverting subsequent inputs. So there are non-aesthetic, if obscure, reasons for wanting an alternative.
What I want to start with is clarifying the way quake logic gates work right now, compared to silicon ones, and make sure it's the right model to use. Silicon logic gates have a continuous stream of electrons pouring into the inputs, and the output stream responds to changes in the inputs with another ongoing stream. The streams from AND gates begin when both inputs are active simultaneously.
The first challenge in converting that into quake entities is that the triggering in quake is instantaneous, not continuous. This means that it doesn't make sense to talk about two triggers occuring at once: only one can fire at a time. So the model we have is that continuous streams are actually represented by entities with state - currently doors - being toggled to indicate a particular input is turned on or off.
That deals with the input. The output needs to work in reverse - a continuous state (the outcome of the logic gate) needs to be converted back into an instantaneous trigger. We do this by querying the current state of the gate - in practical terms by launching our spikes into it and seeing the trigger fire if the gate is open.
That's the theory as far as I can see it - is that more or less what everyone expects from logic gates? Or is there a better way for them to work conceptually - if only we could find the hack to use?
Thanks For That, Preach
#280 posted by than [180.146.53.39] on 2013/05/11 04:01:24
I had no idea you could fire the player's weapons from an info_notnull. That sounds a little more streamlined, although the spikeshooter method works nice if you actually want the system to be visible to the player of course.
The time lag problem is a little bit crap, but it's not the end of the world, since you can move the spikeshooter closer to the trigger if there is too noticeable of a delay. Of course, the axe trick is better since it minimises the delay.
I had thought of the trick to save doors, but I don't think it works if you want a combination of IF/ELSE and AND. In any case, I thought of it after implementing in the tutorial map :/
Trigger_damagethreshold
#281 posted by Preach [77.98.165.95] on 2013/05/11 10:26:41
While working on a new and improved logic gate contraption, I came up with something short and sweet:
http://tomeofpreach.wordpress.com/...
A new hack to get a trigger_damagethreshold in stock quake. Not the most commonly used entity to be honest, but obviously someone went to the trouble of inventing it. Can you see a use for a logic gate?
Omg...
#282 posted by necros [99.227.215.224] on 2013/05/11 16:47:09
That is such a clever idea o_o
Logic Shooters
#283 posted by sock [186.109.171.180] on 2013/05/11 18:13:26
This mostly what I did with my Q3 "Edge of Forever" map. I even wrote a long article explaining some of the logic I built using entities.
Logical Madness
It's Done
#284 posted by Preach [77.98.165.95] on 2013/05/14 00:39:05
Okay, as promised, an alternate logic gate with the emphasis on instant response and being highly obtuse! There is another selling point on offer here though - it has separate targetnames for opening and closing the gate rather than a toggle. This may be desirable if you have many potential sources for the trigger to open or close.
http://tomeofpreach.wordpress.com/...
This one now uses both of the mini-hacks I've posted about this week. It also went through a fairly big rewrite in the past 24 hours or so. Originally it worked a lot more like traditional logic gates, so the wierd hacky solid-toggling entity only blocked attacks, rather than receiving them as inputs. It relied on a "touch" function for the off switch, which had a potential race condition. The new way with the unusual use of the damagethreshold hack avoids that, and does away with the separate detector entity as well!
And Some More
#285 posted by Preach [77.98.165.95] on 2013/05/16 00:46:10
The second half, where we restore the logic functions to logic gates:
http://tomeofpreach.wordpress.com/...
The AND gate set-up is a bit lazy, I might try and think about a better way. The OR gate is rather cool though, if a bit more fiddly. Finally we have an IF-ELSE patterned after the OR.
Wow
#286 posted by negke [31.18.179.222] on 2013/05/18 12:13:05
Still need to wrap my head around it, but it certainly looks like a new level of awesome! So now functions can be used in classnames as well?! Thanks for sharing your genious.
And well-timed, too, as I was going to post a brain teaser for you which just may have been already partially solved by your latest discoveries.
How would you go about creating a sort of dynamic counter functionality in an edict-efficient way? I mean something like a pot where counts are added and substracted, almost like a monetary system.
For each monster that you kill or item you pick up, a token (for the lack of a better word) is added to the pot, which then, if a sufficient number has been reached, can be used for different actions such as triggering certain evens, unlocking corresponding doors etc. Using it will deplete the pot by the number of tokens required for the specific action.
So for example, there's a bronze door that opens for 10 tokens, a silver door for 20, and a gold door that needs 30. The player can decide whether to spend his earnings right away or save them until he has enough for a better door. Using them substracts the amount from the pot, so it's an exclusive decision. Having 30, it's possible to either open the gold door, or both bronze and silver.
This could be done with a number logic gates and toggleable triggers, but this would be a rather wasteful setup, especially the more complex the system and its options become.
Any ideas? (Bonus points for an additional system to check the current number of tokens in the pot)
What's In A (class)name
#287 posted by Preach [77.98.165.95] on 2013/05/18 12:59:00
Re. money: I have a few thoughts on what might work there but nothing concrete yet. Watch this space...
Thought I'd pick up on something here:
So now functions can be used in classnames as well
Yeah, essentially classnames ARE functions - when an entity is spawned, QC imbues it with a unique behaviour by running the function whose name matches the classname. The function doesn't have to be very special either, as long as it acts on the entity called "self". So you can often run two functions on a hacked entity by pairing an unusual classname with nextthink and think.
InitTrigger is a really great one to use. Pretty much every spawn-function for a trigger sets some fields on self, applies some default values, then calls InitTrigger to actually make it touchable and invisible. If you are trying to hack the behaviour of a particular trigger and need to override a key set by the spawn-function, often you can just set all the fields manually and change the classname to InitTrigger.
Re. Money:
#288 posted by slapmap [178.71.241.190] on 2013/05/18 15:59:04
Hmm maybe code a 'money/buying' system in qc after all. Its getting crazier and harder to implement as a maphack. And I would love to have some more economics in Quake.
Yeah
#289 posted by Preach [77.98.165.95] on 2013/05/18 17:55:28
Well obviously you could do it in qc in three seconds flat, the fun is in the challenge.
#290 posted by lth [85.2.96.225] on 2013/05/18 18:34:07
Can you not have something like a func_plat which is moved up and down as currency accumulates or is spent? (With spikeshooters at various vertical distances, firing horizontally, that are interrupted by the presence of the platform)
Platform
#291 posted by Preach [77.98.165.95] on 2013/05/19 03:21:01
I agree that could work, but it's the ability to move it up and down by arbitrary amounts that's hard. Platforms, doors and buttons all move to absolute coordinates calculated at spawn time. Even with a hacked entity which didn't use those spawn-functions, you'd be moving between the pos1 and pos2 keys, which are fixed.
It does also have the old race condition like logic gates made out of doors. On the one end of thing, having to wait for a few frames before a deposit is made is something a player would never notice or mind. On the other though, you're opening yourself up to a double-spend attack...
#292 posted by negke [31.18.179.222] on 2013/05/19 10:37:42
'Dynamically'-moving funcs can be done by including a caged monster in the entity (hidden from view and sound). It moves with the func and uses the health or invicibility hack. Then it can be blocked by barriers which prevent the entity from moving onto the next stage until they are removed.
Spliting
#293 posted by Preach [77.98.165.95] on 2013/05/19 11:00:19
Yeah, if you can move another entity dynamically you can get a BSP to follow, It's still not enough for an efficient credit system though, because you'd need one more barrier for each credit the player earns.
#294 posted by Scampie [72.12.65.92] on 2013/05/20 01:02:54
http://www.youtube.com/watch?v=YQ6...
playing around with trying to make a misc_teleporttrain that isn't MOVETYPE_PUSH (which apparently crashes Quake when telefragging anything except Shub)... I ended up making hologram Quakeguy.
Still no idea how to get this thing to properly move :(
#295 posted by Scampie [72.12.65.92] on 2013/05/20 09:34:45
fyi, figured out how to do what I wanted... MOVETYPE_PUSH is required for a train... but you can bypass the crash if you killtarget the train the moment the enemy you telefrag dies (shub removes the train as well as part of her death functions)

Post A Reply:

Name: |
Title: |
Body: |

Website copyright © 2002-2013 John Fitzgibbons. All posts are copyright their respective authors.