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 12-01-10, 12:03 PM   #11
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,448
Downloads: 166
Uploads: 28


Default

Quote:
Originally Posted by TheDarkWraith View Post
these two commands:

Operation|mov|<<range_min>>|600.0f|0|0|0
Operation|mov|<<range_max>>|2600.0f|0|0|0

create two global variables named range_min and range_max. The << >> mean to use the variable name itself and not to dereference it (get it's value) - required for mov operations. range_min has the value 600.0 (f meaning a float value) stored (mov) into it. range_max has the value 2600.0 (f meaning a float value) stored (mov) into it. The next command:

CheckGUIDialValueInRange|SOL_RANGE|<range_min>|<ra nge_max>|None|0|0

the < > mean dereference (or get the variable's/pointer's vaue). So what the command is doing is getting the value of range_min and range_max and passing them to the CheckGUIDialValueInRange. That command is going to look up the SOL_RANGE dial's value and ensure it's within value of range_min and value of range_max. The None means I want the result of that range check stored in g_TR1 (it will store True or False in it). The None could be a variable name if you want to store the result in one of your variables/pointers.

So to do what you're wanting would be:

Operation|mov|<<heading_min>>|some_valuef|0|0|0
Operation|mov|<<heading_max>>|some_valuef|0|0|0

I just noticed that you cannot get heading from the GUI dials. I'll have to include that. I'll code it in and send you revised files But after I code it this is how you'll be able to check heading in range:

CheckGUIDialValueInRange|Current_Heading|<heading_ min>|<heading_max>|None or your variable|0|0

I'll send you the single mission for the speed finder tutorial also.
Thanks TDW

Could I trouble you with one more, "gyroangle". This one should be in the GUI dials.

Would this work if I wanted someone to have "zero" gyroangle:-

Operation|mov|<<gyroangle_min>>|-350|0|0|0 (not sure if i need the "-")
Operation|mov|<<gyroangle_max>>|10|0|0|0

CheckGUIDialValueInRange|GyroAngle|<gyroangle_min> |<gyroangle_max>|None|0|0
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
 

Tags
dbrn, favorite, new ui


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:47 AM.


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