Author |
Message |
Spinal Slouch
Joined: Sun Mar 16, 2014 9:44 pm Posts: 11
|
Is there any way to hide the gun labels in game?
I always find myself shooting all the guns the enemy drops mainly to get the white labels off of the screen. Is there any way to disable these and still be able to pick up the guns?
|
Tue May 05, 2015 1:05 am |
|
|
weegee
DRL Developer
Joined: Thu Jun 11, 2009 2:34 pm Posts: 966 Location: Moscow, Russia
|
Re: Is there any way to hide the gun labels in game?
You can probably write a global script which will set .HUDVisible = false to all items in MovableMan.Items collection. But this way you won't be able to distinguish between actual items, and items which already turned into terrain.
|
Tue May 05, 2015 9:46 am |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: Is there any way to hide the gun labels in game?
weegee wrote: You can probably write a global script which will set .HUDVisible = false to all items in MovableMan.Items collection. But this way you won't be able to distinguish between actual items, and items which already turned into terrain. Would this also remove the HUD from actors? Like the team icon and health? And probably the pie menu too? You know, this kinda sounds interesting for some super hardcore realism mod or w/e, where you can't tell if someone is friend or foe until they shoot back and the only way to know you are dying is if you have bleeding wounds.
|
Tue May 05, 2015 11:32 pm |
|
|
Arcalane
Joined: Sun Jan 28, 2007 10:32 pm Posts: 1609 Location: UK
|
Re: Is there any way to hide the gun labels in game?
Asklar wrote: weegee wrote: You can probably write a global script which will set .HUDVisible = false to all items in MovableMan.Items collection. But this way you won't be able to distinguish between actual items, and items which already turned into terrain. Would this also remove the HUD from actors? Like the team icon and health? And probably the pie menu too? No, because you're only applying it to Items. Asklar wrote: You know, this kinda sounds interesting for some super hardcore realism mod or w/e, where you can't tell if someone is friend or foe until they shoot back and the only way to know you are dying is if you have bleeding wounds. 4zK actually has a script that does this already in his global scripts collection.
|
Wed May 06, 2015 1:48 am |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: Is there any way to hide the gun labels in game?
Haven't visited mod releases in a while, I can't get used to the new forum format lol. But I'll definately give that a go.
|
Wed May 06, 2015 3:03 am |
|
|
Spinal Slouch
Joined: Sun Mar 16, 2014 9:44 pm Posts: 11
|
Re: Is there any way to hide the gun labels in game?
4zK's script pretty much does what I want it to except it gets rid of the cross-hairs for aiming. Is there a way I can modify the script to keep those?
Heres the Script:
function InvisibleHUDScript:StartScript() end
function InvisibleHUDScript:UpdateScript()
for i = 1 , MovableMan:GetMOIDCount() - 1 do local mo = MovableMan:GetMOFromID(i);
if mo and mo.ClassName ~= "MOPixel" and mo.ClassName ~= "MOSParticle" and not ToMOSRotating(mo):NumberValueExists("InvisibleHUDScript") then ToMOSRotating(mo):SetNumberValue("InvisibleHUDScript", 1); mo.HUDVisible = false; end end end
function InvisibleHUDScript:EndScript() end
function InvisibleHUDScript:PauseScript() end
function InvisibleHUDScript:CraftEnteredOrbit() end
|
Wed May 06, 2015 6:42 am |
|
|
Arcalane
Joined: Sun Jan 28, 2007 10:32 pm Posts: 1609 Location: UK
|
Re: Is there any way to hide the gun labels in game?
Well, ~= means "not equal", so it's skipping MOPixel and MOSParticle as-is. I think changing that line to; Code: if mo and mo.ClassName ~= "MOPixel" and mo.ClassName ~= "MOSParticle" and mo.ClassName ~= "Actor" and not ToMOSRotating(mo):NumberValueExists("InvisibleHUDScript") then should fix it? You may also need to add exceptions for AHuman and ACrab if it doesn't automatically pass it down to them (the 'A' stands for 'Actor'). Alternately you might be able to flip it around so it only checks against HeldDevice+HDFirearm+ThrownDevice+TDExplosive but that will probably be a bit more fiddly.
|
Wed May 06, 2015 7:54 am |
|
|
weegee
DRL Developer
Joined: Thu Jun 11, 2009 2:34 pm Posts: 966 Location: Moscow, Russia
|
Re: Is there any way to hide the gun labels in game?
Well aiming dots are actually drawn via DrawHUD function which also looks at DrawHUD property, so you'll probably need to enable HUD's back for held items if you previously disabled it for dropped items.
|
Wed May 06, 2015 8:31 am |
|
|
Spinal Slouch
Joined: Sun Mar 16, 2014 9:44 pm Posts: 11
|
Re: Is there any way to hide the gun labels in game?
Arcalane wrote: Well, ~= means "not equal", so it's skipping MOPixel and MOSParticle as-is. I think changing that line to; Code: if mo and mo.ClassName ~= "MOPixel" and mo.ClassName ~= "MOSParticle" and mo.ClassName ~= "Actor" and not ToMOSRotating(mo):NumberValueExists("InvisibleHUDScript") then Tried the code. No fruit. weegee wrote: Well aiming dots are actually drawn via DrawHUD function which also looks at DrawHUD property, so you'll probably need to enable HUD's back for held items if you previously disabled it for dropped items. How does one re-enable the Cross-hairs/HUD? Maybe even show bullet count would be cool too.
|
Wed May 06, 2015 9:15 am |
|
|
|