|
发表于 2010-9-3 11:09:48
|
显示全部楼层
CEffectCreatePersistent 和 PeriodicEffectArray 入面可以怎樣產生 random? (因為印象中都是固定的數字.....)
如果用 trigger 幫忙, 就可以用生產技能做.
方法:
給生產技能生產一個 dummy 單位.
trigger (還是那句, 現在在公司, 所以字眼多數有錯, 不過大至思路是這樣):
Event: unit enter entire map
Condition: type of triggering unit = dummy
Action:
switch ((random integer between 1 and 3)
case (1)
=> create 1 marine at position of triggering unit
case (2)
=> create 1 zergling at position of triggering unit
case (3)
=> create 1 zealot at position of triggering unit
)
remove triggering unit from game |
|