SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-08-10, 11:45 AM   #4
Heretic
Commodore
 
Join Date: Mar 2005
Location: Nebraska
Posts: 617
Downloads: 240
Uploads: 2


Default

Here's some simple examples using the function Wp:SetBodyPartVisibility().
syntax is Wp:SetBodyPartVisibility("object", 1 or 0); 1 for on, 0 for off. Objects are defined in the body parts file in Characters folder.

Crewmen are made up of Head, Left Eye, Right Eye, Torso, and Pants. Optionally they can have a Hat and an Object. They start out as defined in the CHR files, be can all be changed with this function.


Add binoculars to a crewman.
Quote:
Wp:SetBodyPartVisibility("object1_Binocular", 1);
Adding a hat. Not all hats work on all heads. Some of the larger heads will show through the hat.
Quote:
Wp:SetBodyPartVisibility("A_Hat01", 1);
Changing a uniform. Important to remove the old one or both will be displayed.
Quote:
Wp:SetBodyPartVisibility("D_Torso05", 1); <-- adds Torso05
Wp:SetBodyPartVisibility("D_Torso01", 0); <-- Removes Torso01
Adding a beard.
Quote:
Wp:SetBodyPartVisibility("object1_Barba_CAP13", 1);
Changing a head. It's best to also use the proper eyes. It's not required, but they might not line up right otherwise.
Quote:
Wp:SetBodyPartVisibility("B_Head03", 0);
Wp:SetBodyPartVisibility("B_EyeL03", 0);
Wp:SetBodyPartVisibility("B_EyeR03", 0);
Wp:SetBodyPartVisibility("D_Head10", 1);
Wp:SetBodyPartVisibility("D_EyeL10", 1);
Wp:SetBodyPartVisibility("D_EyeR10", 1);
The stock scripts use this function to convert the XO into the Captain for the tutorial. Whenever you see someone with something in their hand, a book, knife, screwdriver, whatever, it's done with this function.

Last edited by Heretic; 03-08-10 at 12:02 PM.
Heretic is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.