LlResetTime
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| Function: llResetTime( ); |
| 参数: |
| 返回值:将脚本时间计时器重置为零。 |
| 注意事项 |
|---|
脚本时间重置时…
脚本重置(user或llResetScript或llResetOtherScript) 模拟器重置(管理或崩溃) 调用llResetTime或llGetAndResetTime 脚本时间度量真实世界的时间,它不受时间膨胀的影响。 |
| 示例 |
|---|
示例1
default {
state_entry()
{
llResetTime();
}
touch_start(integer num_touch)
{
float time = llGetTime(); //我们可以使用llGetAndReset()来完成同样的任务,而不是获取并重新设置时间。
llResetTime();
llSay(0,(string)time + " seconds have elapsed since the last touch." );
}
}
|
| 相关函数 |
|---|
| llGetTime |
| 相关事件 |
|---|
| 无 |