Solution 1: you have to make the railgun particles invisible, and add a fast missile with the proper projectile type (little circles in case of Unreal SR, spirally animated stuff in case of SW railgun) and no damage and pain (and +RIPPER if the railgun is to penetrate targets).
What's the problem with this?
- Fast missile has to have collision box, ore else it goes through most walls. If it has collision box, in narrow spaces it may land into a wall where the invisible railgun attack passes on, misleading the user into thinking the shot hit the wall.
- The fast missile can be dodged despite the railgun hitting, again misleading the user
- On long distances the "speed difference" between the non-hitscan missile and the hitscan rail attack becomes apparent. Railguns are long ranged weapons, so this problem is quite usual.
- Extremely fast missiles even when they are the special fast projectile type tend to go through walls in certain conditions
Solution 2: drop the railgun attack, and use only the fast projectile.
What's the problem with this?
- It's not hitscan.
- It needs to have collision box, therefore it tends to hit walls more often than hitscans.
- If it needs to be target penetrating, you have to use the +RIPPER flag. It creates erratic damage behaviour due to it being dependent on the size of the enemy (an Arachnotron will receive a lot more damage than a Baron, also if you shoot at angles, it will deal sqrt(2) times more damage). Damage also becomes projectile speed dependant.
What i think would be a good solution:
Either a new function that adds an attack behaviour that is the mix of a railgun and a fast projectile: it is a hitscan that can penetrate, but leaves a sprite with the proper direction (like the newer version of fast projectile) every X distance.
Something like this:
Code: Select all
SPRT A 1 A_SpriteRailgun(<Damage>,<Sprite actor leave>,<spawnoffset>,blah...)
Code: Select all
SPRT A 1 A_RailAttack(<Damage>,<Spawnoffset>,<Useammo>,<Ringcolor>,<Corecolor>,RGF_SPRITETRAIL, <maxdiff>, <pufftype>, <spreadxy>, <spreadz>, <Sprite actor type>)
The wiki says this, but what i found is quite different. I tried using moderate to extreme values on both end of the spectrum (both speed and radius), yet for some reason the distance between them remained the same.When one is specified, several (at least eight) are spawned every tic in the projectile's wake, as a trail. The greater the speed, and the smallest (yet non-null) the radius, the more numerous the steps.


