请选择 进入手机版 | 继续访问电脑版

中国星际RPG联盟

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5776|回复: 2

Hyper Triggers

[复制链接]
发表于 2013-8-20 20:56:11 | 显示全部楼层 |阅读模式
#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
回复

使用道具 举报

发表于 2014-7-14 22:34:10 | 显示全部楼层
通常,复杂的地图或地图需要动作的每个触发循环将导致地图滞后,导致CPU负载运行触发12次每1.008秒。幸运的是超触发器,等待的时间可以进行定制,以确定多少每秒的触发器将运行。因为在大多数情况下不需要运行超触发器允许快速的星际争霸,无意图的滞后往往是通过尝试运行引起的触发的速度比是必要的。



大多数这样的误解似乎都集中在一个混乱在等待行动实际上做的是什么。当电脑遇到等待行动将在约1 /第十二秒运行一个完整的触发周期,然后等待时间的安排。一个孤立的等(0)的行动将在1 /第十二秒运行两个触发周期,而一个孤立的等(168)的行动将运行一个周期在1 /第十二秒,一个周期的等待1 /第六秒后。



基本上,星际争霸总是运行触发器,1 /第十二秒,无论触发周期之间的冷却时间是多久。等待的动作,如果使用得当,定制这个冷却时间地图切割者的愿望,不管怎样,至少有84毫秒。在普通高等(84)就相当于在高集等(0),只是因为星际触发周期不会重复的速度比84毫秒。



运用这种理解,说你想运行一个触发周期每秒6次而不是12整个游戏。你会使用一些类似于上面的共同hypertrigger,除非你在168毫秒的等待而不是84或0毫秒:



代码



行动:



触发



评论。&quot;超触发”;



等待168毫秒



等待168毫秒



等待168毫秒



等待168毫秒



等待168毫秒



(用同样的等填满)



四次,每1.008秒就有252毫秒,三次是336毫秒,等。



使用此页上的知识可以完全定制的时候,以及如何快速你的触发器的运行,消除地图滞后和优化定时触发。使用相结合的简单的超触发器和开关超触发器,了解如何添加更多的等待动作影响多少触发周期将重置过早,和不同的等待时间,一个制图总量控制。
回复 支持 反对

使用道具 举报

发表于 2014-7-15 12:18:32 | 显示全部楼层
骚瑞看不懂。。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|网站统计|手机版|小黑屋|中国星际RPG联盟    

GMT+8, 2024-4-18 23:10 , Processed in 1.187507 second(s), 20 queries .

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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