|
发表于 2010-8-7 20:12:33
|
显示全部楼层
先做一个函数GetUnitActorIcon(),取Actor的UnitIcon字段。
[trigger]
Get Unit Actor Icon
Options: Function
Return Type: String
Parameters
UnitId = "" <String>
Grammar Text: Get UnitId Actor Icon
Hint Text: (None)
Custom Script Code
Local Variables
Actions
General - Return (Value of Actors UnitId "UnitIcon" for player 0)
[/trigger]
下面这个是测试用触发器
[trigger]
Test
Events
Game - Player Any Player types a chat message containing "", matching Partially
Local Variables
Conditions
Actions
Debug - Display (Text((Get (Entered chat string) Actor Icon))) as debug output using Type 1, and Do display it in the game window
[/trigger]
注意,大小写敏感,比如必须输入"Gateway"否则就读不出来。
附件是演示 |
|