Topic hỏi đáp (tập 4) về cách làm map

Status
Không mở trả lời sau này.
Cho mình hỏi: Download 1 cái system về rồi sử dụng thế nào ???
 
Hỏi thêm câu này nữa:D
2 trig sau làm spell dựa trên Carrion Swarm:
PHP:
TS Int
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Tsunami (AOW)(U)
    Actions
        Set MUI[8] = (MUI[8] + 1)
        -------- Caster&Level --------
        Set TS_Caster[MUI[8]] = (Casting unit)
        Set TS_Level[MUI[8]] = (Level of Tsunami (AOW)(U) for TS_Caster[MUI[8]])
        -------- Check --------
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        TS_Caster[MUI[8]] Equal to HeroesUnit[(Integer A)]
                    Then - Actions
                        Set TS_WaterOfCaster[MUI[8]] = Heroes_Water[(Integer A)]
                    Else - Actions
        -------- Point --------
        Set TS_CasterPoint[MUI[8]] = (Position of TS_Caster[MUI[8]])
        Set TS_TargetPoint[MUI[8]] = (Target point of ability being cast)
        -------- Dummy --------
        Unit - Create 1 Tsunami for (Owner of TS_Caster[MUI[8]]) at TS_CasterPoint[MUI[8]] facing (Angle from TS_CasterPoint[MUI[8]] to TS_TargetPoint[MUI[8]]) degrees
        Set TS_Dummy[MUI[8]] = (Last created unit)
        Unit Group - Add (Last created unit) to Spell_Dummies_Missle
        Unit Group - Add (Last created unit) to Spell_Dummies_NoColour
        Unit - Add Crow Form to (Last created unit)
        Unit - Remove Crow Form from (Last created unit)
        Animation - Change (Last created unit) flying height to (Current flying height of TS_Caster[MUI[8]]) at 0.00
        -------- Countdown --------
        Set TS_Countdown[MUI[8]] = 25
        -------- Timer --------
        Countdown Timer - Start TS_Timer as a One-shot timer that will expire in 0.03 seconds
