Maximum range for SetActivatorToTarget?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Maximum range for SetActivatorToTarget?
I'm currently using SetActivatorToTarget with the player as the initial caller to set the target as whatever is under the crosshair. I noticed that this has a very limited range though (even shorter than the hitscan range). It really isn't a problem for me since I am only using it for getting the target's heatlh to use for a HUD. Is there any way to increase the limit without causing issues?
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Maximum range for SetActivatorToTarget?
Huh. Apparently that function, when used for a player, internally calls P_BulletSlope, which looks for a linetarget at a max range of 1024. That's not very far at all.

... What?hjalg wrote:Up.
Re: Maximum range for SetActivatorToTarget?
I figured it was somewhere around that. Thats 1/8th of the maximum range for hitscans. I'll mess around with the source and see what I can find. Thanks.NeuralStunner wrote:Huh. Apparently that function, when used for a player, internally calls P_BulletSlope, which looks for a linetarget at a max range of 1024. That's not very far at all.![]()