|
#Define Hyper trigger AS 超级触发,加速触发
--------------------------------------------------------------------------------
超级触发,是用Wait命令加速触发的执行速度而的.使用它某,触发的执行速度可达8.0触发循环/游戏秒[折合11.9触发循环/现实秒]
通常,触发两秒循环一次,但当使用wait的时候,触发会提前重复.超级出发就是一组长期执行的wait命令,让触发的执行周期缩短到制图者需要的程度.
常用的
--------------------------------------------------------------------------------
最常用的方法就是在一个没有wait触发的玩家上写超级触发.注意,一个突出的缺点是超级触发如果长期执行,那么它极有可能造成严重的等待延迟.
如果你在一个玩家上加了超级触发,那么你绝对不要再给他任何含有wait命令的触发.这就是我们极不建议给All Players或者某个Forces加超级触发的原因.
为了绕过wait这个缺点,我们推荐用死亡计数器的计时用途.
另一种可能的问题就是,这种形式的触发可能会由于NEO[Next Ending Occurence]而出现误差.NEO会在下面详细解释.要避免NEO的话,把超级触发拷贝3份就足够避免NEO了,更多只会浪费空间.
超级触发一般是这样的
Code
Players:
(一个所有触发都不含wait命令的玩家. 请避免使用Forces或者All players.)
Conditions:
Always.
Actions:
Preserve trigger
Comment. \"Hyper Trigger\"
Wait 0 milliseconds
Wait 0 milliseconds
Wait 0 milliseconds
Wait 0 milliseconds
Wait 0 milliseconds
(剩下的用Wait填满)
开关型加速触发
--------------------------------------------------------------------------------
这种类型的加速没有NEO,但它没那么简单.它仍然需要一个一个所有触发都不含wait命令的玩家.这种方法不会造成等待延迟.而且这种方法可以灵活的开/关超级触发.
Code
Players:
(Player \"X\")
Conditions:
Switch 1 is set.
Actions:
Preserve trigger.
Comment. \"Clear\"
Wait 0 milliseconds.
Clear Switch 1.
Code
Players:
(Player \"Z\")
Conditions:
Always
Actions:
Preserve trigger.
Comment. \"Set\"
Wait 0 milliseconds.
Set Switch 1.
Wait 0 milliseconds.
计算NEO
--------------------------------------------------------------------------------
NEO的发生频率可用一下公式计算:
NEO=(单条加速触发内Wait的数量+1)加速触发的条数 * 0.084 秒[单条加速触发内Wait的数量 <64,加速触发的条数>0]
几个例子,假如有4条加速触发,每个触发里有62个Wait命令.那么触发看起来就像这样:
[62][62][62][62]
[]=超级触发
62=Wait的数量
NEO = (62 + 1)4 * 0.084 秒
NEO = 634 * 0.084 秒
NEO = 15792161 * 0.084 秒
NEO = 1323248.724 秒
1323248.724 秒差不多是367.56909小时,差不多2周来一次NEO. 脑子正常的人不会一直玩一个地图两周吧?
加速触发与地图Lag
--------------------------------------------------------------------------------
以下内容用处不多,我就不翻译了.就是当你的地图因为触发的原因Lag的时候.用时间值大的加速触法或者优化你所有的触发吧.
如果你想翻译的话.翻译完后编辑掉英文的部分.把你翻译后的内容粘上去.然后短消息找我.我给你加分
Often, complex maps or maps that require actions every trigger cycle will cause map lag, due to the CPU load of running triggers 12 times every 1.008 seconds. Fortunately with hyper triggers, the Wait time can be customized to determine how many cycles per second the triggers will run. Since in most cases it is not necessary to run hyper triggers as fast as Starcraft allows, unintentional map lag is often caused by attempting to run triggers faster than is necessary.
Most of this misunderstanding seems to be centered on a confusion around what the Wait action actually does. When the computer comes across a wait action it will run a full trigger cycle at approximately 1/12th of a second, then wait the alotted time. An isolated Wait(0) action will thus run two trigger cycles at 1/12th of a second, whereas an isolated Wait(168) action will run one cycle at 1/12th of a second and one cycle after waiting 1/6th of a second.
Basically, Starcraft always runs triggers at 1/12th of a second, regardless of how long the cooldown between trigger cycles is. The Wait action, when used properly, customizes this cooldown to whatever the mapmaker wishes, with a minimum of 84 milliseconds. Common hypers at Wait(84) are thus equivalent to hypers set at Wait(0), simply because the trigger cycle in Starcraft will NOT repeat faster than 84 milliseconds.
Applying this understanding, say you wanted to run a trigger cycle 6 times every second instead of 12 throughout the entire game. You would use something similar to the common hypertrigger above, except with your wait set at 168 milliseconds instead of 84 or 0 milliseconds:
Code
Actions:
Preserve trigger
Comment. \"Hyper Trigger\"
Wait 168 milliseconds
Wait 168 milliseconds
Wait 168 milliseconds
Wait 168 milliseconds
Wait 168 milliseconds
(用同样的Wait填满)
Four times every 1.008 seconds would be 252 milliseconds, three times would be 336 milliseconds, etc.
Using the knowledge on this page it is possible to fully customize when and how fast your triggers are running, eliminate map lag and optimize trigger timing. Using a combination of simple hyper triggers and switch hyper triggers, an understanding of how adding more Wait actions influences how many trigger cycles will reset prematurely, and varying wait times, a mapmaker has total control.
(PS:使用Hyper Triggers时,循环的触发数量过多,可能导致录像不能正常播放,单位不响应玩家操作,最后录像和实际不符)
BY linyifei |
|