|
昨天有人问我怎么播放动画(战役开头动画那种)
因为我以前在J区整理时发现了关于PlayCinematic()这个函数的问题
于是告诉对方,然而无论如何设置也无法播放
百度到U9有人做了如下回答可以实现AVI播放,无法实现RMVB。
电影是从外部读取,API函数是:
native PlayCinematic takes string movieName returns nothing
将所要播放电影放到movie目录下,貌似这个目录吧,不记得了,把AVI电影文件后缀改为mpq,例如sy.avi那么改为sy.mpq。
调用办法很简单,只用调用文件名:
call PlayCinematic("sy")
PS:注意只能在游戏结尾播放喔。。。。呃,不然后果自负。
复制代码 jass具体用法参照blizzard.j里面的:
[jass]
function SetCinematicAvailableBJ takes boolean available, integer cinematicIndex returns nothing
if ( cinematicIndex == bj_CINEMATICINDEX_TOP ) then
call SetOpCinematicAvailable( bj_CAMPAIGN_INDEX_T, available )
call PlayCinematic( "TutorialOp" )
elseif (cinematicIndex == bj_CINEMATICINDEX_HOP) then
call SetOpCinematicAvailable( bj_CAMPAIGN_INDEX_H, available )
call PlayCinematic( "HumanOp" )
elseif (cinematicIndex == bj_CINEMATICINDEX_HED) then
call SetEdCinematicAvailable( bj_CAMPAIGN_INDEX_H, available )
call PlayCinematic( "HumanEd" )
elseif (cinematicIndex == bj_CINEMATICINDEX_OOP) then
call SetOpCinematicAvailable( bj_CAMPAIGN_INDEX_O, available )
call PlayCinematic( "OrcOp" )
elseif (cinematicIndex == bj_CINEMATICINDEX_OED) then
call SetEdCinematicAvailable( bj_CAMPAIGN_INDEX_O, available )
call PlayCinematic( "OrcEd" )
elseif (cinematicIndex == bj_CINEMATICINDEX_UOP) then
call SetEdCinematicAvailable( bj_CAMPAIGN_INDEX_U, available )
call PlayCinematic( "UndeadOp" )
elseif (cinematicIndex == bj_CINEMATICINDEX_UED) then
call SetEdCinematicAvailable( bj_CAMPAIGN_INDEX_U, available )
call PlayCinematic( "UndeadEd" )
elseif (cinematicIndex == bj_CINEMATICINDEX_NOP) then
call SetEdCinematicAvailable( bj_CAMPAIGN_INDEX_N, available )
call PlayCinematic( "NightElfOp" )
elseif (cinematicIndex == bj_CINEMATICINDEX_NED) then
call SetEdCinematicAvailable( bj_CAMPAIGN_INDEX_N, available )
call PlayCinematic( "NightElfEd" )
elseif (cinematicIndex == bj_CINEMATICINDEX_XOP) then
call SetOpCinematicAvailable( bj_CAMPAIGN_OFFSET_XN, available )
call PlayCinematic( "IntroX" )
elseif (cinematicIndex == bj_CINEMATICINDEX_XED) then
call SetEdCinematicAvailable( bj_CAMPAIGN_OFFSET_XU, available )
call PlayCinematic( "OutroX" )
else
// Unrecognized cinematic - ignore the request.
endif
endfunction
[/jass] 以前提到过这个问题
http://bbs.islga.org/read-htm-tid-33679.html
但是也没什么结果
测试效果是触发执行函数后没有效果
因为很忙,无法过多测试
所以直接问了 |
|