Difference between revisions of "LlGetRegionDayOffset/ja"
Jump to navigation
Jump to search
(copy from english(Todo: need translate to japanese)) |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{LSL_Function | {{LSL_Function/ja | ||
|func=llGetRegionDayOffset|return_type=integer | |func=llGetRegionDayOffset|return_type=integer | ||
|func_desc= | |func_desc=環境の時間を計算する前に現在の時間に追加される秒数を返します。[[llGetDayOffset ]]は現在のパーセルの値を返し、[[llGetRegionDayOffset]]はリージョン全体に対して同じ値を生成します。 | ||
|examples= | |examples= | ||
<syntaxhighlight lang="lsl2"> | <syntaxhighlight lang="lsl2"> | ||
Line 26: | Line 26: | ||
|also_functions= | |also_functions= | ||
{{LSL DefineRow||[[llGetEnvironment]]}} Newer function that consolidates many environment-based settings. | {{LSL DefineRow||[[llGetEnvironment/ja]]}} Newer function that consolidates many environment-based settings. | ||
{{LSL DefineRow||[[llGetDayLength]]}} | {{LSL DefineRow||[[llGetDayLength/ja]]}} | ||
{{LSL DefineRow||[[llGetDayOffset]]}} | {{LSL DefineRow||[[llGetDayOffset/ja]]}} | ||
{{LSL DefineRow||[[llGetMoonDirection]]}} | {{LSL DefineRow||[[llGetMoonDirection/ja]]}} | ||
{{LSL DefineRow||[[llGetMoonRotation]]}} | {{LSL DefineRow||[[llGetMoonRotation/ja]]}} | ||
{{LSL DefineRow||[[llGetSunDirection]]}} | {{LSL DefineRow||[[llGetSunDirection/ja]]}} | ||
{{LSL DefineRow||[[llGetSunRotation]]}} | {{LSL DefineRow||[[llGetSunRotation/ja]]}} | ||
{{LSL DefineRow||[[llGetRegionDayLength]]}} | {{LSL DefineRow||[[llGetRegionDayLength/ja]]}} | ||
{{LSL DefineRow||[[llGetRegionDayOffset]]}} | {{LSL DefineRow||[[llGetRegionDayOffset/ja]]}} | ||
{{LSL DefineRow||[[llGetRegionMoonDirection]]}} | {{LSL DefineRow||[[llGetRegionMoonDirection/ja]]}} | ||
{{LSL DefineRow||[[llGetRegionMoonRotation]]}} | {{LSL DefineRow||[[llGetRegionMoonRotation/ja]]}} | ||
{{LSL DefineRow||[[llGetRegionSunDirection]]}} | {{LSL DefineRow||[[llGetRegionSunDirection/ja]]}} | ||
{{LSL DefineRow||[[llGetRegionSunRotation]]}} | {{LSL DefineRow||[[llGetRegionSunRotation/ja]]}} | ||
}} | }} |
Latest revision as of 13:43, 22 November 2023
LSL ポータル | 関数 | イベント | 型 | 演算子 | 定数 | 実行制御 | スクリプトライブラリ | カテゴリ別スクリプトライブラリ | チュートリアル |
要約
関数: integer llGetRegionDayOffset( );
環境の時間を計算する前に現在の時間に追加される秒数を返します。llGetDayOffset は現在のパーセルの値を返し、llGetRegionDayOffsetはリージョン全体に対して同じ値を生成します。
integer で返します。
サンプル
// print the apparent time of day as HH:MM (%), just like the environment window in the viewer.
// Time of day is a fraction between 0 and 1, 0 is midnight, 0.5 is noon
string printTimeOfDay(float dayFraction) {
integer hours = (integer)(dayFraction * 24);
integer minutes = (integer)(dayFraction * 24 * 60) % 60;
integer percent = (integer)(dayFraction * 100);
return (string)hours + ":" + llGetSubString((string)(100+minutes), 1, 2) + " (" + (string)percent + "%)";
}
default {
state_entry() {
llSetTimerEvent(5);
}
timer() {
float timeOfDay = (llGetUnixTime() + llGetRegionDayOffset()) % llGetRegionDayLength() * 1.0 / llGetRegionDayLength();
llSetText(printTimeOfDay(timeOfDay), <1,1,0>, 1);
}
}
関連項目
関数
• | llGetEnvironment/ja | Newer function that consolidates many environment-based settings. | ||
• | llGetDayLength/ja | |||
• | llGetDayOffset/ja | |||
• | llGetMoonDirection/ja | |||
• | llGetMoonRotation/ja | |||
• | llGetSunDirection/ja | |||
• | llGetSunRotation/ja | |||
• | llGetRegionDayLength/ja | |||
• | llGetRegionDayOffset/ja | |||
• | llGetRegionMoonDirection/ja | |||
• | llGetRegionMoonRotation/ja | |||
• | llGetRegionSunDirection/ja | |||
• | llGetRegionSunRotation/ja |
特記事項
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。