Data Realms Fan Forums
http://45.55.195.193/

Is there any way to hide the gun labels in game?
http://45.55.195.193/viewtopic.php?f=4&t=45944
Page 1 of 1

Author:  Spinal Slouch [ Tue May 05, 2015 1:05 am ]
Post subject:  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?

Author:  weegee [ Tue May 05, 2015 9:46 am ]
Post subject:  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.

Author:  Asklar [ Tue May 05, 2015 11:32 pm ]
Post subject:  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.

Author:  Arcalane [ Wed May 06, 2015 1:48 am ]
Post subject:  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.

Author:  Asklar [ Wed May 06, 2015 3:03 am ]
Post subject:  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.

Author:  Spinal Slouch [ Wed May 06, 2015 6:42 am ]
Post subject:  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

Author:  Arcalane [ Wed May 06, 2015 7:54 am ]
Post subject:  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.

Author:  weegee [ Wed May 06, 2015 8:31 am ]
Post subject:  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.

Author:  Spinal Slouch [ Wed May 06, 2015 9:15 am ]
Post subject:  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.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/