View unanswered posts | View active topics It is currently Thu Mar 28, 2024 10:28 pm



Reply to topic  [ 9 posts ] 
 Is there any way to hide the gun labels in game? 
Author Message
User avatar

Joined: Sun Mar 16, 2014 9:44 pm
Posts: 11
Reply with quote
Post 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
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post 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
Profile YIM
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Mar 16, 2014 9:44 pm
Posts: 11
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post 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
Profile YIM
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Mar 16, 2014 9:44 pm
Posts: 11
Reply with quote
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.063s | 16 Queries | GZIP : Off ]