話說小弟想寫個機械人放係部車入面, 當部車開著電源個時個機械人識著燈同隔一段時間眨眼
以下係小弟寫既code
model_xxx.cfg
- 代碼: 選擇全部
[mesh]
haro.o3d
[matl]
harotex.tga
0
[matl_lightmap]
harotex_lm.tga //開眼既lightmap
harolight
[matl]
harotex.tga
0
[matl_lightmap]
haroblink_lm.tga //眨眼既lightmap
haroblink
haro.osc
- 代碼: 選擇全部
{macro:Haro_Frame}
(L.L.elec_busbar_main) 1 =
{if}
(L.L.Timer) (L.S.Timegap) + (S.L.Timer) s0 3 <
{if}
0 (S.L.haroblink)
1 (S.L.harolight)
{else}
l0 3.5 <
{if}
1 (S.L.haroblink)
0 (S.L.harolight)
{else}
0 (S.L.Timer)
{endif}
{endif}
{else}
0 (S.L.haroblink)
0 (S.L.harolight)
{endif}
{end}
haro_varlist.txt
- 代碼: 選擇全部
harolight
haroblink
Timer
但都未識開燈(返而用elec_busbar_main就著 )
先謝