Draft: Extend linedef 461 to set velocity and fuse of spawned object
I've extended the functionality of linedef 461 ("Spawn Object") to optionally set the velocity and/or fuse timer of the spawned object. I noticed this functionality was missing, even though it would be quite useful for projectiles and the like. Here's how the new functionality is set up:
-
ML_EFFECT2
(No Midtexture Skew): Set the velocity of the spawned object- Horizontal velocity = linedef length/angle, 16 fracunits = 1 fracunit/tic
- Vertical velocity = Backside sector ceiling height, same scale as above (if no back sector, only
momx
andmomy
will be set)
-
ML_EFFECT3
(Peg Midtexture): Set the fuse timer of the spawned object- Fuse timer = Backside sector floor height (1 fracunit = 1 tic)
I'm aware that the angle is already used to set the angle of the spawned object, but I imagine in 99% of cases where the object angle matters, the map creator will want the object to face in the same direction it moves—for the other 1% of cases, there's always Lua. Also, if both of the new flags are set and a delay is desired, one could always put this linedef in a separate control sector and use linedef 450. (Though in the case where you want the delay to equal the fuse timer, and you want zero vertical velocity, this won't be necessary.)
Test map: linedef461test.zip