![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
12-01-10, 10:54 AM
|
#1 | ||
|
Navy Seal
![]() |
Quote:
Between reading the "tutorial notes" and your "how_to_use_speed_finder" I am getting most of it. Wiki is helping too ![]() What I cant find is this:- Operation|mov|<<range_min>>|600.0f|0|0|0 Operation|mov|<<range_max>>|2600.0f|0|0|0 CheckGUIDialValueInRange|SOL_RANGE|<range_min>|<ra nge_max>|None|0|0 I want to use <<heading_min>> and <<heading_max>> but not sure how to do it. Im guessing it needs to be in "GUIDialValue" and im not sure if it is. Quote:
|
||
|
|
12-01-10, 11:15 AM
|
#2 | |
|
Black Magic
![]() |
Quote:
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 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. |
|
|
|
12-01-10, 11:32 AM
|
#3 |
|
Black Magic
![]() |
in v5.3.0 if you select a tutorial from the list of available tutorials in the main menu page and the historic mission required for that tutorial isn't 'Any' then when you click on Historic Missions from the main menu page the historic mission needed for the tutorial will be highlighted and brought into view. This makes selecting the correct historic mission for the tutorial much easier to find. You still have to click on the historic mission highlighted to activate it as I cannot do this in code. If the required historic mission is 'Any' then no historic mission will be highlighted (as any of them can be used):
|
|
|
12-01-10, 12:03 PM
|
#4 | |
|
Navy Seal
![]() |
Quote:
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 |
|
|
|
12-01-10, 12:13 PM
|
#5 | |
|
Black Magic
![]() |
Quote:
Operation|mov|<<gyroangle_min>>|358.0f|0|0|0 Operation|mov|<<gyroangle_max>>|2.0f|0|0|0 this will look for a 0 gyro angle with +- 2 degrees spread. If you want to tighten the spread use 359.0f and 1.0f for a +- 1 degree spread or to go even tighter use 359.5f and 0.5f for a +- 0.5 degree spread. the f is required on the end of the numbers to signify they are a float value (a value with a decimal part) CheckGUIDialValueInRange|SOL_GYROANGLE|<gyroangle_ min>|<gyroangle_max>|None|0|0 The result of this check will be stored in g_TR1 since you have None as the 4th parameter.
|
|
|
|
12-01-10, 12:28 PM
|
#6 |
|
Navy Seal
![]() |
Nice one. Thanks
|
|
|
12-01-10, 12:44 PM
|
#7 |
|
Grey Wolf
![]() Join Date: Feb 2009
Posts: 995
Downloads: 91
Uploads: 0
|
__________________
![]() |
|
|
12-01-10, 05:22 PM
|
#8 | |
|
XO
![]() Join Date: Mar 2008
Posts: 424
Downloads: 341
Uploads: 0
|
Quote:
|
|
|
|
12-01-10, 08:03 PM
|
#9 |
|
Black Magic
![]() |
added a new feature to v5.3.0. This feature will set the TC level to a pre-determined level when the current TC level is greater than or equal to a pre-determined TC level AND a contact is within a pre-determined radius of the sub. This should prevent those surprise you're dead at high TC levels because your crew failed to spot a highly visible contact. The three new user options and their default values are:
# the TC level at which the TCx on contact distance is enabled (this will change the TC level to a pre-determined level when a contact gets inside a specified radius around the sub if the current TC level is greater than or equal to this value) # below in powers of 2 only! TCxOnContactDistanceEnabledTCLevel = 1024 # when at TC > 1 and TCxOnContactDistanceEnabled is enabled (True) then this is the radius around your sub to determine when to set TC level to TCxOnContactDistanceTCLevel # below in meters TCxOnContactDistanceRadius = 8000.0 # the TC level to set when TCxOnContactDistanceEnabled is enabled (True) and contact is inside the TCxOnContactDistanceRadius # below in powers of 2 only! TCxOnContactDistanceTCLevel = 1 this is checked every 0.25 seconds of regular time (not game time!) |
|
|
12-01-10, 09:20 PM
|
#10 | |
|
Seasoned Skipper
![]() Join Date: Aug 2010
Location: 49°44´N 129°40´E
Posts: 665
Downloads: 124
Uploads: 7
|
Quote:
__________________
Speed squadron is the speed of the slowest ship ... but only so long as on the trail of the squadron did not sit submarines ...
|
|
|
|
12-01-10, 09:54 PM
|
#11 |
|
Black Magic
![]() |
v5.3.0 released. See post #1 for details
![]() @ sober - still trying to figure out how to implement your idea correctly
|
|
|
![]() |
| Tags |
| dbrn, favorite, new ui |
| Thread Tools | |
| Display Modes | |
|
|
