LlGetInventoryName/ko

From Second Life Wiki
< LlGetInventoryName
Revision as of 05:51, 3 March 2009 by Nanjido Oh (talk | contribs) (New page: {{LSL Function/negative_index/ko|false|number}} {{LSL_Function/ko |func_id=147|func_sleep=0.0|func_energy=10.0 |func=llGetInventoryName|return_type=string |p1_type=integer|p1_name=type|p1_...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

설명

함수: string llGetInventoryName( integer type, integer number );
147 함수ID
0.0 지연
10.0 에너지

반환되는 값은 사용자함(inventory)에서 type형의 일련번호 number에 해당하는 물체의 이름. 만약 입력된 형에 해당하는 물체가 없으면(혹은 주어진 형에 해당하는 물체의 개수가 number보다 작거나 같을 때에는) 빈 문자열을 출력한다.

• integer type INVENTORY_* flag
• integer number Beginning from 0

number음의 색인을 지원하지 않는다.
사용자함의 물체들은 (시간순이 아닌) 알파벳순으로 정렬된다.

표시문자 보관함 유형
INVENTORY_NONE -1 항목이 존재하지 않음.
INVENTORY_ALL 보관함의 모든 유형.
INVENTORY_TEXTURE 0 표면그림
INVENTORY_SOUND 1 소리
INVENTORY_LANDMARK 3 바로가기
INVENTORY_CLOTHING 5 의상
표시문자 보관함 유형
INVENTORY_OBJECT 6 물체
INVENTORY_NOTECARD 7 기록장
INVENTORY_SCRIPT 10 스크립트
INVENTORY_BODYPART 13 신체부위
INVENTORY_ANIMATION 20 애니메이션
INVENTORY_GESTURE 21 몸짓

예제

상자에서 모두 꺼내기

<lsl> // script created by SpiritWolf Chikuwa // minor changes by Strife Onizuka to speed things up // // /!\ PUBLIC DOMAIN /!\ // You can Copy/Mod/Trans // Please, do not resell this script and give it full perm // Just please leave this header intact // // 누구나 복사/수정/전달할 수 있습니다. // 이 스크립트를 재판매하지 마시고, 모든 권한으로 배포해주세요 // 머리말은 그대로 남겨주세요 // // Minor changes: (스크립트에 수정을 가한 뒤에 당신의 이름을 여기에 넣고 이 붙임말을 지워주세요, 감사합니다) // // 스크립트는 여기서부터 시작합니다:

list gInventoryList;

list getInventoryList() {

   list       result = [];
   integer    n = llGetInventoryNumber(INVENTORY_ALL);
   while(n)
       result = llGetInventoryName(INVENTORY_ALL, --n) + result;
   
   return result;

}

default {

   state_entry()
   {
       gInventoryList = getInventoryList();
   }
   touch_start( integer n )
   {
       integer i = 0;
       string folder = llGetObjectName();
       while(i < n)
       {
           llGiveInventoryList(llDetectedKey(i), folder, gInventoryList );
           ++i;
       }
   }
   changed( integer change )
   {
      if ( change == CHANGED_INVENTORY )
          gInventoryList = getInventoryList();
   }

}

// llGetInventory number and name will scan all objects on the box. // llGiveInventory will give you the content. // See also llGetInventory and llGiveInventory on LSL Wiki for further informations. </lsl>

함께 보기

함수

•  llGetInventoryNumber 사용자함에서 특정 형의 물체들의 개수를 반환한다
•  llGetInventoryType 사용자함에 해당 물체가 있는지 확인하고 형을 반환한다
•  llGetInventoryCreator 사용자함 해당 물체의 제작자를 반환한다
•  llGetInventoryPermMask 사용자함 해당 물체의 권한을 반환한다
•  llGetInventoryKey (모든 권한일 때에) 사용자함 해당 물체의 UUID를 반환한다

상세 기록

이 글이 유용하지 않으세요? LSL Wiki의 관련항목이 도움을 줄 수 있을 지도 모릅니다.