Title : TrigCons Filename : trigcons.zip Version : 1 Date : 16/6/98 Author : Tom Garnett (Nihilist) This file by James Schlackman (Freelancer) Email : tomgarnett@dial.pipex.com Type of Mod ------------ Quake C : yes Sound : no MDL : no Level : no Format of Mod -------------- .qc file. Build time ---------- mod : 5 mins debugging : 15 mins this file : 30 mins Description: ------------- This is an incredibly small mod intended for use by level editors, namely level edtors who would rather be bombing around a level than typing at the console. With this mod you can use a new point entity called trigger_console that will, quite simply, execute a given console command on the console of the player who activated it. The keys for this entity are: targetname The name of the entity (as with EVERY OTHER DAMN ENTITY) message The console command you want to be executed Useful Stuff to remember: -------------------------- 1. You need to put a '\n' (without the quotes) at the end of the command, sooo, if you want to execute a 'bf' (brightflash -try it and see) you should put 'bf\n' in the message key. 2. This is a POINT entity so needs to be activated by a SOLID entity ie trigger_multiple. If you don't know how to do this you shouldn't be editing levels, you moron. 3. You can execute mutiple commands by separating the commands with semicolons as per the normal console command syntax, ie bf; echo "Hello"\n will do a brightflash and print Hello on the console. 4. You may ask WHY? Well, here are some example uses: -use the 'connect' command to simulate jumping to an IP address in the same way you jump to a new level. -use the 'play' command to play a sound to the person playing. Note that this will NOT be heard by other players. -use the 'name' command. -use the 'color' command. Imagine a series of these in a hallway to create a 'psychadelic alleyway' effect. -use the 'say' or 'say_team' command to send predefined (offensive?) messages across the entire server in their name ;) -build your own start hall that has a few of these entities dotted around to execute your multiple key setups. This is useful if your bro uses the same machine as you but has bloody stupid key setups ;) -use the 'cd' command set to change CD tracks mid-level just for giggles. -set up an entity so that when they pick up the rocket launcher they automatically execute a rocket jump (off of a tall thin pillar, into some lava :) -use the 'disconnect' command to make a REAL exit from your DM level - or a 'quit' command. -use the '+forward' and/or '+jump' to send someone careening off in an inconvenient/dangerous direction ie towards a lava pit. -use the 'kill' command to subtract two frags from ignorant enemies. -use the 'save' command in levels to save perioically and the 'load' command in your custom start hall to access your saved games. -use the 'unbindall' to seriously paralyse anyone not 'in the know'. All their keys will stop working (except ESC). -use the 'exec' command to execute a whole load of commands! Note to level builders that you may want to put any scripts you execute in a .pak file with your level so they cannot be changed. Obviously this is not infallible, but it does provide some idiot-proofing. If you want it better protected, use semicolons in the message key, as above. How to use the mod ------------------ 1. Get a copy of the Quake source code 2. Get a copy of a QuakeC compiler (QCCDOS comes with the source code) 3. Copy trigcons.qc into the same directory as the source code. 4. Edit the progs.src (back up first!!) to include the line trigcons.qc after the line with 'misc.qc' on it. 5. Compile the code 6. Put the resultant file (progs.dat) in a subdirectory of your Quake directory (we suggest a 'trigcons' directory) and run Quake with the -game switch, e.g. quake -game trigcons You must use lowercase or it will not work. At all. Bear in mind that the above will be pointless unless you actually have a map with a trigger_console entity in it. Known Bugs: ------------ There are 5 lines of code. You are kidding, right? Copyright and Distribution Permissions --------------------------------------- Do what the hell you like. If you're distributing a map using this, include this file so other people know how it was done. It really pisses me off when I can't work out how a particular effect was created. Availability: -------------- You're reading this. You have the file. Just in case you are dumb enough, here is the ENTIRE FILE: void() trigger_console_use = { if (activator.classname == "player") stuffcmd (activator, self.message); }; /*QUAKED trigger_console (.5 .5 .5) ? notouch pipes commands to activator's console. set "message" to console command to be executed. */ void() trigger_console = { self.use = trigger_console_use; if (!self.message) objerror ("No console command set\n"); }; There. Share and Enjoy. Comments/suggestion/improvements/help/sadistic uses? Mail me (address above)