Log in

View Full Version : [TEC]set_depth command...


Rubini
03-01-12, 08:20 PM
I need a litle hand here.
(This one is good for TDW or for script experts...)

The set_depth command donīt have any script crew action on it because we canīt know if the player want to go up or down...ok!

The issue:
But as it is now, if you click on the detph meter dial, letīs say 20m, the boat start a dive but the crew only will go down after more or less 10m, staying some time looking their bino totally under water.

A possible workaround:
What needs to be done (and isnīt difficult) is to just script something like that on set_depth.aix:

strategy setd_CHIEF(wp)
{
action
{
if Wp:IsSurfaced() and set_depth value>=9 then # (<== i donīt know how to get this value and also how is the correct syntax, its just an example)
{

Wp:SetGlobalVariable(VAR_DIVE_ORDER, 1); # this will trigger normal go below deck for crew

}

Wp:ExecuteCommand( "Set_depth" );
Wp:ScriptCompleted();
}
}

The problem:
I donīt know how to get the info from the depth meter dial. I mean, i donīt know how to get the value that the player clicked on the dial. If this one can be know, so problem solve!

Thanks by any advice.:up:

TheDarkWraith
03-01-12, 09:13 PM
Unfortunately .py files and .aix files are two completely different animals. The .aix files are very limited in what data you can get from the game (hardly anything). With .py files I can get the value of any dial used in the game whenever I want. I don't recall seeing anything in the .aix files that would allow you to get dial values from the game...I'll have to look into this further.
There are different 'flavors' of .aix files also which complicates things (depending on which folder they are located in) :hmmm:

Rubini
03-01-12, 09:31 PM
Unfortunately .py files and .aix files are two completely different animals. The .aix files are very limited in what data you can get from the game (hardly anything). With .py files I can get the value of any dial used in the game whenever I want. I don't recall seeing anything in the .aix files that would allow you to get dial values from the game...I'll have to look into this further.
There are different 'flavors' of .aix files also which complicates things (depending on which folder they are located in) :hmmm:
Thanks TDW to look at the issue. The file in question is located at scripi\ai\crew. I should like to try with the .py routine that can read the setted depth (by click on dial). At least is a first try. Can you show me something on the matter?

Thanks again by any advice!