Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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!)
Hello. I was wondering if it would be possible to make a hitscan weapon have a laser dot similar to the photos below. It would use a small sprite that is separate from the weapon sprite itself.
In this mod, there is a user CVar named m8f_wm_ShowLaserSight. Set it to 1 whenever you want the Laser Sight to be shown, and to 0 when you want the Laser Sight to be hidden.
m8f wrote:In this mod, there is a user CVar named m8f_wm_ShowLaserSight. Set it to 1 whenever you want the Laser Sight to be shown, and to 0 when you want the Laser Sight to be hidden.
Would you know how I would only apply it to one weapon?
If you have to use Decorate, you have to create simple ACS script like here, using SetUserCVar instead of GetCVar(), and call this ACS script from weapon's Select state if you want to enable Laser Sight, and in Deselect state to disable it.
If you can use ZScript, you can set CVars directly. See here.