Scripts / [SOLVED] hud allways on ?

Author
Message
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 6th May 2020 08:04
How to have ALLWAYS the mouse hud-target visible EVEN without weapons ?

The author of this post has marked a post as an answer.

Go to answer
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 6th May 2020 09:00
I don't think you can, at least not the "real" one, they're tied to the weapons, and you can actually have a different one for each weapon if you set the weapons up. You can however fake it by create a sprite in the dead centre of the screen using a png of a crosshair/target.

I kind of know how to do it, but for me it would be a couple of days messing with scripts and working it out as i only know the basics. If you ask in the scripting section of the forum where these questions belong, you will get a better answer.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 6th May 2020 09:47 Edited at: 6th May 2020 09:47
Do not tell me it's impossible we are in 2020
AND it's IMPOSSIBLE to SHOW the hud without weapons target in this engine..... ?
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 6th May 2020 09:57 Edited at: 6th May 2020 10:05
Quote: "Do not tell me it's impossible we are in 2020"


I didn't say it's impossible, i said you couldn't turn the actual one on or off without a weapon, but you could use an alternative method, which is basically what you would do in EVERY other game engine.

Just because it's 2020 doesn't mean you can do anything you can think up in the way you want it, i want water to cure covid, do not tell me it's IMPOSSIBlE it's 2020!

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th May 2020 10:08
It's Four lines in a script! Hardly rocket science.
Been there, done that, got all the T-Shirts!
PM
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 6th May 2020 10:32
where is that 4 lines script ??
i tried changing hidehuds but nope, nothing !
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 6th May 2020 10:57
Dear AmenMoses thank you for helping,
please may i ask for your help in this matter i have been struggling to accomplish this for a while, i have tried this:

(insert code here you have tried)

but it still eludes me
thank you for any help you maybe able to give

Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-9700K @4.2GHz - 32GB DDR4 RAM - GeForce RTX 2070 SUPER 8GB - 1TB NVe SSD 2TB Hybrid Data Drive
Test PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Laptop - Helios 300 Predator - i7 7700HQ - 32GB - Nvidia GTX1060 6GB - 525GB M2 - 500 SSD - 17.3" IPS LED Panel - Windows 10 Pro x64
Various Tutorials by me
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 6th May 2020 12:44 Edited at: 6th May 2020 12:50
Quote: "i tried changing hidehuds but nope, nothing "


Because the solution has nothing to do with hiding or showing the huds, that's why that doesn't work.

You are looking at it from the wrong directions and making assumptions that are false. The cross hair is not a HUD element, it's not part of the HUD at all, it's a sprite that is added by the weapon, so to have one active on the screen with no weapon you would need to create and display an identical sprite yourself using the sprite commands.

I'm at work at the moment so i can't write a script, but when i get a chance i will at least try to create a script to show you how to place a sprite on screen, so you have an idea of how to do it.

It would need to be able to detect if you have a weapon or not so it can hide itself when the weapon adds its own cross hair, but i have no idea how to do that part, someone else would have to help with that.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 6th May 2020 13:21 Edited at: 6th May 2020 13:23
This post has been marked by the post author as the answer.
a little bit of research (about 30 mins going through forums) and i have put this together.
i am sure you can work out how to use your own image from the script

you are welcome

Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-9700K @4.2GHz - 32GB DDR4 RAM - GeForce RTX 2070 SUPER 8GB - 1TB NVe SSD 2TB Hybrid Data Drive
Test PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Laptop - Helios 300 Predator - i7 7700HQ - 32GB - Nvidia GTX1060 6GB - 525GB M2 - 500 SSD - 17.3" IPS LED Panel - Windows 10 Pro x64
Various Tutorials by me

Attachments

Login to view attachments
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 7th May 2020 19:20
Quote: "It would need to be able to detect if you have a weapon or not so it can hide itself when the weapon adds its own cross hair, but i have no idea how to do that part, someone else would have to help with that."

This LUA command can help.
Quote: "WeaponID = GetPlayerWeaponID ( ) -- Returns the WeaponID the player is currently carrying"
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Nathan38
13
Years of Service
User Offline
Joined: 13th Feb 2011
Location:
Posted: 8th May 2020 00:01
You could do something like

TextCenterOnX( 50, 50, 1, "+" )

Don't know how accurate that would be though
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 8th May 2020 10:20
Basically he is looking for a mouse pointer.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
imothep85
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Belgium
Posted: 10th May 2020 10:03
Thanks a lot solved !

Login to post a reply

Server time is: 2024-12-22 02:47:10
Your offset time is: 2024-12-22 02:47:10