Basically I'm defining a projectile similar to the one that has been used for flashlight mods already (but in those cases, the projectile was fired from a weapon) and then I'm summoning the projectile from the console.
I set up an alias to summon a stream of these projectiles by summoning a projectile, waiting 1 tic and then summoning another. For testing purposes, I've set it up so that a stream of particles get summoned for about 10 seconds and then the light goes off. I do this by setting up an alias that summons about a second's worth of particles and then runs another alias to do the same (rinse and repeat for 10 seconds).
Basically it works almost as intended but the flashlight effect flickers, and looks really epileptic-fit inducing, instead of providing an (almost) steady beam as it does with the weapon version. If I define a weapon to shoot the projectile every tic, it works fine and I get a nice stream of particles but setting up the console to do (apparently) exactly the same thing makes the effect flicker as if the projectile is being summoned less frequently than 1 per tic. Removing the "wait 1" between summonings means all the projectiles get summoned at the same time and I can't use fractions for the wait command.
So, my question is, does the "wait 1" console command really wait for 1 tic or does it actually take a bit longer or is something else going on?
At the moment, the system is just a rough test, but there seems little point in going further if I can't make it look better than it does. I've tried fiddling with light radius values, projectile speeds, frame durations and all sorts of stuff. The problem is, the projectile needs to move fast to minimise the lag between player movement and the beam hitting a wall or some other thing it is illuminating. If I slow the projectile down to a point where the flicker is no longer a problem, the beam is ridiculously unresponsive and lags way behind the player movement. I know the Doomguy is fast, but even he shouldn't be able to outrun a beam of light.

Any ideas? (the values below are just the ones in my current test, they're probably not the best ones I've tried)
Code: Select all
alias Flash1 "summon TBeam; wait 1; summon TBeam; wait 1; ... ; Flash2"
etc
etc
Code: Select all
// flashlight
pointlight SUITFLASHLIGHT1
{
color 1.0 1.0 0.0
size 40
offset 0 16 0
}
pointlight SUITFLASHLIGHT2
{
color 0.9 0.9 0.0
size 50
offset 0 16 0
}
pointlight SUITFLASHLIGHT3
{
color 0.8 0.8 0.0
size 60
offset 0 16 0
}
pointlight SUITFLASHLIGHT4
{
color 0.8 0.8 0.0
size 70
offset 0 16 0
}
pointlight SUITFLASHLIGHT5
{
color 0.7 0.7 0.0
size 80
offset 0 16 0
}
object TBeam
{
frame NONEA { light SUITFLASHLIGHT1 }
frame NONEB { light SUITFLASHLIGHT2 }
frame NONEC { light SUITFLASHLIGHT3 }
frame NONED { light SUITFLASHLIGHT4 }
frame NONEE { light SUITFLASHLIGHT5 }
}
Code: Select all
ACTOR TBeam
{
Speed 50
Mass 5
Projectile
+NOGRAVITY
+NOCLIP
+NOBLOCKMAP
+DONTSPLASH
States
{
Spawn:
NONE AABBCCDDEE 2
Stop
}
}