找回密码
 点一下
查看: 2914|回复: 4

如何在本论坛中粘贴触发器??

[复制链接]
发表于 2006-4-19 01:27:58 | 显示全部楼层 |阅读模式
在GA论坛中,展示你的触发器不需要上传图片的。可以直接拷贝文本,可以获得跟触发器编辑器中一样的视觉效果。

方法1(使用飞雪“地精War3内码转换器[推荐]):
示例(以下面的中文触发器为例子):
1)在触发器编辑器右框中右键点触发器名称,如本例子的“对战初始化”-->“拷贝作为文本”-->
2)打开“地精War3内码转换器”,点击“一键转换”按纽可以实现单个TRIGGER的“清空”+“粘贴”+“转换”+“复制”的功能。如果需要同时转化多个TRIGGER,[可多次使用步骤1)后使用“粘贴”功能]-->转换-->复制
3)在本论坛发贴编辑器中“粘贴”--> 全选中刚刚粘贴的触发器 --> 在编辑工具栏里点 --> 。。。--> 发表帖子便可以了


方法2(使用飞雪TextPainter):
示例(以下面的中文触发器为例子):
1)在触发器编辑器右框中右键点触发器名称“对战初始化”-->“拷贝作为文本”-->
2)在TextPainter中的操作:打开TextPainter -->点TextPainter的“UTF-8编辑”-->右键点“粘贴”-->点“文本编辑”-->点“复制”

3)在本论坛发贴编辑器中“粘贴”--> 全选中刚刚粘贴的触发器 --> 在编辑工具栏里点 --> 。。。--> 发表帖子便可以了

如果是用英文版的WE,不需要使用UNICODE<-->ANSI的转换工具TextPainter,忽略第2)步,直接按1)所说“copy as text”,粘贴上来便可以了。

TextPainter 下载地址:http://bbs.ourga.com:8080/forum/attachment.php?aid=570

以下是例子:

[trigger]对战初始化
    事件
        Map initialization
    环境
    动作
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - 环境
            Then - 动作
                对战游戏 - Use melee time of day (for all players)
                对战游戏 - Limit Heroes to 1 per Hero-type (for all players)
                对战游戏 - Give trained Heroes a Scroll of Town Portal (for all players)
                对战游戏 - Remove creeps and critters from used start locations (for all players)
            Else - 动作
                对战游戏 - Set starting resources (for all players)
                对战游戏 - Create starting units (for all players)
        对战游戏 - Run melee AI scripts (for computer players)
        对战游戏 - Enforce victory/defeat conditions (for all players)[/trigger]
发表于 2006-4-20 17:02:35 | 显示全部楼层

试试

function Trig_bagua_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == \'A04T\' ) ) then
        return false
    endif
    return true
endfunction

function Trig_bagua_Func003Func005001002001 takes nothing returns boolean
    return ( IsPlayerAlly(GetOwningPlayer(GetFilterUnit()), GetTriggerPlayer()) == true )
endfunction

function Trig_bagua_Func003Func005001002002 takes nothing returns boolean
    return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) != true )
endfunction

function Trig_bagua_Func003Func005001002 takes nothing returns boolean
    return GetBooleanAnd( Trig_bagua_Func003Func005001002001(), Trig_bagua_Func003Func005001002002() )
endfunction

function Trig_bagua_Func003Func005A takes nothing returns nothing
    call UnitAddAbilityBJ( \'A051\', GetEnumUnit() )
    call AddSpecialEffectTargetUnitBJ( \"overhead\", GetEnumUnit(), \"Abilities\\\\Spells\\\\NightElf\\\\FaerieDragonInvis\\\\FaerieDragon_Invis.mdl\" )
    call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction

function Trig_bagua_Func003C takes nothing returns boolean
    if ( not ( ( ( ( GetHeroStatBJ(bj_HEROSTAT_INT, GetTriggerUnit(), true) + GetRandomInt(1, 12) ) - ( GetHeroStatBJ(bj_HEROSTAT_INT, udg_unit1sthero[GetConvertedPlayerId(ForcePickRandomPlayer(GetPlayersEnemies(GetTriggerPlayer())))], true) + ( 5 + GetRandomInt(1, 7) ) ) ) + 1 ) > 0 ) ) then
        return false
    endif
    return true
endfunction

function Trig_bagua_Actions takes nothing returns nothing
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 10
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        call PanCameraToTimedLocForPlayer( udg_playerexist[GetForLoopIndexA()], GetUnitLoc(GetSpellTargetUnit()), 1.00 )
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    call TriggerSleepAction( 2 )
    if ( Trig_bagua_Func003C() ) then
        call DisplayTextToForce( GetPlayersAll(), ( ( \"|c0000ff00\" + ( GetUnitName(GetTriggerUnit()) + \"|r\" ) ) + ( \"的\" + ( ( GetAbilityName(GetSpellAbilityId()) + \"使用成功\" ) + \"\" ) ) ) )
        call CreateTextTagLocBJ( \"TRIGSTR_1867\", GetUnitLoc(GetSpellTargetUnit()), 0, 60.00, 0.00, 100, 50.00, 100.00 )
        call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 5 )
        call ForGroupBJ( GetUnitsInRectMatching(RectFromCenterSizeBJ(GetUnitLoc(GetSpellTargetUnit()), 300.00, 400.00), Condition(function Trig_bagua_Func003Func005001002)), function Trig_bagua_Func003Func005A )
    else
        call DisplayTextToForce( GetPlayersAll(), ( ( \"|c0000ff00\" + ( GetUnitName(GetTriggerUnit()) + \"|r\" ) ) + ( \"的\" + ( ( GetAbilityName(GetSpellAbilityId()) + \"使用失败\" ) + \"\" ) ) ) )
    endif
endfunction

//===========================================================================
function InitTrig_bagua takes nothing returns nothing
    set gg_trg_bagua = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_bagua, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( gg_trg_bagua, Condition( function Trig_bagua_Conditions ) )
    call TriggerAddAction( gg_trg_bagua, function Trig_bagua_Actions )
endfunction
回复

使用道具 举报

发表于 2006-4-20 17:03:56 | 显示全部楼层

O shit!

直接粘贴?????
而且必须下载那个玩意?
TextPainter 下载地址:http://bbs.ourga.com/attachment.php?aid=570
回复

使用道具 举报

发表于 2006-4-20 19:23:50 | 显示全部楼层
那上是UTF8转ANSI的工具。如果不用。会乱码的。
当然。也可以用其它工具来转。。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-9 04:13 , Processed in 0.050932 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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