|
目前触发器标签对中文触发的支持不大成功~~但这不影响英文触发~~
这2个标签的使用方法同正常UBB标签~~在被标签内容的首尾分别添加
[trigger]和[/trigger]即可~~
当然更简便的方法是您可以选中被标签内容~~然后点击工具栏新增的工具按钮即可~~
触发器标签的例子:
[trigger]
Create Creep Player
Events
Conditions
Actions
-------- Save start location ID --------
Set cpStartLocID[cpCurrent] = startLocCurrentID
-------- Remove any neutral units from this location --------
Unit Group - Pick every unit in (Units owned by Neutral Hostile matching ((startLocNHCRegions[startLocCurrentID] contains (Matching unit)) Equal to True)) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
-------- Create the Monolith --------
Unit - Create 1 Monolith for cpPlayers[cpCurrent] at (Center of startLocCurrent) facing Default building facing degrees
-------- Create the workers --------
Unit - Create 4 creepWorkers[cpCreepTypes[cpCurrent]] for cpPlayers[cpCurrent] at (Center of startLocCurrent) facing Default building facing degrees
-------- Set starting resources --------
Player - Set cpPlayers[cpCurrent] Current gold to 1000
Player - Set cpPlayers[cpCurrent] Current lumber to 4
-------- Give them a free hero, just like the users --------
Player - Set cpPlayers[cpCurrent] Available free Heroes to 1
-------- Limit training to one hero --------
Player - Limit training of creepHeros[cpCurrent] to 1 for cpPlayers[cpCurrent]
-------- Enforce creep food limit --------
Player - Set cpPlayers[cpCurrent] Food max to creepFoodLimit
-------- Set the player name --------
Player - Set name of cpPlayers[cpCurrent] to creepNames[cpCreepTypes[cpCurrent]]
-------- Start the AI --------
AI - Start melee AI script for cpPlayers[cpCurrent]: creepAIs[cpCreepTypes[cpCurrent]]
[/trigger] 实际显示效果:
[trigger]
Create Creep Player
Events
Conditions
Actions
-------- Save start location ID --------
Set cpStartLocID[cpCurrent] = startLocCurrentID
-------- Remove any neutral units from this location --------
Unit Group - Pick every unit in (Units owned by Neutral Hostile matching ((startLocNHCRegions[startLocCurrentID] contains (Matching unit)) Equal to True)) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
-------- Create the Monolith --------
Unit - Create 1 Monolith for cpPlayers[cpCurrent] at (Center of startLocCurrent) facing Default building facing degrees
-------- Create the workers --------
Unit - Create 4 creepWorkers[cpCreepTypes[cpCurrent]] for cpPlayers[cpCurrent] at (Center of startLocCurrent) facing Default building facing degrees
-------- Set starting resources --------
Player - Set cpPlayers[cpCurrent] Current gold to 1000
Player - Set cpPlayers[cpCurrent] Current lumber to 4
-------- Give them a free hero, just like the users --------
Player - Set cpPlayers[cpCurrent] Available free Heroes to 1
-------- Limit training to one hero --------
Player - Limit training of creepHeros[cpCurrent] to 1 for cpPlayers[cpCurrent]
-------- Enforce creep food limit --------
Player - Set cpPlayers[cpCurrent] Food max to creepFoodLimit
-------- Set the player name --------
Player - Set name of cpPlayers[cpCurrent] to creepNames[cpCreepTypes[cpCurrent]]
-------- Start the AI --------
AI - Start melee AI script for cpPlayers[cpCurrent]: creepAIs[cpCreepTypes[cpCurrent]]
[/trigger]
Jass标签的例子:
[jass]
function IsPlayerEnemyCR takes player pPlayer1, player pPlayer2 returns boolean
return pPlayer1 != pPlayer2
endfunction
[/jass] 实际显示效果
[jass]
function IsPlayerEnemyCR takes player pPlayer1, player pPlayer2 returns boolean
return pPlayer1 != pPlayer2
endfunction
[/jass]
以上~~继续膜拜ing~~ |
|