2008年06月21日
テクスチャプレゼンター
これもよくある機能なんだけど
-----
Giving a PowerPoint Presentation in Second Life
-----
にあったのを少しだけ手直し(テクスチャの枚数を state_entry でしか設定していないのは問題があると思うんだよね... テクスチャ追加した時に)
-----
というわけで
-----
LSL Wiki : changed
-----
を見てインベントリーが変更された時 枚数設定し直すようにした
-----
With your prim sized, copy the uploaded textures from your inventory into the inventory of the prim in order of how you want them to appear. PowerPoint(R) will name the images Slide1, Slide2, etc., which means keeping them in order should be easy enough.
-----
の記述があって いまいち この llGetInventoryName で見つかる順番ってどういう順? インベントリーに登録した順番ってこと?
-----
と疑問に思い試してみると どうも アルファベット順のようである
-----
LlGetInventoryName - lslWiki
-----
に
-----
Note: The inventory is returned in alphabetical order.
-----
とあった これって仕様なんだよね... 仕様なのに Note ? w
-----
そうそう 前に インベントリーのものを渡すのと その前に お金を貰うのと をみたので これと組み合わせれば ベンダーが作れますね
-----
こんな感じになります
-----

-----
Giving a PowerPoint Presentation in Second Life
-----
にあったのを少しだけ手直し(テクスチャの枚数を state_entry でしか設定していないのは問題があると思うんだよね... テクスチャ追加した時に)
-----
というわけで
-----
LSL Wiki : changed
-----
を見てインベントリーが変更された時 枚数設定し直すようにした
//で 最初に参照した場所に
// File: TexturePresenter.lsl
// Date Author number of nodes
// 2008/6/20 walkinglint 13
//
integer invCount;
integer invLoopCount;
default {
state_entry() {
invCount = llGetInventoryNumber(INVENTORY_TEXTURE);
}
on_rez(integer param) {
llResetScript();
}
touch_start(integer total_number) {
llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, invLoopCount), ALL_SIDES);
invLoopCount++;
if (invLoopCount == invCount) {
invLoopCount = 0;
}
}
changed(integer change) {
if (change == CHANGED_INVENTORY) {
invCount = llGetInventoryNumber(INVENTORY_TEXTURE);
}
}
}
-----
With your prim sized, copy the uploaded textures from your inventory into the inventory of the prim in order of how you want them to appear. PowerPoint(R) will name the images Slide1, Slide2, etc., which means keeping them in order should be easy enough.
-----
の記述があって いまいち この llGetInventoryName で見つかる順番ってどういう順? インベントリーに登録した順番ってこと?
-----
と疑問に思い試してみると どうも アルファベット順のようである
-----
LlGetInventoryName - lslWiki
-----
に
-----
Note: The inventory is returned in alphabetical order.
-----
とあった これって仕様なんだよね... 仕様なのに Note ? w
-----
そうそう 前に インベントリーのものを渡すのと その前に お金を貰うのと をみたので これと組み合わせれば ベンダーが作れますね
-----
こんな感じになります
-----

Posted by walkinglint at 10:04│Comments(0)
│walking のスクリプティング講座