找回密码
 点一下
查看: 1883|回复: 5

[公告]触发器和Jass标签的按钮已经被正式添加到论坛帖工具栏

  [复制链接]
发表于 2007-2-3 21:34:45 | 显示全部楼层 |阅读模式
目前触发器标签对中文触发的支持不大成功~~但这不影响英文触发~~

这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~~
 楼主| 发表于 2007-2-3 21:35:56 | 显示全部楼层
这二个标签的重新实现人素A君呢~~其实早就重新开放老~~只是界面上没有出现图标而已嗯嗯~~
回复

使用道具 举报

发表于 2007-2-3 21:37:18 | 显示全部楼层
code消失鸟...
回复

使用道具 举报

 楼主| 发表于 2007-2-3 21:40:43 | 显示全部楼层
太渣了~~重来
回复

使用道具 举报

发表于 2007-2-3 21:55:34 | 显示全部楼层
应该全论坛置顶呢...
回复

使用道具 举报

发表于 2007-2-12 02:35:56 | 显示全部楼层
太渣了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-6-23 09:35 , Processed in 0.030336 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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