精華區beta WarCraft 關於我們 聯絡資訊
我把我目前寫的幾個觸發技能貼到版上 看能不能炒熱版上討論WE的風氣XD 這招骨牢,顧名思義就是Diablo2裡死靈法師的骨牢 當初覺得這招真是超帥的,XD 先用一堆白骨之魂,再用骨牢一困‧反應慢一點的就死在裡面了 所以我也設計了一隻技能很像死靈法師的英雄 並且挑了死靈法師最出名的四個技能 分別是「骷髏復甦」「屍爆」「骨牢」「白骨之魂」 骷髏復甦跟白骨之魂的做法相信大家都很清楚,在此就不累述 Wix想要和大家分享的是屍爆和骨牢的觸發寫法 《骨牢》 效果:施展了以後會在目標點的12個方向圍出半徑120的圓    骨牆將會每秒損失15點生命,直到消失為止。骨牆的血量依等級為150、300、450、    600 事前準備:請先製作骨牆單位,最好是依等級分別做出不同的骨牆。      並將骨牆單位的回復生命設為-15、隨時,然後依等級調整生命。 觸發: Kurau 事件 Unit - A unit 使技能生效   條件 (Ability being cast) 等於 骨牢 動作     -------- 先用變數記錄日後方便修改 -------- Set Kurau[1] = ((Target point of ability being cast) offset by 120.00             towards 15.00 degrees) Set Kurau[2] = ((Target point of ability being cast) offset by 120.00 towards 45.00 degrees) Set Kurau[3] = ((Target point of ability being cast) offset by 120.00 towards 75.00 degrees) Set Kurau[4] = ((Target point of ability being cast) offset by 120.00 towards 105.00 degrees) Set Kurau[5] = ((Target point of ability being cast) offset by 120.00 towards 135.00 degrees) Set Kurau[6] = ((Target point of ability being cast) offset by 120.00 towards 165.00 degrees) Set Kurau[11] = ((Target point of ability being cast) offset by 120.00 towards 195.00 degrees) Set Kurau[7] = ((Target point of ability being cast) offset by 120.00 towards 225.00 degrees) Set Kurau[8] = ((Target point of ability being cast) offset by 120.00 towards 255.00 degrees) Set Kurau[9] = ((Target point of ability being cast) offset by 120.00 towards 285.00 degrees) Set Kurau[10] = ((Target point of ability being cast) offset by 120.00 towards 315.00 degrees) Set Kurau[12] = ((Target point of ability being cast) offset by 120.00 towards 345.00 degrees) If (All Conditions are True) then do (Then Actions) else do (Else Actions) 若符合這些條件 (Level of 骨牢 for (Triggering unit)) 等於 1 就執行這些動作 For each (Integer B) from 1 to 12, do (Actions) 迴圈 - 動作 Unit - Create 1 骨牢(Lv1) for 中立額外 at Kurau[(Integer B)] facing 預設建築面對方向 degrees 否則執行這些動作 If (All Conditions are True) then do (Then Actions) else do (Else Actions) 若符合這些條件 (Level of 骨牢 for (Triggering unit)) 等於 2 就執行這些動作 For each (Integer B) from 1 to 12, do (Actions) 迴圈 - 動作 Unit - Create 1 骨牢(Lv2) for 中立額外 at Kurau[(Integer B)] facing 預設建築面對方向 degrees 否則執行這些動作 If (All Conditions are True) then do (Then Actions) else do (Else Actions) 若符合這些條件 (Level of 骨牢 for (Triggering unit)) 等於 3 就執行這些動作 For each (Integer B) from 1 to 12, do (Actions) 迴圈 - 動作 Unit - Create 1 骨牢(Lv3) for 中立額外 at Kurau[(Integer B)] facing 預設建築面對方向 degrees 否則執行這些動作 For each (Integer B) from 1 to 12, do (Actions) 迴圈 - 動作 Unit - Create 1 骨牢(Lv4) for 中立額外 at Kurau[(Integer B)] facing 預設建築面對方向 degrees <End> 寫了那麼落落長一大堆 其實可以寫得更精簡的 ̄▽ ̄||| 不過當初沒有想那麼多 現在重看一次才發現很多東西可以用不同的寫法 不過這種事也不重要了啦(誤) 至於為什麼骨牢要放中立額外呢? 因為我希望骨牢是所有玩家都可以打的 如果希望有其他效果的話也可以設成: 中立被動:必須指定攻擊才會打。 中立敵對:CP怪不會打,所有玩家都會主動攻擊 Owner of (Trigger unit):自軍同盟無法主動攻擊,其他玩者可以 -- 真紅 翠星石 蒼星石      人偶們一起和平生活 雪華崎晶 薔薇水晶 才是真紅女王真正的心願 水銀燈 金糸雀 雛苺 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.128.194.82
pureblue:好酷喔 不錯耶 01/12 11:07
pureblue:我想要閃電亞馬清牛的特效 XD 01/12 11:07
bigfoot: 這麼長,說不定反而會嚇到想入門的XD 推一個~ 01/12 11:07
KenshinCS:唔 WE沒有類似switch case的功能嗎 01/12 11:17
wix3000:其實少掉前面變數記錄的部份就少一半了 01/12 11:22
cycu0315:PUSH 01/12 11:39
rumble0:超酷 01/12 12:10
Carmelo:以前我也有這個想法過 01/12 12:19
omega34:推阿 01/12 12:28
whotear:這篇文章如果不推,那要推哪篇 XDD 01/12 12:36
ralph0619:會寫程式語言 真羨慕 推依個 01/12 12:43
blackjack0s:角度用變數的話比較精簡也比較好改 01/12 12:48
blackjack0s:痾... 我指15 45 那邊 01/12 12:49
nagual:酷 01/12 12:59
lingze:我記得os有招式招樹木困人的~感覺很像@@" 01/12 13:10
DM1984:庫耶 01/12 13:36
DudeFromMars:厲害 01/12 16:40
cycu0315:骷髏復甦 毒星 骨牢 傷害加深 <-- 這樣會不會比較好? 01/12 16:48
cycu0315:畢竟毒系和詛咒系也要加進去才是正統d2的nec呀~ 01/12 16:49
waloloo:于禁九天就很有閃電的味道了 還要寫彈牆壁會不會太... 01/12 18:56