Difference between revisions of "LlGetRegionName/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (Undo revision 851042 by Mako Nozaki (Talk))
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
|func_footnote
|func_footnote
|func_desc
|func_desc
|return_text=現在のリージョン名
|return_text=現在の [[Viewer coordinate frames/ja#Region|リージョン]] 名
|spec
|spec
|caveats
|caveats
|constants
|constants
|examples=<lsl>
|examples=<source lang="lsl2">
// The beginnings of a region-info script.
// 標準クライアントのマップの「SLURL をクリップボードにコピー」でコピーされるようなものを発言します
 
string wwGetSLUrl()
{
    string globe = "http://slurl.com/secondlife";
    string region = llGetRegionName();
    vector pos = llGetPos();
    string posx = (string)llRound(pos.x);
    string posy = (string)llRound(pos.y);
    string posz = (string)llRound(pos.z);
    return (globe + "/" + region +"/" + posx + "/" + posy + "/" + posz);
}
 
default
default
{
{
     state_entry()
     state_entry()
     {
     {
         llSetTimerEvent(3.0);
         llOwnerSay( wwGetSLUrl() );
    }
   
    timer()
    {
        string msg;
       
        msg = "REGION NAME : " + llGetRegionName();
       
        llSetText(msg, <0,1,0>, 1.0);
     }
     }
}
}
</lsl>
</source>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetSimulatorHostname/ja|llGetSimulatorHostname]]|}}
|also_functions=
{{LSL DefineRow||{{LSLG/ja|llRequestSimulatorData}}|}}
{{LSL DefineRow||{{LSLG/ja|llGetSimulatorHostname}}|}}
|also_tests
|also_tests
|also_events
|also_events

Latest revision as of 15:01, 25 February 2016

要約

関数: string llGetRegionName( );

現在の リージョン 名を string で返します。

サンプル

// 標準クライアントのマップの「SLURL をクリップボードにコピー」でコピーされるようなものを発言します

string wwGetSLUrl()
{
    string globe = "http://slurl.com/secondlife";
    string region = llGetRegionName();
    vector pos = llGetPos();
    string posx = (string)llRound(pos.x);
    string posy = (string)llRound(pos.y);
    string posz = (string)llRound(pos.z);
    return (globe + "/" + region +"/" + posx + "/" + posy + "/" + posz);
}

default
{
    state_entry()
    {
        llOwnerSay( wwGetSLUrl() );
    }
}

関連項目

特記事項

Search JIRA for related Issues

Signature

function string llGetRegionName();
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。