忍者ブログ
お知らせと画力修行用に開設しました。よろしくお願いします!
[133]  [132]  [131]  [130]  [129]  [128]  [127]  [126]  [125]  [124]  [123
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

これが海外のサイトで見つけたコードです↓

ここから======================
-- Script for Crowd system
-- Set/unset preferred clips at times
-- flipperdesign
bips = #()
fn PerFrameFn crwd time =
(
IF (time == 1f) then
(
Print "Script active!"
)

-- set action at given frame
IF (time == 400f) then
(
format "building biped list\n"
bips = for obj in objects
where (classof obj == Biped_Object and
obj.controller.rootNode == obj) collect obj
for bip in bips do
(
bipCtrl = bip.controller
biped.addprefclip bipCtrl "Laugh" 100
Print("Frame 400 - addprefclip: Laugh")
)
bipCtrl = $Bip01.controller
Print ("Remaining Clip pref: " +(biped.numPrefClips bipCtrl) as string)
)

-- set action at given frame
IF (time == 700f) then
(
format "building biped list\n"
bips = for obj in objects
where (classof obj == Biped_Object and
obj.controller.rootNode == obj) collect obj
for bip in bips do
(
bipCtrl = bip.controller
biped.deleteprefclip bipCtrl "Laugh"
Print("Frame 700 - deleteprefclip: Laugh")
)
bipCtrl = $Bip01.controller
Print ("Remaining Clip pref: " +(biped.numPrefClips bipCtrl) as string)
)

)
ここまで=========================

群集の海外のサイト





スプリクトにコピペすれば使えます。
本当すばらしいコードだと思いました。これはフレームで違うモーションに変わる
ものですが、これを改造すれば、色々実現できると思いました。






このコードを改造したい所は、、
①全てのバイペットが同じタイミングでモーションが変わってしまうので個別で指定したい。
②トリガーを触ったらモーションを発動させるようにさせたい。

これを実現できたらかなりの事ができるきと思います。



拍手

PR
Comment
name 
title 
color 
mail 
URL
comment 
pass    Vodafone絵文字 i-mode絵文字 Ezweb絵文字
コメントの修正にはpasswordが必要です。任意の英数字を入力して下さい。


カレンダー
02 2024/03 04
S M T W T F S
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
プロフィール
マッチーウェブサイト(本家)本家のサイトです。こちらもよろしくお願いします。

ハンドルネーム:machiee(マッチー)

3DCG作ってます。

リンクはもちろんフリーです!
最新コメント
バーコード
ブログ内検索
最古記事
P R
Template by Crow's nest 忍者ブログ [PR]