Subject: Jump pads in Q2? You betcha!

OK, this is a long story, but you goons are *required* to read the whole thing... that's the price you pay for cool information. My Tarot teammate and spritual advisor Monsto Brukes wanted to simulate Q3 jump pads in Q2 for map testing purposes. Tarot's bit-twiddling nerd guy (that's me) opened up the Q2 source and started to plug in an elevation value. But wait... he found that trigger_push code refers to the "angles" key... but that's not right he says... trigger_push just uses "angle". Well it turns out id didn't trust you mapper goons to be able to do a little simple trigonometry, so they published the input for trigger_push as "angle" only, but the code *does*not*have*that*limitation*.

The "angles" values are pitch (up/down), yaw (left/right) and roll (fall over). If "angle" is specified for an entity, then the code automatically sets "angles" to 0,angle,0... and these values are used for the entity. But what happens if instead of specifying "angle" in the .map file, you set the three "angles"?... heh heh... you know the answer, don't ya? And all it takes is a little math to translate those angles into movement directions... but not to worry, Tarot's bit-twiddling nerd has done that for you. The translations performed by the game source end up making a positive pitch down from horizontal. Yaw is unaffected by this, so you'd use the same angle you've previously used for the angle key. And roll is ignored for trigger_push, which is a shame, really... it would be nice to have a trigger_push that made you do flips :-). Anyhow... quick example, and I'm sure you can take it from there. Say you want the trigger_push to push you up 60 degrees from horizontal and to the west. Set "angles" to -60 180 0. That's it.

So how do you go about using this info in your editor? If your editor allows you to enter user-defined keys (qED, QERadiant, Quark), you're all set. Just enter "angles" for the key and "<-pitch> <yaw> 0" for the value. If you're using Tread, open up quake2.gdf, find trigger_push, and enter the following below the "angle" line:

	def_key : string : "angles" : "pitch yaw roll" : ""

If you're using WorldCraft, get Mad Dog's new WorldCraft .fgd file from http://home.earthlink.net/~tonykat127/mapediting/fgd_q2_100699.zip. It contains the "angles" key for trigger_push, as well as all sorts of nifty features not found in the original. If you're using Qoole, stop.

One qualifier that could foul this up for you: If your editor *forces* an "angle" key to be written to the .map file, "angles" will still work *as long as* it occurs *after* the "angle" definition. So if you try this and you get the same old trigger_push behavior, open up your .map file in a text editor, find the trigger_push, and delete the "angle" line.

The team was so fired up about this that we built a fun DM map for you guys to check out. We started out making a small tutorial sort of thing, but it got out of hand pretty quickly and turned into the real deal.

And... you're welcome :-)

MrHyde