PHP:
TS Damage
    Events
        Time - TS_Timer expires
    Conditions
    Actions
        For each (Integer A) from 1 to MUI[8], do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        TS_Countdown[(Integer A)] Less than 0
                    Then - Actions
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                TS_Countdown[(Integer A)] Equal to 0
                            Then - Actions
                                Set TS_Countdown[(Integer A)] = (TS_Countdown[(Integer A)] - 1)
                                Unit - Remove TS_Dummy[(Integer A)] from the game
                                Custom script:   call DestroyGroup(udg_TS_VicCreepGroupDone[GetForLoopIndexA()])
                                Custom script:   call RemoveLocation(udg_TS_CasterPoint[GetForLoopIndexA()])
                                Custom script:   call RemoveLocation(udg_TS_TargetPoint[GetForLoopIndexA()])
                            Else - Actions
                                Set TS_Countdown[(Integer A)] = (TS_Countdown[(Integer A)] - 1)
                                -------- Move --------
                                Set TS_DummyStartPoint[(Integer A)] = (Position of TS_Dummy[(Integer A)])
                                Set TS_DummyEndPoint[(Integer A)] = (TS_DummyStartPoint[(Integer A)] offset by (40.00 + (Real((Level of Heart of Tide (AOW)(T) for TS_Caster[(Integer A)])))) towards (Facing of TS_Dummy[(Integer A)]) degrees)
                                Destructible - Pick every destructible within ((10.00 x (Real(((25 - TS_Countdown[(Integer A)]) + (Level of Heart of Tide (AOW)(T) for TS_Caster[(Integer A)]))))) + 40.00) of TS_DummyEndPoint[(Integer A)] and do (Actions)
                                    Loop - Actions
                                        Destructible - Kill (Picked destructible)
                                Unit - Move TS_Dummy[(Integer A)] instantly to TS_DummyEndPoint[(Integer A)]
                                -------- Damage Creeps --------
                                Set TS_Damage[(Integer A)] = (50.00 + ((15.00 x (Real(TS_Level[(Integer A)]))) + ((Real((TS_WaterOfCaster[(Integer A)] / 3))) + (5.00 x (Real((Level of Heart of Tide (AOW)(T) for TS_Caster[(Integer A)])))))))
                                Set TS_VicCreepGroup[(Integer A)] = (Units within (40.00 + (10.00 x (Real(((25 - TS_Countdown[(Integer A)]) + (Level of Heart of Tide (AOW)(T) for TS_Caster[(Integer A)])))))) of TS_DummyEndPoint[(Integer A)] matching ((((((Matching unit) is A Hero) Equal to False) and (((Matching unit) is A st
                                Unit Group - Pick every unit in TS_VicCreepGroup[(Integer A)] and do (Actions)
                                    Loop - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                ((Picked unit) is in TS_VicCreepGroupDone[(Integer A)]) Equal to True
                                            Then - Actions
                                            Else - Actions
                                                Unit Group - Add (Picked unit) to TS_VicCreepGroupDone[(Integer A)]
                                                Unit - Cause TS_Caster[(Integer A)] to damage (Picked unit), dealing TS_Damage[(Integer A)] damage of attack type Hero and damage type Normal
                                Custom script:   call DestroyGroup(udg_TS_VicCreepGroup[GetForLoopIndexA()])
                                -------- Leak --------
                                Custom script:   call RemoveLocation(udg_TS_DummyStartPoint[GetForLoopIndexA()])
                                Custom script:   call RemoveLocation(udg_TS_DummyEndPoint[GetForLoopIndexA()])
                                -------- Timer --------
                                Countdown Timer - Start TS_Timer as a One-shot timer that will expire in 0.03 seconds
Sao lần cast thứ 2,3,...n thì nó lại dam lên 2,3,...n lần nhỉ?:((

ở trigger 1 thì biến HeroesUnit[(Integer A)] là gì ? đã khai báo nó chưa mà đem nó ra xét equal nhỉ :-/
 
@Kukulkan: đã khai báo, là các hero của người chơi. Mà không khai báo cũng có sao đâu?
-----
Ngoài ra các biến không có TS_ ở đầu cũng đã đc khai báo đủ hết rồi
 
function GetUnitsInRangeOfLocMatching takes real radius, location whichLocation, boolexpr filter returns group

Cho e hỏi có cách nào set 1 group = tất cả unit trong range 200 của vị trí loc với điều kiện là enemy và còn sống chỉ = 1 dòng lệnh mà không chia ra các function lẻ tẻ ko?

Làm thế này không được...mỗi lần set group này lại phải dùng cách convert từ GUI qua JASS thành ra mấy cái function lằng nhằng nhìn rất rối.
set g = GetUnitsInRangeOfLocMatching(200,loc,Condition((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(owner))==true)and(( IsUnitAliveBJ(GetFilterUnit()) == true ))))
 
Chỉ cần 2 function thôi mà, nhớ là được. 1 function check điều kiện:

function Check takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) and GetWidgetLife(GetFilterUnit())>0.405
endfunction

call GroupEnumUnitsInRange(GROUP, x, y, 200, Condition(function Check))

Edit: Dùng Jass thì hạn chế loc đi, cứ tọa độ mà tiến !
 
ai hướng dẫn em viết trigger để move target tới điểm cast skill với(di chuyển kiểu skill Time Walk của void trong dota ấy)
 
Cho mình hỏi:
+ Dùng GUI có thể cause damage = damage của hero ko?? (gồm damage trắng + damage xanh lá hoặc damage trắng thôi). Thanks
 
Cho hỏi làm sao để slow speed của unit được như ulti của Medusa (như spell purge mà không base trên purge ấy)
 
Nếu ko dùng purge thì dùng Slow hoặc Cripple:D
 
Cho mình hỏi:
+ Dùng GUI có thể cause damage = damage của hero ko?? (gồm damage trắng + damage xanh lá hoặc damage trắng thôi). Thanks
Hỏi thêm 1 vấn đề nữa là: ai hướng dẫn giúp mình cách làm damage aoe phía trước mặt, giống skill tidebringer của Kunkka trong Dota. thanks lần 2
 
^
^
Còn không thích base spell thì SetUnitSpeed thấp đi,nhưng mà ko set đc unit attackspeed đâu,cho nên tốt nhất là cứ based trên 1 chiêu slow nào đó rồi cho dummy cast ^^
 
cho em hỏi cách làm quái chạy theo 1 đường nhất định dc ko ạ, e ko thấy trong topic các link căn bản ạ
 
Ai chỉ giúp em 2 câu trên đi :(
 
Hỏi thêm 1 vấn đề nữa là: ai hướng dẫn giúp mình cách làm damage aoe phía trước mặt, giống skill tidebringer của Kunkka trong Dota. thanks lần 2

cause damage = damage hero , chaos , spell đều có sẵn hết trong phần deal damage rồi mà :|

còn vụ deal damage theo đường thẳng thì chỉ có jass , có cái system gì đó hồi trước anh Tom có gửi cho tui nhưng giờ ko còn nữa , ông có thể pm anh Tom để xin link :|
 
Ai giúp mình 2 triggers ở trên đó đó đi:D
Khi mình dùng floatingtext để kiểm tra sau mỗi lần damage thì thấy hiện lên rất nhiều lần<-bị deal dam nhiều lần, nhưng không biết sai ở đâu?
 
Cho em hỏi làm sao để khi mà cho thằng được khoanh tròn trong ảnh chạy thì đám lính kế bên chạy theo như kiểu hành quân ấy. Con khoanh tròn là do mình điều khiển, đám kế bên chỉ chạy theo thôi.
 

Attachments

  • di chuyen.JPG
    di chuyen.JPG
    46.4 KB · Đọc: 4
@rongdoVN: sorry bạn hiểu nhầm ý mình rồi, ý mình là deal damage = damage trắng của thằng hero đó.
@Lucifekit: cái Code có xem qua mà khó hiểu quá, anh luci có thể hướng dẫn đơn giản hơn ko? Em ko cần làm skill tidebringer mà chỉ cần biết cách deal damage vào đám enemy tr'c mặt thôi.
 
Thì pick unit ở trước mặt xong deal dame thôi.

Ví dụ vị trí caster là X,vị trí trước mặt là Y(cách x 300 điểm ảnh),pick unit trong khoảng 300 xung quanh điểm Y đó xong deal dame(dame deal = dame đánh lên con đầu tiên)

Có cái spell này không biết làm thế nào :(ko dùng đến custom value nhé)

Spell có 3 lv,Cast spell vào 1 unit --> làm nó dính buff,khi unit tụt máu dưới 50% thì deal dame = 1x,2x,3x intelligence của hero cast spell đó.

Có 2 cái khó ở đây là : Check buff lv bao nhiêu,buff của ai???

Dùng custom value thì dễ rồi,nhưng mà nếu có 2 spell đồng dạng thì chỉ có 1 custom value,còn nếu làm mảng [custom value] thì cứ mỗi unit sinh ra lại mất thêm 1 mảng->nặng.
Còn dùng hashtable thì phải dùng 1.24,mà JNG mới có 1.21 ko có function load unit handle ở hashtable....
 
Chỉnh sửa cuối:
Anh REX giúp làm dùm cái đánh hiện damge( máu của Unit bị mất đó :D) trong map KT. Cám ơn trước
 
Status
Không mở trả lời sau này.
Back
Top