Topic hỏi đáp về cách làm map | version 10

Thảo luận trong 'World Editor' bắt đầu bởi Tom_Kazansky, 2/6/11.

Trạng thái chủ đề:
Không mở trả lời sau này.
  1. ZhengHe

    ZhengHe T.E.T.Я.I.S

    Tham gia ngày:
    4/1/09
    Bài viết:
    623
    Cho hỏi cách làm spell như thế này: tạo effect và gây damage khi projectile chạm vào target (projectile ở đây là custom).Thanks
     
  2. dh-g

    dh-g Fire in the hole!

    Tham gia ngày:
    29/8/09
    Bài viết:
    2,654
    Nơi ở:
    Q1 TP.HCM
    cái này đa số xài Storm Bolt set lại lúc stun timer là 0.01 đừng bao h 0.00 ko thì stun mãi =))

    nếu target chạm ngay thì xài Frost Nova :-j
     
  3. goldviper

    goldviper Mario & Luigi Lão Làng GVN

    Tham gia ngày:
    7/1/10
    Bài viết:
    721
    Nơi ở:
    Tổ dân phố
    ^
    ^
    Nếu project là 1 con dummy và target biết di chuyển thì điều này thực sự khó .Liên tục phải set Point cho target trong lúc move dummy đến ( đấy là chưa nói đến target chạy ngang chạy dọc thì cũng ko có cơ sở nào để set Angle mà move ).
    Trừ khi project có tốc độ tương đối lớn.
    Hiện giờ mình cũng chỉ biết làm kiểu Elune's Arrow hơặc Storm Bolt trong Dota.
    Elune's Arrow thì cũng không khác mấy cái spell wave là mấy , chỉ có điều khi slice mà check thấy group này có số lượng unit lớn hơn 0 thì kill project đi , deal dam ramdom 1 unit trong group ( sở dĩ làm thế này để đề phòng có 2 em bị ăn trưởng dù khi set group range rất nhỏ nhưng vẫn có thể xảy ra :) ) , kết thúc trigger.
    Storm Bolt thì đơn giản hơn vì ko phải check gì hết , khi project đến gần Target Point thì set group và deal dam.

    Cách của bạn Dhg mình ko rõ lắm nhưng chắc phải tính vận tốc của project của spell storm bolt để wait và deal dam .Mình dốt lí nên mình nghĩ cách này ko khả thi. :)
     
    Chỉnh sửa cuối: 5/6/11
  4. raivor

    raivor Dragon Quest Lão Làng GVN

    Tham gia ngày:
    24/7/09
    Bài viết:
    1,411
    Slide bình thường, set góc = góc từ point dummy tới point của target, khó chỗ nào :-??. Set point liên tục thì quẳng vào cái trigger every time ?
    Bonus cái map demo. Khi test mình dùng trigger MUI, còn vào WE có cả 2 trigger không MUI và 2 trigger MUI. Còn cái Slow kia mình làm để thể hiện trình nên kệ nó, làm chơi ấy mà :-".
     

    Các file đính kèm:

    Chỉnh sửa cuối: 5/6/11
  5. FlameDrake

    FlameDrake Dragon Quest

    Tham gia ngày:
    1/12/10
    Bài viết:
    1,298
    Nơi ở:
    Quận 10 HCM
    @ lonewolf xem thử có sai gì ko sao làm y chang mà chỉ có 1 rìu bay ra, lúc bay về thì ko remove khỏi game mà vẫn còn yên nguyên lại có cảm giác nó chưa remove leak mặc dù leak đã check xong hết
    [spoil]
    Mã:
    SR Trigger 1
        Events
            Unit - A unit Starts the effect of an ability
        Conditions
            (Ability being cast) Equal to |cffFFCCCCSong R×u M·nh Thó|r 
        Actions
            For each (Integer A) from 1 to 2, do (Actions)
                Loop - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            SR_Dummy[(Integer A)] Equal to No unit
                        Then - Actions
                            Do nothing
                        Else - Actions
                            Unit - Kill SR_Dummy[(Integer A)]
                            Custom script:   call RemoveLocation(udg_SR_Location[bj_forLoopAIndex])
                            Trigger - Turn off SR Trigger 2 <gen>
            Set SR_Caster = (Casting unit)
            Set SR_Location[1] = (Position of SR_Caster)
            Set SR_Location[2] = (Target point of ability being cast)
            Set SR_Angle[1] = ((Angle from SR_Location[1] to SR_Location[2]) - 27.00)
            Set SR_Angle[2] = ((Angle from SR_Location[1] to SR_Location[2]) + 27.00)
            Set SR_Distance = (Distance between SR_Location[1] and SR_Location[2])
            For each (Integer A) from 1 to 2, do (Actions)
                Loop - Actions
                    Set SR_Integer[(Integer A)] = 0
                    Unit - Create 1 SR Dummy for (Owner of SR_Caster) at SR_Location[(Integer A)] facing SR_Angle[(Integer A)] degrees
                    Set SR_Dummy[(Integer A)] = (Last created unit)
                    Unit - Turn collision for SR_Dummy[(Integer A)] Off
            Trigger - Turn on SR Trigger 2 <gen>
            Custom script:   call RemoveLocation(udg_SR_Location[1])
    
    [/spoil]
    [spoil]
    Mã:
    SR Trigger 2
        Events
            Time - Every 0.02 seconds of game time
        Conditions
        Actions
            Set SR_Location[1] = (Position of SR_Caster)
            For each (Integer A) from 1 to 2, do (Actions)
                Loop - Actions
                    Unit - Move SR_Dummy[(Integer A)] instantly to (SR_Location[1] offset by (SR_Distance x (Sin((1.00 x (Real(SR_Integer[(Integer A)])))))) towards SR_Angle[(Integer A)] degrees)
                    Set SR_Integer[(Integer A)] = (SR_Integer[(Integer A)] + 1)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            (Integer A) Equal to 1
                        Then - Actions
                            Set SR_Angle[(Integer A)] = (SR_Angle[(Integer A)] + 0.30)
                        Else - Actions
                            Set SR_Angle[(Integer A)] = (SR_Angle[(Integer A)] - 0.30)
                    Set SR_Damage[(Integer A)] = (Units within 150.00 of (Position of SR_Dummy[(Integer A)]) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is in SR_Damage[(Integer A)]) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of SR_Caster)) Equ
                    Unit Group - Pick every unit in SR_Damage[(Integer A)] and do (Actions)
                        Loop - Actions
                            Unit - Cause SR_Caster to damage (Picked unit), dealing 50.00 damage of attack type Siege and damage type Universal
                            Unit Group - Add (Picked unit) to SR_Damage[(Integer A)]
                            Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Stampede\MissileDeath.mdl
                            Special Effect - Destroy (Last created special effect)
                    Custom script:   call DestroyGroup(udg_SR_Damage[bj_forLoopAIndex])
                    Destructible - Pick every destructible within 150.00 of (Position of SR_Dummy[(Integer A)]) and do (Actions)
                        Loop - Actions
                            Destructible - Kill (Picked destructible)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            SR_Integer[(Integer A)] Equal to 180
                        Then - Actions
                            Trigger - Turn off SR Trigger 2 <gen>
                            For each (Integer A) from 1 to 2, do (Actions)
                                Loop - Actions
                                    Custom script:   call RemoveLocation(udg_SR_Location[bj_forLoopAIndex])
                                    Custom script:   call DestroyGroup(udg_SR_Damage[bj_forLoopAIndex])
                                    Unit Group - Remove all units from SR_Damage[(Integer A)]
                                    Set SR_Dummy[(Integer A)] = No unit
                                    Unit - Remove SR_Dummy[(Integer A)] from the game
                            Set SR_Caster = No unit
                        Else - Actions
                            Custom script:   call RemoveLocation(udg_SR_Location[1])
    
    [/spoil]
    Nếu ông thấy rối wa thì ông làm 1 cái demo cho tui luôn đi :D
     
    Chỉnh sửa cuối: 5/6/11
  6. ntnhan1994

    ntnhan1994 Youtube Master Race

    Tham gia ngày:
    30/5/11
    Bài viết:
    3
    em import mấy cái model nhà, khi bỏ nó len map thì hero lại di xuyen qua được ai giup em voi
     
  7. AzuhaSky

    AzuhaSky T.E.T.Я.I.S

    Tham gia ngày:
    30/5/10
    Bài viết:
    550
    Nơi ở:
    WE Box
    Bạn đặt Pathing Blocked (Ground) quanh nhà hoặc chỗ nào không cho unit đi qua là được!(Doodad -> Pathing Blocked)
     
  8. lonewolf020291

    lonewolf020291 T.E.T.Я.I.S

    Tham gia ngày:
    16/3/07
    Bài viết:
    579
    Nơi ở:
    Toy Box
    Mã:
    Trigger 2
    ..blah blah blah.................................
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            SR_Integer[(Integer A)] Equal to 180
                        Then - Actions
                            Trigger - Turn off SR Trigger 2 <gen>
                            For each (Integer A) from 1 to 2, do (Actions)
                                Loop - Actions
                                    Custom script:   call RemoveLocation(udg_SR_Location[bj_forLoopAIndex])
                                    Custom script:   call DestroyGroup(udg_SR_Damage[bj_forLoopAIndex])
                                    Unit Group - Remove all units from SR_Damage[(Integer A)]
    [B][COLOR="Blue"]                                Unit - Remove SR_Dummy[(Integer A)] from the game
                                    Set SR_Dummy[(Integer A)] = No unit// đổi vị trí 2 cái này[/COLOR][/B]
                            Set SR_Caster = No unit
                        Else - Actions
                            Custom script:   call RemoveLocation(udg_SR_Location[1])
    
    Chú ý: WE_Damage và WE_DamageDone set Size=2
    Spell leak location ở đầu trigger 2 khi bắt đầu slide.

    C1: Vào mục Pathing-Pathing Map và chọn Path phù hợp.
    C2: Tạo pathing blockers quanh ngôi nhà.
     
  9. ZhengHe

    ZhengHe T.E.T.Я.I.S

    Tham gia ngày:
    4/1/09
    Bài viết:
    623
    Ai hướng dẫn giúp mình cách làm damage over time = jass. Thanks
     
  10. FlameDrake

    FlameDrake Dragon Quest

    Tham gia ngày:
    1/12/10
    Bài viết:
    1,298
    Nơi ở:
    Quận 10 HCM
    @ lonewolf: Chịu pó tay rồi, tôi làm cả buổi chiều cũg ko ra, lúc thì rìu bay ra nhưng dealing theo Every, lúc thì dealing 2 lần nhất định thì rìu bay thành vòng tròn, sài đc 4 lần spell là reset máy vì lag, ông rảnh thì làm 1 cái demo dùm tui, spell Wild Axes giống dota càng nhìu càng tốt, nhớ remove hết tất cả leak dùm tui. Thanks trước
     
  11. *darkman*

    *darkman* Mr & Ms Pac-Man

    Tham gia ngày:
    2/1/09
    Bài viết:
    278
    Cho mính hỏi làm sao để tạo 1 em dummy cách xa caster 1 khoảng xác định(1000) khi active spell shockwave ? thanks nhìu
     
  12. FlameDrake

    FlameDrake Dragon Quest

    Tham gia ngày:
    1/12/10
    Bài viết:
    1,298
    Nơi ở:
    Quận 10 HCM
    Các pro cho hỏi ViệtHóa + Doodad nhiều quá có ảnh hưởng gì tới việc remove leak ko ?
    Cũng là 1 spell ( remove leak 100%) mà add vào 1 map trắng thì nó chạy mượt mà, còn add vào 1 map mà Doodad ( > 3000) hay có ViệtHóa nhiều là nó xuất hiện triệu chứng lag.
    P.s: Trong JNGP bản mới nhất có cần chỉnh sửa gì trước khi làm map để remove leak ko, ví dụ như muốn copy spell thì phải Tick vào cái Automatical create avaible ... chẳng hạn
     
  13. Ice_water

    Ice_water Dragon Quest

    Tham gia ngày:
    11/1/07
    Bài viết:
    1,457
    Mã:
    function DOT takes unit c, unit u, real dmg, integer tick, real delay, string e,damagetype type1, attacktype type2 returns nothing
        local integer i  = 1
        local integer k  = tick
        loop
            exitwhen i > k
            call UnitDamageTargetBJ( c, u, dmg, type2, type1 )
            call AddSpecialEffectTargetUnitBJ( "chest", c, e )
            call DestroyEffectBJ( GetLastCreatedEffectBJ() )
            call PolledWait(delay)
            set i = i + 1
        endloop
    endfunction
    Copy đoạn code này vào 1 trigger trắng, chú ý : trigger này phải nằm bên trên trigger skill
    Xài như sau
    Call DOT(c,u,dmg,tick,delay,e,type1,type2)
    C : caster
    U : đối tượng
    Dmg : sát thương (vd : 3.5)
    Delay : khoảng cách giữa 2 lần tạo dmg tính theo giây
    e : tên của hình ảnh mỗi lần gây dmg (vd : "Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl" . ko có thì đặt "")
    type1 : là dmg type
    type : là attack type

    Call DOT(caster,target,50,5,2,"Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl",ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
    caster gây 50dmg lên target mỗi 2 giây và gây dmg 5 lần.
    +++++++++++++++++++++
    Đây là dạng đơn giản nhất. 1 newbie mù về jass cũng có thể dễ dàng mod được. Và các dạng khác khó mod hơn lên mình ko post
     
    Chỉnh sửa cuối: 6/6/11
  14. god_of_the_noob

    god_of_the_noob Mr & Ms Pac-Man

    Tham gia ngày:
    6/3/08
    Bài viết:
    188
    Nơi ở:
    Bốn bể là nhà
    cho mình hỏi 2 thứ:
    làm sao để tạo spell giống spirit bear trog DotA, làm thế nào mà khi chét con gấu vẫn không rơi đồ
    trong map Plains of Snow của Warcraft, model của chú gấu do Beastmaster summon bị đổi thành màu trắng, có cách nào cho nó thàn mà nâu lại đc ko?
     
  15. AzuhaSky

    AzuhaSky T.E.T.Я.I.S

    Tham gia ngày:
    30/5/10
    Bài viết:
    550
    Nơi ở:
    WE Box
    Trường hợp trên hình như không MUI bạn ạ!
    Mình nghĩ ngoại newbie thì nên dùng Intuitive Buff System thì tiện hơn!:)

    ---------- Post added at 08:01 ---------- Previous post was at 07:59 ----------

    Câu thứ nhất mình không trả lời được! Mình không chơi con đó!
    Câu thứ hai xóa Textures trong phần Import của nó đi! Tìm cụ thể thì cứ việc tìm kiểu tên của nó ấy!
     
  16. lonewolf020291

    lonewolf020291 T.E.T.Я.I.S

    Tham gia ngày:
    16/3/07
    Bài viết:
    579
    Nơi ở:
    Toy Box
    Xin lỗi vì đã chỉ nhầm, thật ra thì phần đó không cần loop
    Mã:
    Trigger 2
    ..blah blah blah.................................
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            SR_Integer[(Integer A)] Equal to 180
                        Then - Actions
                            Trigger - Turn off SR Trigger 2 <gen>
                            Custom script:   call RemoveLocation(udg_SR_Location[bj_forLoopAIndex])
                            Custom script:   call DestroyGroup(udg_SR_Damage[bj_forLoopAIndex])
                            Unit Group - Remove all units from SR_Damage[(Integer A)]
    [B][COLOR="Blue"]                        Unit - Remove SR_Dummy[(Integer A)] from the game
                            Set SR_Dummy[(Integer A)] = No unit[/COLOR][/B]
                        Else - Actions
                            Custom script:   call RemoveLocation(udg_SR_Location[1])
    
    Thử xem cái spell này:-". Khi chết thêm effect vào cho nó đẹp là được.
     
  17. zollback

    zollback Youtube Master Race

    Tham gia ngày:
    16/5/10
    Bài viết:
    88
    Mình có mấy câu hỏi:
    -làm sao để load map xong thì vào luôn ko phải đợi player ấn 1 phím bất kì?
    -bạn nào dùng abuff cho mình hỏi về sự khác nhau giữa eventCleanup và eventDestroy?
     
  18. Ice_water

    Ice_water Dragon Quest

    Tham gia ngày:
    11/1/07
    Bài viết:
    1,457
    Hình như không MUI bởi vì nó MUI nếu xài local var. Mà đã xài jass thì cũng nên bỏ xài global var trong nhiều trường hợp.
     
    Chỉnh sửa cuối: 6/6/11
  19. kissofaries

    kissofaries Dragon Quest

    Tham gia ngày:
    11/3/07
    Bài viết:
    1,463
    Nơi ở:
    Kalimdor
    Cần hướng dẫn làm DoT = trigger :D
     
  20. Ice_water

    Ice_water Dragon Quest

    Tham gia ngày:
    11/1/07
    Bài viết:
    1,457
    Đọc cái trigger mình post chỉ xài có 2 action mà bạn cũng ko hiểu thì mình chịu rồi #-o Không thể giúp hơn.
     
Trạng thái chủ đề:
Không mở trả lời sau này.

Chia sẻ trang này