|
星际2 的触发器主要由Event, Condition, Action 三部分组成, 触发器trigger 配上合适的变量可以做胜败条件,任务,对话框啊,分数栏等等。
下面我给个简单的例子。
Untitled Trigger 001
Events
Unit - Barracks 0001 <gen> Dies
Conditions
Actions
Game - Victory Player 1 (Red) (Show dialogs, Show scores)
在这里 兵营灭了1号就赢了
在给个稍微复杂的例子。关于水的颜色。
Begin Water Tint Setup
Events
Map initialization
Conditions
Actions
Wait 1.00 seconds
Set Water_Tint_Red = 100.00
Set Water_Tint_Green = 100.00
Set Water_Tint_Blue = 100.00
Wait 5.00 seconds
Trigger - Turn on Water Tint Change R <gen>
Trigger - Turn on Water Tint Change G <gen>
Trigger - Turn on Water Tint Change B <gen>
Water Tint Change Red
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
Set Water_Tint_Red = (Water_Tint_Red - 1.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Water_Tint_Red Less than or equal to 50.00
Then - Actions
Trigger - Turn off Water Tint Change R <gen>
Else - Actions
Do nothing
Water Tint Change Green
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
Set Water_Tint_Green = (Water_Tint_Green - 1.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Water_Tint_Green Less than or equal to 0.00
Then - Actions
Trigger - Turn off Water Tint Change G <gen>
Else - Actions
Do nothing
Water Tint Change Blue
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
Set Water_Tint_Blue = (Water_Tint_Blue - 1.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Water_Tint_Blue Less than or equal to 0.00
Then - Actions
Trigger - Turn off Water Tint Change B <gen>
Else - Actions
Do nothing
过一会变个色, 最后是深红色了。 |
评分
-
查看全部评分
|