Changing crosshair via ACS?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
- Bilbö Bägginson
- Posts: 31
- Joined: Mon Nov 30, 2020 11:11 pm
- Graphics Processor: nVidia with Vulkan support
Changing crosshair via ACS?
Is it possible to set crosshair or change its scale or transparency via ACS?
Last edited by Bilbö Bägginson on Fri Jun 03, 2022 10:06 pm, edited 1 time in total.
- R4L
- Global Moderator
- Posts: 420
- Joined: Fri Mar 03, 2017 9:53 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11 Pro
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: Changing crosshair via ACS
I don't think it's possible in ACS unless you fake it with HUDMessages. Even then, you'd probably be better off using ZScript instead.
- Bilbö Bägginson
- Posts: 31
- Joined: Mon Nov 30, 2020 11:11 pm
- Graphics Processor: nVidia with Vulkan support
Re: Changing crosshair via ACS
[quote="R4L"you'd probably be better off using ZScript instead.[/quote]
Okey, but can I set crosshair outside of weapon states. I dont know zscript at all, sorry if it`s stupid
Okey, but can I set crosshair outside of weapon states. I dont know zscript at all, sorry if it`s stupid
Re: Changing crosshair via ACS
You can provide replacement graphics (basically null textures) for the existing internal engine crosshairs, and then HudMessage your own in onto the middle of the screen.
- Bilbö Bägginson
- Posts: 31
- Joined: Mon Nov 30, 2020 11:11 pm
- Graphics Processor: nVidia with Vulkan support
Re: Changing crosshair via ACS
Yeah, I was thinking about this, but then useless crosshair-settings will still be in options menu. It is not quiet good-looking for standalone project I make. But If there is no other way to hide crosshair, I`ll do so.Rachael wrote:You can provide replacement graphics (basically null textures) for the existing internal engine crosshairs, and then HudMessage your own in onto the middle of the screen.
Thanks
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49225
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Changing crosshair via ACS
That'd be considered very rude, though. The only 'legal' way to override the crosshair is to attach one to your weapons. But the advice still stands to only do this when the weapon demands it, e.g. a sniper rifle.
- Bilbö Bägginson
- Posts: 31
- Joined: Mon Nov 30, 2020 11:11 pm
- Graphics Processor: nVidia with Vulkan support
Re: Changing crosshair via ACS
ok, have Handled it setting a crosshair to the one I made with void sprite.
Code: Select all
NOHUD:
TNT1 A 0 A_SetCrosshair(14)
NOHUD1:
TNT1 A 1
TNT1 A 0 A_JumpIfInventory("NOHUD", 1, "NOHUD1")
Ready:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("NOHUD", 1, "NOHUD")