編集時Ver2.4.4.11
FromTheDepthsのLua_Helpドキュメントをまとめたもの
The Basics
LuaBoxを設置しQキーを押すとLuaEditor画面が開きます
初期の状態では下記の状態になっていて,基本的には-- put your code hereのところにコードを書いていくことになります。
function Update(I)
-- put your code here
end
ココで簡単にプログラムの処理の順番について説明すると,プログラムはコードを上から順番に処理し,(自身で定義した関数は飛ぶ)一番下までいった後function Update(I)の中を繰り返し上から処理していきます。
その処理速度はゲーム内時間で1秒間に40回,つまり1ループを約25msで処理することになります。
function Update(I)についている"I"はFTDとLuaがデータをやり取りするのに必要な引数なので自身で関数を定義する場合には必ず入れることをオススメします。(一応,FTDとデータのやり取りが無い場合は省略しても問題ない)
関数とは何ぞや,って人は後述するのでちょっと待ってて
LUA Syntax
Libraries
FTDのLuaは下記のリンクにある基本的な数学関数などの一部の標準ライブラリとUnityのMathf,Vector3,Quaternionのスクリプトリファレンスを使用する事ができます。
Lua5.2 リファレンスマニュアル http://milkpot.sakura.ne.jp/lua/lua52_manual_ja.html
Unity_Mathf https://docs.unity3d.com/ja/540/ScriptReference/Mathf.html
Unity_Vector3 https://docs.unity3d.com/jp/540/ScriptReference/Vector3.html
Unity_Quaternion https://docs.unity3d.com/ja/540/ScriptReference/Quaternion.html
Logging/Debugging
関数 | in/outデータ型 or 参照 | 説明 |
I:Log(message) | string' .. Int .. float / string | 「' '」or「" "」の中に文字を入れるとログに表示される。変数や関数はそのまま入れるとその結果が表示される。連結は「..」で行う |
I:ClearLogs() | ログをクリアする。これが無いとI:Log()の中身が永遠と流れる | |
I:LogToHud(message) | string' .. Int .. float / string | 「' '」or「" "」の中に文字を入れるとFTD上に表示される。変数や関数はそのまま入れるとその結果が表示される。最大表示は6つまで。LuaEditorを開いていると重くなっていくので注意 |
Fleet Awareness
関数 | in/outデータ型 or 参照 | 説明 |
I.FleetIndex | / int | Fleet内の自身のIndexが返ってくる?初期は0 |
I.Fleet | . FleetInfo | FleetInfoで指定した値が返ってくる。指定するときは「.」を間に挟む (例)I.Fleet.ID |
I.IsFlagship | / bool | 自身が旗艦の場合Trueが返ってくる |
I.Waypoint | / Vector3 | 自身が旗艦のとき非実体化時の座標.それ以外では旗艦の位置で非実体化した時の自身の座標位置…?艦隊を組むのに使えるかも…?waypointの次の座標が示される? |
I.IdealFleetPosition | / Vector3 | 非実体化時の旗艦から見た座標.ローカル座標系. |
I.IdealFleetRotation | / Quarternion | 非実体化時の旗艦からみた姿勢?ローカル座標系? |
FleetInfo
クラス | in/outデータ型 or 参照 | 説明 |
ID | / int | FleetのIDが返ってくる |
Name | / string | Fleetの名前が返ってくる |
Flagship | . FriendlyInfo | Fleet内の旗艦のFriendlyInfoで指定した値が返ってくる |
Members | . FriendlyInfo | Fleet内の旗艦以外のメンバーのFriendlyInfoで指定した値が返ってくる。メンバーは配列([ ])で指定する。(例) I.Fleet.Members[1].Position |
Resources
関数 | in/outデータ型 or 参照 | 説明 |
I.ResourceZones | . ResourceZoneInfo | フィールドにあるリソースゾーンの中から配列で指定したリソースゾーンのResourceZoneInfoで指定した値が返ってくる。(例)I.ResourceZones[1].Name |
I.Resources | . ResourceInfo | その機体のResourceInfoで指定した値が返ってくる |
ResourceZoneInfo
クラス | in/outデータ型 or 参照 | 説明 |
Id | / int | リソースゾーンのID |
Name | / string | リソースゾーンの名前 |
Position | / Vector3 | ワールド座標でのリソースゾーンの位置 |
Radius | / float | リソースゾーンの半径 |
Resources | . ResourceInfo | リソースゾーン内のResourceInfoで指定した値が返ってくる |
ResourceInfo
クラス | in/outデータ型 or 参照 | 説明 |
CrystalTotal | / float | クリスタルの現在の保有量だったもの |
CrystalMax | / float | クリスタルの最大の保有量だったもの |
MetalTotal | / float | メタルの現在の保有量だったもの |
MetalMax | / float | メタルの最大の保有量だったもの |
NaturalTotal | / float | ナチュラルの現在の保有量だったもの。現在ではこれがマテリアルに相当する |
NaturalMax | / float | ナチュラルの最大の保有量だったもの。現在ではこれがマテリアルに相当する |
OilTotal | / float | オイルの現在の保有量だったもの |
OilMax | / float | オイルの最大の保有量だったもの |
ScrapTotal | / float | スクラップの現在の保有量だったもの |
ScrapMax | / float | スクラップの最大の保有量だったもの |
AI
関数 | in/outデータ型 or 参照 | 説明 |
I.AIMode | / string | 現在のAIの状態が返ってくる。 |
I:GetAIMovementMode(mainframeIndex) | / string | 現在の移動モードを返す。 Off/Manual/Fleet/Automatic v2.4.3.5にて追加 |
I:GetAIFiringMode(mainframeIndex) | / string | 現在の射撃モードを返す。 On/Off v2.4.3.5にて追加 |
I.ConstructType | / string | AIのタイプが返ってくる。Naval/aerial/fortressなど。v2.4以降ではnoneが返る |
I.BlueprintSpawners | . BlueprintSpawnerInfo | VehicleBlueprintSpawnerのBlueprintSpawnerInfoで指定した値を返す。(例)I.BlueprintSpawners[1].IsSpawning |
BlueprintSpawnerInfo
クラス | in/outデータ型 or 参照 | 説明 |
IsSpawning | / bool | VehicleBlueprintSpawnerが作動中にtrueを返す |
SpawnName | / string | DefaultBlueprintNameに書かれている値が返ってくる |
HoldTime | / float | Hold for this timeの値が返ってくる.NO limitは1 |
MaxAllowedActive | / int | Spawns to preserveの値が返ってくる |
MaxAllowedLifetime | / int | Max lifetimes spawnsの値が返ってくる |
Spawn() | 実行するとVehicleBlueprintSpawnerが起動する.(例)I.BlueprintSpawners[1]:Spawn() |
Propulsion
関数 | in/outデータ型 or 参照 | 説明 |
I:TellAiThatWeAreTakingControl() | AIによる制御が無効化される。これがない場合AIが指定した値とLua内で指定した全ての値の合計値になる | |
I:RequestControl(mode,type,drive) | int , int , float / | 指定した各AIモードによる一般的な機動を行う。出力は-1~1の間で調整する mode : Water=0, Land=1, Air=2. type : YawLeft=0, YawRight=1, RollLeft=2, RollRight=3, NoseUp=4, NoseDown=5, Increase=6, Decrease=7, MainPropulsion=8 |
I:RequestThrustControl(type) | int / | xyz軸方向と回転方向の動きを行う type : forwards=0, backwards=1, right=2, left=3, up=4, down=5, rollright=6, rollleft=7, yawright=8, yawleft=9, noseup=10, nosedown=11 |
I:RequestThrustControl(type, scale) | int , float / | xyz軸方向と回転方向の動きを行う。Sacaleで出力を0~1の間で調整できる type : forwards=0, backwards=1, right=2, left=3, up=4, down=5, rollright=6, rollleft=7, yawright=8, yawleft=9, noseup=10, nosedown=11 |
I:RequestWaterForwards(drive) | float / | プロペラの全後進の出力を-5~5の間で調整できる |
I:RequestComplexControllerStimulus(stim) | int / | 指定した値のcomplex controlerを実行する。ACBとの連携などに使える stim: none=0, T=1, G=2, Y=3, H=4, U=5, J=6, I=7, K=8, O=9, L=10, up=11, down=12, left=13, right=14 |
I:GetDrive(mode) | int / float | Water DriveやAir Driveなどの値を返す mode : Water=0, Air=1, Primary=2, Secondary=3, Tertiary=4 |
I:GetInput(mode, type) | int , int / float | 指定したDrive fractionの値を返す mode : Water=0, Land=1, Air=2 type : YawLeft=0, YawRight=1, RollLeft=2, RollRight=3, NoseUp=4, NoseDown=5, Increase=6, Decrease=7, MainPropulsion=8 |
I:MoveFortress(Vector3) | Vector3 / | 指定したベクトル方向にフォートレスを動かす |
TargetInfo
関数 | in/outデータ型 or 参照 | 説明 |
I:GetNumberOfMainframes() | / int | mainframeの個数を表示 |
I:GetNumberOfTargets(mainframeIndex) | int / int | 指定したmainframeが認識しているターゲットの数 |
I:GetTargetInfo(mainframeIndex, targetIndex) | int , int /. TargetInfo | mainframeが認識している指定したターゲットのTargetInfoで指定した値が返ってくる。 TargetPrioritisationCardがある場合は最も優先度が高いターゲットのIndexは0となる |
I:GetTargetPositionInfo(mainframeIndex, targetIndex) | int , int /. TargetPositionInfo | mainframeが認識している指定したターゲットのTargetPositionInfoで指定した値が返ってくる。 TargetPrioritisationCardがある場合は最も優先度が高いターゲットのIndexは0となる |
I:GetTargetPositionInfoForPosition(mainframeIndex, x,y,z) | int , float*3 /. TargetPositionInfo | 自身と指定した座標のTargetPositionInfoで指定した値が返ってくる |
TargetInfo
クラス | in/outデータ型 or 参照 | 説明 |
Valid | / bool | ターゲットが存在していればTrueが返ってくる |
Priority | / int | 0が一番優先度が高い? |
Score | / float | ターゲットのTargetPrioritisationCardのスコアが返ってくる |
AimPointPosition | / Vector3 | AIが狙いをつけている座標(索敵依存) |
Team | / int | 敵の所属している勢力のID |
Protected | / bool | 敵のmainframeが存在している場合はTrue? |
Position | / Vector3 | 敵のワールド座標での位置 |
Velocity | / Vector3 | 敵の速度(索敵依存) |
PlayerTargetChoice | / bool | マップ上でプレイヤーが攻撃するターゲットを選択するとTrueが返ってくる |
Id | / int | 敵のID |
TargetPositionInfo
クラス | in/outデータ型 or 参照 | 説明 |
Valid | / bool | ターゲットが存在していればTrueが返ってくる |
Azimuth | / float | 自分の正面から見たターゲットの水平方向の角度。機体を上から見て反時計回りが正。180~0~-180で示す |
Elevation | / float | 自分の正面から見たターゲットの垂直方向の角度。(ローカル座標のx軸周りでしか見ていないので注意)上向きが正。-180~0~180で示す |
ElevationForAltitudeComponentOnly | / float | おそらく2倍すれば自分から見たターゲットの垂直方向の角度を表す関数。上向きが正。-45~0~45で示す |
Range | / float | 自分とターゲットの距離 |
Direction | / Vector3 | 自分とターゲットの距離。自身の重心から相手のローカル座標の原点までの距離。ワールド座標系 |
GroundDistance | / float | 自分とターゲットの距離(高さを考慮しない) |
AltitudeAboveSeaLevel | / float | ターゲットの海面からの高さ |
Position | / Vector3 | 敵のワールド座標での位置 |
Velocity | / Vector3 | 敵の速度(索敵依存) |
Misc
関数 | in/outデータ型 or 参照 | 説明 |
I:GetTerrainAltitudeForPosition(x,y,z) I:GetTerrainAltitudeForPosition(Vector3) | float*3 or Vector3 / float | 指定したワールド座標の地表の高さを示す。海面が0 |
I:GetTerrainAltitudeForLocalPosition(x,y,z) I:GetTerrainAltitudeForLocalPosition(Vector3) | float*3 or Vector3 / float | 自身の座標の地表の高さを示す。x,y,zでオフセット値を指定できる。ローカル座標系 |
I:GetGravityForAltitude(alt) | float / Vector3 | 指定した高度の重力 |
I:GetTime() | / float | ゲームを起動してからの時間。時間の進みは微妙にI:GetGameTime()と異なる。どちらの時間が正確かは不明 |
I:GetTimeSinceSpawn() | / float | 機体がスポーンしてからの時間。時間の進みはI:GetTime()と一緒 |
I:GetGameTime() | / float | ゲームを起動してからの時間。メニュー画面を開いた状態でマウスを右画面端に持っていくと出てくるバーに書いてあるGameTimeと同じ |
I:GetWindDirectionAndMagnitude() | / Vector3 | 風向きと風速を返す |
Self awareness
関数 | in/outデータ型 or 参照 | 説明 |
I:GetConstructPosition() | / Vector3 | 自分自身のワールド座標。ここで言う座標はブロックを最初に置いた地点を示す。つまりcキーを押したときに出る視点から機体までの距離が0mになるところを示している。ローカル座標の原点 |
I:GetConstructForwardVector() | / Vector3 | 自身の前方向の成分を長さ1のベクトルで得る。つまり自分の正面がどっち向いてるかを示せる。X:東 Y:真上 Z:北 |
I:GetConstructRightVector() | / Vector3 | 自身の右方向の成分を長さ1のベクトルで得る |
I:GetConstructUpVector() | / Vector3 | 自身の上方向の成分を長さ1のベクトルで得る |
I:GetConstructMaxDimensions() | / Vector3 | ローカル座標上の原点からの自身の正方向の長さ |
I:GetConstructMinDimensions() | / Vector3 | ローカル座標上の原点からの自身の負方向の長さ |
I:GetConstructRoll() | / float | 自身のロール角を示す。反時計回り。0~360で示す |
I:GetConstructPitch() | / float | 自身のピッチ角を示す。下回り。0~360で示す。 |
I:GetConstructYaw() | / float | 自身のヨー角を示す。機体を上から見て時計回り。0~360で示す |
I:GetConstructCenterOfMass() | / Vector3 | 自身の重心位置をワールド座標で示す |
I:GetAiPosition(mainframeIndex) | / Vector3 | 指定したmainframeの位置をワールド座標で示す |
I:GetVelocityMagnitude() | / float | 自身の速度 |
I:GetForwardsVelocityMagnitude() | / float | 自身の正面方向の速度 |
I:GetVelocityVector() | / Vector3 | 自身の速度をベクトル成分で表したもの |
I:GetVelocityVectorNormalized() | / Vector3 | 自身の速度を正規化された成分で表したもの |
I:GetAngularVelocity() | / Vector3 | 自身のワールド座標上での角速度が分かる。X:東西軸回り Y:上下方軸回り Z:北南軸回り 軸の正の方向から負の方向を見て時計回りが正 |
I:GetLocalAngularVelocity() | / Vector3 | 自身のローカル座標上での角速度が分かる。X:pitch下が正 Y:yaw機体上方から見て時計が正 Z:roll反時計が正 |
I:GetAmmoFraction() | / float | 弾薬の残量を示す。範囲は1~0 |
I:GetFuelFraction() | / float | 燃料の残量を示す。範囲は1~0 |
I:GetSparesFraction() | / float | スペアの残量を示す。今はもう使えない。範囲は1~0 |
I:GetEnergyFraction() | / float | バッテリーの残量を示す。範囲は1~0 |
I:GetPowerFraction() | / float | 出力の残量を示す。範囲は1~0 |
I:GetElectricPowerFraction() | / float | 電気エンジンの出力の残量を示す。範囲は1~0 |
I:GetHealthFraction() | / float | 自身の残り体力を示す。範囲は1~0 |
I:IsDocked() | / bool | ドッキングしている場合Trueを返す |
I:GetHealthFractionDifference(time) | / float | 指定した時間内に体力がどれほど変化したかを示す。ただ動きが怪しい |
I:GetBlueprintName() | / string | ブループリントの名前を返す |
I:GetUniqueId() | / int | ユニークIDを返す |
Components
関数 | in/outデータ型 or 参照 | 説明 |
I:Component_GetCount(type) | int / int | 指定したパーツがいくつあるか |
I:Component_GetLocalPosition(type,index) | int , int / Vector3 | 指定したパーツのローカル座標 |
I:Component_GetBlockInfo(type,index) | int , int /. BlockInfo | 指定したパーツのBlockInfoの値が返ってくる |
I:Component_GetBoolLogic(type,index) | int , int / bool | 指定したパーツのboolの値(true/false)が返ってくる |
I:Component_GetBoolLogic_1(type, blockIndex, propertyIndex) | int , int , int / bool | 指定したパーツ、属性のboolの値(true/false)が返ってくる |
I:Component_SetBoolLogic(type,index,bool) | int , int , bool / | 指定したパーツにtrue/falseの指示を与える |
I:Component_SetBoolLogic_1(type, blockIndex, propertyIndex1, bool1) | int , int , int , bool / | 指定したパーツ、属性にtrue/falseの指示を与える |
I:Component_SetBoolLogic_2(type, blockIndex, propertyIndex1, bool1, propertyIndex2, bool2) | int , int , int , bool , int , bool / | 指定したパーツ、属性にtrue/falseの指示を与える。二つの属性を同時に設定できる |
I:Component_SetBoolLogic_3(type, blockIndex, propertyIndex1, bool1, propertyIndex2, bool2, propertyIndex3, bool3) | int , int , int , bool , int , bool , int , bool / | 指定したパーツ、属性にtrue/falseの指示を与える。三つの属性を同時に設定できる |
I:Component_GetFloatLogic(type,index) | int , int / float | 指定したパーツのfloatの値が返ってくる |
I:Component_GetFloatLogic_1(type, blockIndex, propertyIndex) | int , int , int / float | 指定したパーツ、属性のfloatの値が返ってくる |
I:Component_SetFloatLogic(type,index,float) | int , int , float / | 指定したパーツにfloatの値を指定する |
I:Component_SetFloatLogic_1(type, blockIndex, propertyIndex1, float1) | int , int , int , float / | 指定したパーツ、属性にfloatの値を指定する |
I:Component_SetFloatLogic_2(type, blockIndex, propertyIndex1, float1, propertyIndex2, float2) | int , int , int , float , int , float / | 指定したパーツ、属性にfloatの値を指定する。二つの属性を同時に設定できる |
I:Component_SetFloatLogic_3(type, blockIndex, propertyIndex1, float1, propertyIndex2, float2, propertyIndex3, float3) | int , int , int , float , int , float , int , float / | 指定したパーツ、属性にfloatの値を指定する。三つの属性を同時に設定できる |
I:Component_GetIntLogic(type,index) | int , int / int | 指定したパーツのintの値が返ってくる |
I:Component_GetIntLogic_1(type, blockIndex, propertyIndex) | int , int , int / int | 指定したパーツ、属性のintの値が返ってくる |
I:Component_SetIntLogic(type,index,integer) | int , int , int / | 指定したパーツにintの値を指定する |
I:Component_SetIntLogic_1(type, blockIndex, propertyIndex1, int1) | int , int , int , int / | 指定したパーツ、属性にintの値を指定する |
I:Component_SetIntLogic_2(type, blockIndex, propertyIndex1, int1, propertyIndex2, int2) | int , int , int , int , int , int / | 指定したパーツ、属性にintの値を指定する。二つの属性を同時に設定できる |
I:Component_SetIntLogic_3(type, blockIndex, propertyIndex1, int1, propertyIndex2, int2, propertyIndex3, int3) | int , int , int , int , int , int , int , int / | 指定したパーツ、属性にintの値を指定する。三つの属性を同時に設定できる |
I:Component_SetBoolLogicAll(type, bool) | int , bool / | 指定した種類のパーツ全てにtrue/falseを指定する |
I:Component_SetBoolLogicAll_1(type, propertyIndex1, bool1) | int , int , bool / | 指定した種類のパーツ、属性全てにtrue/falseを指定する |
I:Component_SetBoolLogicAll_2(type, propertyIndex1, bool1, propertyIndex2, bool2) | int , int , bool , int , bool / | 指定した種類のパーツ、属性全てにtrue/falseを指定する。二つの属性を同時に設定できる |
I:Component_SetBoolLogicAll_3(type, propertyIndex1, bool1, propertyIndex2, bool2, propertyIndex3, bool3) | int , int , bool , int , bool , int , bool / | 指定した種類のパーツ、属性全てにtrue/falseを指定する。三つの属性を同時に設定できる |
I:Component_SetFloatLogicAll(type, float) | int , float / | 指定した種類のパーツ全てにfloatの値を指定する |
I:Component_SetFloatLogicAll_1(type, propertyIndex1, float1) | int , int , float / | 指定した種類のパーツ、属性全てにfloatの値を指定する |
I:Component_SetFloatLogicAll_2(type, propertyIndex1, float1, propertyIndex2, float2) | int , int , float , int , float / | 指定した種類のパーツ、属性全てにfloatの値を指定する。二つの属性を同時に設定できる |
I:Component_SetFloatLogicAll_3(type, propertyIndex1, float1, propertyIndex2, float2, propertyIndex3, float3) | int , int , float , int , float , int , float / | 指定した種類のパーツ、属性全てにfloatの値を指定する。三つの属性を同時に設定できる |
I:Component_SetIntLogicAll(type, int) | int , int / | 指定した種類のパーツ全てにintの値を指定する |
I:Component_SetIntLogicAll_1(type, propertyIndex1, int1) | int , int , int / | 指定した種類のパーツ、属性全てにintの値を指定する |
I:Component_SetIntLogicAll_2(type, propertyIndex1, int1, propertyIndex2, int2) | int , int , int , int , int / | 指定した種類のパーツ、属性全てにintの値を指定する。二つの属性を同時に設定できる |
I:Component_SetIntLogicAll_3(type, propertyIndex1, int1, propertyIndex2, int2, propertyIndex3, int3) | int , int , int , int , int , int , int / | 指定した種類のパーツ、属性全てにintの値を指定する。三つの属性を同時に設定できる |
I:SetHologramProjectorURL(index, url) | int , string / | 指定したプロジェクターのURLを設定する |
I:SetPosterHolderURL(index, url) | int , string / | 指定したポスターホルダーのURLを設定する |
I:DeployAllBalloons() | 全てのバルーン展開 | |
I:SeverAllBalloons() | 全てのバルーンを開放 |
components type and their logic
タイプ | データ型 属性番号 | get/set | 説明 |
0:balloon deployer | bool 0 | get | バルーンが展開されているかどうか |
set | trueでバルーンの展開、falseで切り離し | ||
1:drive maintainer | int 0 | get/set | drive maintainerのチャンネル 0 = Primary, 1=Secondary, 2=Tertiary |
float 0 | get/set | 出力の調整ができる。範囲は-1~1。drive maintainerブロックが必要 | |
2:air pump | bool 0 | get | 浮力が0ならばfalse、0より大きければtrueを返す |
set | falseで浮力を0に、trueで浮力を1に設定する | ||
float 0 | get/set | 浮力の調整を0~1の範囲で行える | |
float 1 | get | 浸水の度合いを返す。範囲は0~1 | |
3:resource gatherer (現:material gatherer) | bool 0 | get/set | trueでon/falseでoff |
4:oil drill | bool 0 | get/set | trueでon/falseでoff |
5:ammo processor | bool 0 | get/set | trueでon/falseでoff |
6:oil refinery | bool 0 | get/set | trueでon/falseでoff |
float 0 | get | 危険ガスの度合いを返す。範囲は0~100 | |
float 1 | get | 精製効率を返す | |
float 2 | get | 精製時間を返す | |
7:tractor beams | bool 0 | get/set | trueでon/falseでoff。tractor beamsとはdocking stationのこと |
int 0 | get | 選択されているビークルのユニークIDを返す。何も選択されていない場合は-1を返す | |
set | 当該ユニークIDのビークルを選択する | ||
float 0 | get/set | ビークルを固定する距離 | |
float 1 | get/set | ビークルを固定する水平方向の角度。範囲は-90~90 | |
float 2 | get/set | ビークルを固定する垂直方向の角度。範囲は-90~90 | |
8:hydrofoils | float 0 | get/set | 角度を調整できる。範囲は-45~45 |
9:propulsion | float 0 | get/set | スラスター類のdrive fractionを調整ができる。範囲は0~1 |
float 1 | get | 現在のフレームのpropulsion requestの値を返す | |
set | propulsion requestに値を加算する | ||
float 2 | get | 前回のフレームのpropulsion requestの値を返す | |
float 3 | get | 最大の出力(force)を返す | |
10:shield projector | bool 0 | get | シールドが機能しているかどうか |
int 0 | get/set | シールドのタイプを変更できる。 off=0, disrupt=1, reflect=2, laser absorb=3 | |
float 0 | get/set | 強度 | |
float 1 | get/set | 水平方向の角度 | |
float 2 | get/set | 垂直方向の角度 | |
float 3 | get/set | 距離 | |
float 4 | get/set | 幅 | |
float 5 | get/set | 高さ | |
float 6 | get/set | 色の設定:透明度 | |
float 7 | get/set | 色の設定:赤 | |
float 8 | get/set | 色の設定:緑 | |
float 9 | get/set | 色の設定:青 | |
11:helium pump | bool 0 | get | 浮力が0ならばfalse、0より大きければtrueを返す |
set | falseで浮力を0に、trueで浮力を1に設定する | ||
float 0 | get/set | 浮力の調整を0~1の範囲で行える | |
float 1 | get | 漏出の度合いを返す。範囲は0~1 | |
12:spotlight | float 0 | get/set | 光の広がる角度 |
float 1 | get/set | 水平方向の角度 | |
float 2 | get/set | 垂直方向の角度 | |
float 3 | get/set | 光の強さ | |
float 4 | get/set | 距離 | |
float 5 | get/set | 色の設定:赤 | |
float 6 | get/set | 色の設定:緑 | |
float 7 | get/set | 色の設定:青 | |
13:advanced cannon laser targetter | int 0 | get | 装着されているadvanced cannonのweapon indexを返す。装着されてない場合は-1を返す |
float 0 | get/set | 時限信管の時間 | |
float 1 | get | 高度信管の最低高度を返す | |
set | 高度信管の高度を設定 | ||
float 2 | get | 高度信管の最高高度 | |
14:CRAM cannon laser targetter | int 0 | get | 装着されているCRAM cannonのweapon indexを返す。装着されてない場合は-1を返す |
float 0 | get/set | 時限信管の時間 | |
float 1 | get | 高度信管の最低高度を返す | |
set | 高度信管の高度を設定 | ||
float 2 | get | 高度信管の最高高度 | |
15:warp drive | bool 0 | get | チャージ中かどうか |
int 0 | set | ワープドライブの状態 0=チャージを開始, 1=ワープする | |
float 0 | get | 右方向ワープ距離 | |
float 1 | get | 上方向ワープ距離 | |
float 2 | get | 前方向ワープ距離 | |
float 3 | get | ビークルサイズとwarp rodの長さに基づく、右方向ワープ係数 | |
float 4 | get | 上方向ワープ係数 | |
float 5 | get | 前方向ワープ係数 | |
float 6 | get | warp chargerの長さ | |
float 7 | get | チャージ時間 | |
16:particle cannon lens | int 0 | get | 装着されているparticle cannonのweapon indexを返す。装着されてない場合は-1を返す |
17:steam boiler controller | float 0 | get/set | 燃焼率の設定。範囲は0~1 |
float 1 | get | 接続されているボイラーの体積 | |
float 2 | get | 接続されているボイラーの圧力 | |
18:fuel engine generator | float 0 | get/set | 最大出力の設定。範囲は0~1 |
float 1 | get/set | バッテリー充填度合いの設定。範囲は0~1 | |
float 2 | get | 現在の出力度合い。範囲は0~1 | |
float 3 | get | 推測最大エンジンパワー | |
float 4 | get | 1秒あたりの燃料消費量 | |
19:sail main block | int 0 | get | 帆の種類を返す。0=三角帆, 1=四角帆 |
float 0 | get/set | 垂直方向(マスト)のウィンチの設定 | |
float 1 | get/set | 水平方向(ブーム)のウィンチの設定 | |
float 2 | get | 垂直方向(マスト)の高さ | |
float 3 | get | 水平方向(ブーム)の長さ | |
20:advanced cannon ammo intake | int 0 | get | 関連付けられたAmmo ControllerのユニークIDを返す。関連付けられてない場合は-1を返す |
set | ユニークIDでAmmo Controllerを選択する | ||
int 1 | get | 関連付けられたAmmo Controllerのcomponent indexを返す。関連付けられてない場合は-1を返す | |
set | component indexでAmmo Controllerを選択する | ||
int 2 | get | 装着されているadvanced cannonのweapon indexを返す。装着されてない場合は-1を返す | |
21:advanced cannon ammo controller | int 0 | get | ユニークIDを返す |
22:AI wireless transmitter | int 0 | get/set | チャンネルの設定 |
23:AI wireless receiver | int 0 | get/set | チャンネルの設定 |
24:AI aimpoint selection card | int 0 | get/set | 照準目標の設定。0=ランダム, 1=AIメインフレームと弾薬 |
float 0 | get/set | 照準目標の再設定時間 | |
25:detection component | bool 0 | get/set | trueでon/falseでoff |
26:AI mainframe | int 0 | get/set | AIモードの設定 0=off, 1=on, 2=combat, 4=patrol, 5=fleetmove |
27:laser colorer | float 0 | get/set | 色の設定:赤 |
float 1 | get/set | 色の設定:緑 | |
float 2 | get/set | 色の設定:青 | |
28:laser missile defence | float 0 | get/set | 色の設定:赤 |
float 1 | get/set | 色の設定:緑 | |
float 2 | get/set | 色の設定:青 | |
29:particle cannon | float 0 | get/set | 色の設定:赤 |
float 1 | get/set | 色の設定:緑 | |
float 2 | get/set | 色の設定:青 | |
30:light fitting | float 0 | get/set | 光の強さ |
float 1 | get/set | 距離 | |
float 2 | get/set | 色の設定:赤 | |
float 3 | get/set | 色の設定:緑 | |
float 4 | get/set | 色の設定:青 | |
31:simple laser | float 0 | get/set | 色の設定:赤 |
float 1 | get/set | 色の設定:緑 | |
float 2 | get/set | 色の設定:青 | |
32:smoke generator | float 0 | get/set | 粒子の放出速度 |
float 1 | get/set | 粒子の大きさ | |
float 2 | get/set | 色の設定:赤 | |
float 3 | get/set | 色の設定:緑 | |
float 4 | get/set | 色の設定:青 | |
33:hologram projector | bool 0 | get/set | trueでon/falseでoff |
bool 1 | get/set | 画像を反転させるかどうか | |
float 0 | get/set | 幅 | |
float 1 | get/set | 高さ | |
float 2 | get/set | 距離 | |
float 3 | get/set | 水平方向のずれ | |
float 4 | get/set | 垂直方向のずれ | |
float 5 | get/set | 水平方向の角度 | |
float 6 | get/set | 垂直方向の角度 | |
float 7 | get/set | 回転角 | |
34:poster holder | float 0 | get/set | 幅 |
float 1 | get/set | 高さ | |
35:electric engine | float 0 | get/set | 出力の設定。範囲は0~1 |
BlockInfo
クラス | in/outデータ型 or 参照 | 説明 |
Valid | / bool | 存在している場合trueが返ってくる |
Position | / Vector3 | ブロックのワールド座標での位置 |
LocalPosition | / Vector3 | ブロックのローカル座標での位置 |
LocalPositionRelativeToCom | / Vector3 | 重心を原点としたローカル座標での位置 |
Forwards | / Vector3 | ブロックの正面方向がワールド座標でどこを向いているか |
LocalForwards | / Vector3 | ブロックの正面方向がローカル座標でどこを向いているか |
Rotation | / Quaternion | ワールド座標におけるブロックの姿勢 |
LocalRotation | / Quaternion | ローカル座標におけるブロックの姿勢 |
SubConstructIdentifier | / int | ブロックが所属するサブオブジェクトのIDを返す |
CustomName | / string | ブロックに命名された名前を返す |
Weapons
※旧式と書かれている命令は古いバージョンで書かれたコードの互換性維持のために残されているもので、多重サブオブジェクトに対応していません。
関数 | in/outデータ型 or 参照 | 説明 |
I:GetWeaponCount() | int / | 兵器がいくつあるか。ターレットも兵器の一つとして数えられる(サブオブジェクト上の兵器は数えられない) |
I:GetWeaponInfo(weaponIndex) | int /. WeaponInfo | 指定した兵器のWeaponInfoテーブルが返ってくる |
I:GetWeaponConstraints(weaponIndex) | int /. WeaponConstraints | 指定した兵器のWeaponConstraintsテーブルが返ってくる |
I:GetWeaponBlockInfo(weaponIndex) | int /. BlockInfo | 指定した兵器のBlockInfoテーブルが返ってくる |
I:AimWeaponInDirection(weaponIndex, x,y,z, weaponSlot) | int , float*3 , int / int | 指定した兵器を指定した座標に向ける。座標はワールド座標系。ただし、原点は兵器(ターレット)なので注意。狙った先に敵が居る場合1が出力される。Log()内でも兵器が追従するため注意 |
I:FireWeapon(weaponIndex, weaponSlot) | int , int / bool | 指定した兵器(ターレット)で攻撃する。発射できたかどうかが返ってくる |
I:GetTurretSpinnerCount() - 旧式 | / int | ターレットとスピンブロックの数が返ってくる |
I:GetWeaponCountOnTurretOrSpinner(turretSpinnerIndex) - 旧式 代替関数:'GetWeaponCountOnSubConstruct' | int / int | 指定したターレットとスピンブロック上の兵器の数が返ってくる |
I:GetWeaponInfoOnTurretOrSpinner(turretSpinnerIndex, weaponIndex) - 旧式 代替関数:'GetWeaponInfoOnSubConstruct' | int , int /. WeaponInfo | 指定ターレット,スピンブロック上の指定した兵器についてWeaponInfoで指定した値が返ってくる |
I:AimWeaponInDirectionOnTurretOrSpinner(turretSpinnerIndex,weaponIndex,x,y,z,weaponSlot) - 旧式 代替関数:'AimWeaponInDirectionOnSubConstruct' | int , int , float*3 , int / int | 指定ターレット,スピンブロック上の指定した兵器について攻撃する座標を指定する。詳細はAimWeaponInDirection。ただし、ターレットは追従してくれない |
I:FireWeaponOnTurretOrSpinner(turretSpinnerIndex,weaponIndex,weaponSlot) - 旧式 代替関数:'FireWeaponOnSubConstruct' | int , int , int / bool | 指定ターレット,スピンブロック上の指定した兵器で攻撃する。発射できたかどうかが返ってくる |
I:GetWeaponCountOnSubConstruct(SubConstructIdentifier) | int / int | 指定したサブオブジェクト上の兵器の数が返ってくる |
I:GetWeaponInfoOnSubConstruct(SubConstructIdentifier, weaponIndex) | int , int /. WeaponInfo | 指定サブオブジェクト上の指定した兵器のWeaponInfoテーブルが返ってくる |
I:GetWeaponConstraintsOnSubConstruct(SubConstructIdentifier, weaponIndex) | int , int /. WeaponConstraints | 指定サブオブジェクト上の指定した兵器のWeaponConstraintsテーブルが返ってくる |
I:GetWeaponBlockInfoOnSubConstruct(SubConstructIdentifier, weaponIndex) | int , int /. BlockInfo | 指定サブオブジェクト上の指定した兵器のBlockInfoテーブルが返ってくる |
I:AimWeaponInDirectionOnSubConstruct(SubConstructIdentifier,weaponIndex,x,y,z,weaponSlot) | int , int , float*3 , int / int | 指定サブオブジェクト上の指定した兵器について攻撃する座標を指定する。詳細はAimWeaponInDirection。ただし、ターレットは追従してくれない |
I:FireWeaponOnSubConstruct(SubConstructIdentifier,weaponIndex,weaponSlot) | int , int , int / bool | 指定サブオブジェクト上の指定した兵器で攻撃する。発射できたかどうかが返ってくる |
WeaponInfo
クラス | in/outデータ型 or 参照 | 説明 |
Valid | / bool | 兵器が存在していればtrueが返ってくる |
LocalPosition | / Vector3 | 兵器のローカル座標を示す(ターレットは返さない模様) |
GlobalPosition | / Vector3 | 兵器のワールド座標を示す |
LocalFirePoint | / Vector3 | 弾やレーザーの発生位置のローカル座標を示す |
GlobalFirePoint | / Vector3 | 弾やレーザーの発生位置のワールド座標を示す |
Speed | / float | 兵器のおおよその弾速 |
CurrentDirection | / Vector3 | 兵器の向きをワールド座標で示す。正規化されている |
WeaponType | / int | 兵器の種類 |
WeaponSlot | / int | 兵器のウェポンスロットで指定した値が変えてくる |
PlayerCurrentlyControllingIt | / bool | trueならプレイヤーが操作中 |
WeaponConstraints
クラス | in/outデータ型 or 参照 | 説明 |
Valid | / bool | 兵器が存在していればtrueが返ってくる |
MinAzimuth | / float | MinAzimuthの値(水平方向の射角制限)を返す |
MaxAzimuth | / float | MaxAzimuthの値(水平方向の射角制限)を返す |
MinElevation | / float | MinElevationの値(垂直方向の射角制限)を返す |
MaxElevation | / float | MaxElevationの値(垂直方向の射角制限)を返す |
FlipAzimuth | / bool | 'Flip azimuth constraints'(水平方向の射角制限を反転する)ボタンが有効かどうか |
IsParentConstructSpace | / bool | 'Set the restrictions in the parent construct space'(ローカル座標で射角制限する)ボタンが有効かどうか |
Missile Warning
※旧式と書かれている命令は古いバージョンで書かれたコードの互換性維持のために残されている。
関数 | in/outデータ型 or 参照 | 説明 |
I:GetNumberOfWarnings() | /int | 捕捉したミサイルの数 |
I:GetMissileWarning(missileIndex) | int /. MissileWarningInfo | 指定したミサイルがMissileWarningInfoとして返ってくる |
I:GetNumberOfWarnings(mainframeIndex) - 旧式 | int / int | 指定したmainframeが捕捉したミサイルの数。v2.9.3以降、捕捉したミサイルはmainframe間で共有されるのでmainframeIndexの指定は無意味となった |
I:GetMissileWarning(mainframeIndex, missileIndex) - 旧式 | int , int /. MissileWarningInfo | 指定したミサイルがMissileWarningInfoとして返ってくる。v2.9.3以降、捕捉したミサイルはmainframe間で共有されるのでmainframeIndexの指定は無意味となった |
MissileWarningInfo
クラス | in/outデータ型 or 参照 | 説明 |
Valid | / bool | ミサイルが存在しているか |
Position | / Vector3 | ワールド座標でのミサイルの位置 |
Velocity | / Vector3 | ミサイルの速度。ワールド座標系 |
Range | / float | 自身とミサイルとの距離 |
Azimuth | / float | 自分の正面から見たミサイルの水平方向の角度。機体を上からみて時計回りが正。-180~0~180で示す |
Elevation | / float | 自分の正面から見たミサイルの垂直方向の角度。下向きが正。-180~0~180で示す |
TimeSinceLaunch | / float | ミサイルが発射されてからの時間 |
Id | / int | ミサイルのID |
MissileGuidance
関数 | in/outデータ型 or 参照 | 説明 |
I:GetLuaTransceiverCount() | / int | LuaTransceiverの数を得る |
I:GetLuaControlledMissileCount(luaTransceiverIndex) | int / int | 指定したLuaTransceiverが制御しているミサイルの数を得る |
I:GetLuaTransceiverInfo(luaTransceiverIndex) | int /. BlockInfo | 指定したLuaTransceiverが設置されたMissileLauncherのBlockInfoを得る。MissileLauncher以外に設置された場合はLuaTransceiver自体のBlockInfoを得る |
I:GetLuaControlledMissileInfo(luaTransceiverIndex,missileIndex) | int , int /. MissileWarningInfo | 指定したLuaTransceiverが制御している指定したミサイルのMissileWarningInfoの情報を得る |
I:SetLuaControlledMissileAimPoint(luaTransceiverIndex,missileIndex,x,y,z) | int , int , float*3 / | ミサイルの誘導位置をワールド座標で指定する。 |
I:DetonateLuaControlledMissile(luaTransceiverIndex,missileIndex) | int , int / | 指定したLuaTransceiverが制御している指定したミサイルを起爆する |
I:IsLuaControlledMissileAnInterceptor(luaTransceiverIndex,missileIndex) | int , int / bool | 指定したLuaTransceiverが制御している指定したミサイルにミサイル迎撃能力がある場合true |
I:SetLuaControlledMissileInterceptorTarget(luaTransceiverIndex,missileIndex,mainframeIndex, targetIndex) | int , int , int , int / | LuaTransceiverで制御しているミサイルにmainframeで補足している指定したミサイルを迎撃させる(missileinterceptorの機能)。自分で誘導する場合はI:SetLuaControlledMissileInterceptorStandardGuidanceOnOffで誘導を切ること |
I:SetLuaControlledMissileInterceptorStandardGuidanceOnOff(luaTranceiver,missileIndex, onOff) | int , int , bool / | ミサイルの標準誘導のON/OFFを切り替える。 |
SpinBlocks and pistons
関数 | in/outデータ型 or 参照 | 説明 |
I:SetSpinBlockSpeedFactor(SubConstructIdentifier,speedFactor) | int , float / | 指定したSpinBlockのDrive fractionを調整する。範囲は0~1 |
I:SetSpinBlockPowerDrive(SubConstructIdentifier,drive) | int , float / | 指定したSpinBlockのMotor Driveを調整する。範囲は0~10 |
I:SetSpinBlockRotationAngle(SubConstructIdentifier, angle) | int , float / | 指定したSpinBlockの角度を指定する |
I:SetSpinBlockContinuousSpeed(SubConstructIdentifier, speed) | int , float / | 指定したSpinBlockの回転速度を指定する。範囲は-30~30 |
I:SetSpinBlockInstaSpin(SubConstructIdentifier,magnitudeAndDirection) | int , float / | 指定したSpinBlockをInstaSpinさせる。1で正方向、-1で負方向に最高速度で回る |
I:GetPistonExtension(SubConstructIdentifier) | int / float | 指定したPistonのExtension(伸長)を返す。存在しない場合は-1を返す |
I:GetPistonVelocity(SubConstructIdentifier) | int / float | 指定したPistonのVelocity(速度)を返す。存在しない場合は-1を返す |
I:SetPistonExtension(SubConstructIdentifier,ExtensionDistance) | int , float / | 指定したPistonのExtension(伸長)を調整する。単位はメートル(m) |
I:SetPistonVelocity(SubConstructIdentifier,ExtensionVelocity) | int , float / | 指定したPistonのVelocity(速度)を調整する。単位はメートル毎秒(m/s)、範囲は0.1~2 |
※ヘリブレードスピナーはサブオブジェクトとは異なるインデックスを持っていることに注意
関数 | in/outデータ型 or 参照 | 説明 |
I:GetDedibladeCount() | / int | Dedibladeの数を得る |
I:GetDedibladeInfo(DedibladeIndex) | int /. BlockInfo | 指定したDedibladeのBlockInfoの情報を得る |
I:IsDedibladeOnHull(DedibladeIndex) | int / bool | 指定したDedibladeが船体に乗っている場合trueが得られる。サブオブジェクト上に乗っている場合はfalse |
I:SetDedibladeSpeedFactor(DedibladeIndex,speedFactor) | int , float / | 指定したDedibladeのDrive fractionを調整する。範囲は0~1 |
I:SetDedibladePowerDrive(DedibladeIndex,drive) | int , float / | 指定したDedibladeのMotor Driveを調整する。範囲は0~10 |
I:SetDedibladeContinuousSpeed(DedibladeIndex, speed) | int , float / | 指定したDedibladeの回転速度を指定する。範囲は-30~30 |
I:SetDedibladeInstaSpin(DedibladeIndex,magnitudeAndDirection) | int , float / | 指定したDedibladeをInstaSpinさせる。1で正方向、-1で負方向に最高速度で回る |
I:SetDedibladeUpFraction(DedibladeIndex,upFraction) | int , float / | 指定したDedibladeのAlways up fractionを調整する。範囲は0~1 |
※以下旧式化した命令群
関数 | in/outデータ型 or 参照 | 説明 |
I:GetSpinnerCount() - 旧式 | / int | SpinBlockの数(helispinnerを含む)を得る |
I:GetSpinnerInfo(index) - 旧式 | int /. BlockInfo | 指定したSpinBlockのBlockInfoの情報を得る |
I:SetSpinnerSpeedFactor(index,speedFactor) - 旧式 | int , float / | 指定したSpinBlockのDrive fractionを調整する。範囲は0~1 |
I:SetSpinnerPowerDrive(index,drive) - 旧式 | int , float / | 指定したSpinBlockのMotor Driveを調整する。範囲は0~10 |
I:SetSpinnerRotationAngle(index, angle) - 旧式 | int , float / | 指定したSpinBlockの角度を指定する |
I:SetSpinnerContinuousSpeed(index, speed) - 旧式 | int , float / | 指定したSpinBlockの回転速度を指定する。範囲は-30~30 |
I:SetSpinnerInstaSpin(index,magnitudeAndDirection) - 旧式 | int , float / | 指定したSpinBlockをInstaSpinさせる。1で正方向、-1で負方向に最高速度で回る |
I:IsSpinnerDedicatedHelispinner(index) - 旧式 | int / bool | 指定したSpinBlockがhelispinnerだった場合trueが得られる |
I:IsSpinnerOnHull(index) - 旧式 代替関数:'IsDediBladeOnHull' または 'IsSubConstructOnHull' | int / bool | 指定したSpinBlock(helispinner)が船体に乗っている場合trueが得られる。SpinBlock上に乗っている場合はfalse |
I:SetDedicatedHelispinnerUpFraction(index,upFraction) - 旧式 代替関数:'SetDedibladeUpFraction' | int , float / | 指定したSpinBlock(helispinner)のAlways up fractionを調整する。範囲は0~1 |
SubConstructs
関数 | in/outデータ型 or 参照 | 説明 |
I:GetAllSubConstructs() | / int[] | すべてのサブオブジェクトのインデックスをテーブルで返す |
I:GetAllSubConstructChildren(SubConstructIdentifier) | int / int[] | 指定したサブオブジェクト上に直接置かれている子サブオブジェクトのインデックスをテーブルで返す(孫サブオブジェクトは含まれない) |
I:GetParent(SubConstructIdentifier) | int / int | 指定したサブオブジェクトの親サブオブジェクトのインデックスを返す(船体の場合0、取得できない場合-1が返る) |
I:IsTurret(SubConstructIdentifier) | int / bool | 指定したサブオブジェクトがターレットならTrue、そうでないならFalseを返す |
I:IsSpinBlock(SubConstructIdentifier) | int / bool | 指定したサブオブジェクトがスピンブロックならTrue、そうでないならFalseを返す |
I:IsPiston(SubConstructIdentifier) | int / bool | 指定したサブオブジェクトがピストンならTrue、そうでないならFalseを返す |
I:IsAlive(SubConstructIdentifier) | int / bool | 指定したサブオブジェクトが破壊されていないならTrue、破壊されていればFalseを返す |
I:IsSubConstructOnHull(SubConstructIdentifier) | int / bool | 指定したサブオブジェクトが船体に乗っている場合trueが得られる。サブオブジェクト上に乗っている場合はfalse |
I:GetSubConstructInfo(SubConstructIdentifier) | int /. BlockInfo | 指定したサブオブジェクトのBlockInfoの情報を得る |
I:GetSubConstructIdleRotation(SubConstructIdentifier) | int / Quaternion | 指定したサブオブジェクトの回転度を返す |
Friendlies
関数 | in/outデータ型 or 参照 | 説明 |
I:GetFriendlyCount() | / int | 友軍の数を得られる |
I:GetFriendlyInfo(index) | int /. FriendlyInfo | Indexで指定した友軍についてFriendlyInfoで指定した値が得られる |
I:GetFriendlyInfoById(Id) | int /. FriendlyInfo | IDで指定した友軍についてFriendlyInfoで指定した値が得られる |
FriendlyInfo
クラス | in/outデータ型 or 参照 | 説明 |
Valid | / bool | 友軍が存在するか |
Rotation | / Quaternion | ワールド座標における友軍の姿勢 |
ReferencePosition | / Vector3 | 友軍のワールド座標を示す |
PositiveSize | / Vector3 | 友軍のローカル座標上の原点からの自身の正方向の長さ |
NegativeSize | / Vector3 | 友軍のローカル座標上の原点からの自身の負方向の長さ |
CenterOfMass | / Vector3 | 友軍の重心位置のワールド座標 |
Velocity | / Vector3 | 友軍の速度ベクトル |
UpVector | / Vector3 | 友軍の上方向の成分を長さ1のベクトルで得る。つまり友軍の上面がどこを向いているのかワールド座標系で示されている |
RightVector | / Vector3 | 友軍の右方向の成分を長さ1のベクトルで得る。 |
ForwardVector | / Vector3 | 友軍の前方向の成分を長さ1のベクトルで得る。 |
HealthFraction | / float | 友軍の残りの体力を示す。範囲は1~0 |
SparesFraction | / float | 友軍のスペアを示す。今は無きもの |
AmmoFraction | / float | 友軍の弾薬の残量を示す。範囲は1~0。存在しない場合は1。 |
FuelFraction | / float | 友軍の燃料の残量を示す。範囲は1~0。存在しない場合は1。 |
EnergyFraction | / float | 友軍のバッテリーの残量を示す。範囲は1~0。存在しない場合は1。 |
PowerFraction | / float | 友軍の出力の残量を示す。範囲は1~0。存在しない場合は1。 |
ElectricPowerFraction | / float | 友軍の電気エンジンの出力の残量を示す。範囲は1~0。存在しない場合は1。 |
AxisAlignedBoundingBoxMinimum | / Vector3 | ワールド座標軸に沿った友軍機の寸法の最小値 |
AxisAlignedBoundingBoxMaximum | / Vector3 | ワールド座標軸に沿った友軍機の寸法の最大値 |
BlueprintName | / string | 友軍の名前 |
Id | / int | 友軍のID |
FleetId | / int | 友軍の所属しているFleetのID |
Type | / int | Vehicleは2,Fortressは1,Structureと存在していない場合は0を返す. |
Math and Other
関数 | in/outデータ型 or 参照 | 説明 |
I:Maths_AngleBetweenVectors(x1,y1,z1,x2,y2,z2) | float*3 or Vector3 / float | 2つのベクトルの角度を表示する(鋭角) |
I:QuaternionToEulerAngles(Quaternion) | Quaternion / Vector3 | クウォータニオンからベクトル成分(オイラー角)に変換 |
I:Maths_CreateQuaternion(forward,up) | Vector3 / Quaternion | 2つのベクトルからクウォータニオンを生成 |
I:Maths_CreateVector3(x,y,z) | float*3 / Vector3 | 3つの値からVector3を生成 |
I:Maths_RotateVector3(Vector3,Quaternion) | Vector3 , Quaternion / Vector3 | クウォータニオンを使用しベクトルを回転させる |
I:Crash() | 任意にLuaを強制終了させる |
コメント
- 取り敢えずExcelからそのまま引っ張ってきた -- カサッカ? 2017-06-16 (金) 02:28:58
- おお・・・あさずあざす・・・!Luaはさっぱりなので他の方にお願いするしかにぃ0(:3 )~_(:3 」∠ )_ -- 管理人/びんせんとー? 2017-06-23 (金) 19:56:44
- v2.1devTestで追加された命令を追記しました。安定版の方にはきていないのでとりあえず折りたたみ。 -- 2017-12-07 (木) 16:00:06
- グッジョブです! ありがとうございます! -- カサッカ? 2018-01-04 (木) 22:04:10
- PlayerCurrentlyControllinglt は PlayerCurrentlyControllingIt でしょうか?後ろから2文字目が小文字のLなのか、大文字のIなのか -- 2018-02-03 (土) 12:13:05
- 大文字の"I" ですな。ゲーム内のフォントが区別つきにくいから、読み間違えたのかも -- 2018-02-03 (土) 18:03:55
- PowerFractionとElectricPowerFractionを追加 -- 亀? 2019-04-30 (火) 13:30:53
- GPPIDのFakeSetPointの値を設定する方法を探しているんですけど、現状無理なのでしょうか…?別ブロック経由とかも考えてみたんですが、手段を見つけられない -- FTD素人? 2020-08-16 (日) 23:55:42