LSL-- Types

Types

 

数据类型

 

1. Subcategories

 

1.1 LSL List/Entry Types

 

1.2 LSL Integer

 

整型

 

1.2.1 4 distinct ways

 

1.2.1.1 Signed Integer

 

1.2.1.2 Truth values(Booleans)

 

1.2.1.3 Enumerations

 

计数

 

1.2.1.4 Bit vectors

 

1.2.2 3 operators

 

1.2.2.1 =

 

1.2.2.2 ==

 

1.2.2.3 !=

 

1.3 LSL Float

 

1.3.1 Constants

 

1.3.1.1 DEG_TO_RAD

 

1.3.1.2 llFabs

 

1.3.1.3 PI

 

1.3.1.4 PI_BY_TWO

 

1.3.1.5 RAD_TO_DEG

 

1.3.1.6 SQRT2

 

1.3.1.7 TWO_PI

 

1.4 LSL Key

 

Getting a Key

There are several ways to acquire the key of something:

1) Having someone supply it to you;

2) Using a native LSL function such as llGetKey, etc.

3) In your inventory, right-clicking over something and choosing "Copy Asset UUID." Note this will only work on items that you have full permissions to.

 

1.5 LSL List

 

Adding an Element to a list

There are several ways used to add an element to an existing list via prepending/appending:

myList = [new_item] + myList; Best method for Mono-LSL

myList = myList + [new_item];

myList += [new_item];

myList = (myList=[]) + myList + [new_item];

myList = myList + new_item;

myList += new_item;

myList = (myList=[]) + myList + new_item; Best method for LSO-LSL

 

1 Diverse Data Types

2 Common List Operations

2.1 Counting place in a list vs list length

2.2 List Limits

2.3 Adding an Element to a list

2.3.1 Notes

2.4 Joining Lists (aka Concatenation)

2.5 Clearing a List

2.6 Passing a List Into a Function

2.7 Processing a List Into Another List

3 Strided lists

4 Extended List Operations

 

1.5.1 Clear List

 

myList = [];

 

1.5.2 一个列表不能包含另一个列表

 

1.5.3 使用方括号

 

1.5.4 列表可以直接转为字符串

 

1.5.5 Pages

 

1.5.5.1 llList2Rot(list src,integer index)

 

1.6 LSL Rotation

 

1.7 LSL String

 

1.7.1 Useful Functions

 

用户定义的实用函数

Chr Returns the Unicode character with the given code. See also Ord.

Float2String Allows string output of a float in a tidy text format, with optional rounding.

Left Returns text left of a specified separator.

Like See if one word matches part of another.

Ord Returns the ordinal (Unicode code) of a character. See also Chr.

RandomString Creates a random string.

RemoveHTMLTags Removes HTML tags from a string ( and newline characters )

Right Returns text right of a specified separator.

str_replace replace all instances of a string with another string in a target string.

Stristr Returns a string from the first occurrence of needle to the end of haystack.

SplitLine Insert 'new line' escape codes at certain positions of a string.

WrapText Break text into line lengths of your specification.

 

1.8 LSL Vector

 

1.8.1 Uses

 

1.8.1.1 position

 

1.8.1.2 Velocity

 

1.8.1.3 Colour

 

2. Pages

 

2.1 I

 

2.1.1 Integer/it

 

2.2 K

 

2.2.1 Key

 

2.3 L

 

2.3.1 List

 

2.4 Q

 

2.4.1 Quatertion

 

四元法:复数运算法则。LSL用于Rotation计算

 

2.5 R

 

2.5.1 Rotation

 

2.6 S

 

2.6.1 String/it

 

2.6.2 String

 

2.7 v

 

2.7.1 Vector

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值