找回密码
 点一下
查看: 2265|回复: 7

使用有限变量播放多个音效系统

[复制链接]
发表于 2008-11-30 22:34:43 | 显示全部楼层 |阅读模式
默认有7个必然创建但在对战不被使用的sound handle
制作一个音效与空白夹杂的大音效,写函数通过自己定义的事件对应到音效的某一时刻。通过默认每30秒一次的触发清理2个周期以前播放的音效,而后可以再使用。

用该地图代替原版去看一盘标准录像。

或者与人对战。对手选人族。就会听到造的兵是什么。




声音大杂烩

音效1 + 空白 + 音效2 + 空白....
------------   ------------
   1分钟            1分钟     .....



global sound lastusedsound //最后使用的音效


sound s1 //代表可以使用的7个sound handle,使用文件一样,都为大杂烩音效
...


sound s7

integer S1_period = 比如 18 //s1 handle最后一次播放是在哪个30秒时期
...

integer s7_period


integer playperiod = 比如18 //每次30秒触发自增



function GetAvailableSound takes nothing returns sound //在s1-s7轮询
local sound available
if playperiod == 0 then
return s1
endif

if lastusedsound == s1 then
set available = s2
elseif...


...


endif
call StopSound(available)
set lastusedsound = available
return available
endfunction




function SetSoundPlayPeriod takes sound s returns nothing
if s == s1 then
set s1_period = playperiod //设定s1是在现在的30秒范围内播放的
elseif..
..
endif
endfunction



function SetSoundPlayPosById takes sound s, integer i returns nothing
if i == 'Hamg' then //如果是某兵种
    call SetSoundPlayPosition(s, ....) //每个兵种对应1分钟
elseif..
...
endif
endfunction


//应用//////
local sound nowplaying

set unitid = ... //得到造的兵

set nowplaying = GetAvailableSound()
call startsound(nowplaying)
call SetSoundPlayPeriod(nowplaying)
call SetSoundPlayPosById(nowplaying,unitid)

(2)EchoIsles.w3x

994 KB, 下载次数: 39

发表于 2008-12-1 16:14:42 | 显示全部楼层
内置MH?````再加个小地图上显示英雄位置吧
回复

使用道具 举报

发表于 2008-12-2 17:19:56 | 显示全部楼层
诶~那么请精灵同学讲讲如何使魔兽将不同脚本效验为同一吧~
回复

使用道具 举报

 楼主| 发表于 2008-12-3 01:20:09 | 显示全部楼层
察看一下该地图的J文件尾部就知道了。。。。
回复

使用道具 举报

发表于 2008-12-6 12:41:18 | 显示全部楼层
确认一下,当真真是crc效验?crc32/16都对不上,md5也不是,还是说用魔兽特定的生成多项式?xantan那厮该不会使坏玩烟雾罢?

Blizzard.zip

59 KB, 下载次数: 20

(2)EchoIsles.w3x

115 KB, 下载次数: 14

回复

使用道具 举报

 楼主| 发表于 2008-12-8 18:48:59 | 显示全部楼层
附件是虾米?

软件不是我做的,总之他能够骗过war3校验是事实
回复

使用道具 举报

发表于 2008-12-8 19:39:18 | 显示全部楼层
我真为魔兽界有你这个人才高兴.. .
回复

使用道具 举报

发表于 2008-12-8 20:37:22 | 显示全部楼层
貌似素自定义多项式的CRC32.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-5-4 22:06 , Processed in 0.132708 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表