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. Ryanpzo9

    Ryanpzo9 Donkey Kong

    Tham gia ngày:
    20/10/08
    Bài viết:
    326
    Mã:
    Earth Wave Moving (Initially ON)
    
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to EarthWaveIndex, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        EarthWaveDistance[(Integer A)] Greater than 0.00
                    Then - Actions
                        Unit - Make EarthWaveCaster[(Integer A)] Vulnerable
                        Unit - Turn collision for EarthWaveCaster[(Integer A)] Off
                        Animation - Change EarthWaveCaster[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
                        [COLOR="#0000FF"]Set EarthWaveLoc = (Position of EarthWaveCaster[(Integer A)])[/COLOR]                    Set EarthWaveDistance[(Integer A)] = (EarthWaveDistance[(Integer A)] - 45.00)
                        Unit - Move EarthWaveCaster[(Integer A)] instantly to (EarthWaveLoc offset by 45.00 towards EarthWaveAngle[(Integer A)] degrees)
                        Special Effect - Create a special effect at EarthWaveLoc using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Create 1 Earth Wave Dummy for (Owner of EarthWaveCaster[(Integer A)]) at EarthWaveLoc facing Default building facing degrees
                        Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
                        Unit - Set level of Earth Wave Dummy  for (Last created unit) to (Level of Earth Wave  for EarthWaveCaster[(Integer A)])
                        Unit - Order (Last created unit) to Neutral - Slam
                        Custom script:   call RemoveLocation(udg_EarthWaveLoc)
                    Else - Actions
                        Unit - Turn collision for EarthWaveCaster[(Integer A)] On
                        Unit - Make EarthWaveCaster[(Integer A)] Vulnerable
                        Animation - Change EarthWaveCaster[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
    
    Ai kiểm tra dùm mình xem cái trigger này có leak chỗ nào ko... Theo kinh nghiệm của mình thì chỉ có mỗi cái dòng xanh kia thôi thì đã remove ở mỗi 0.03s rồi. Và bên cạnh đấy thì ai có thể chỉ dùm mình cách deal dmg cho các unit như kiểu wave của Morphling trong DotA ấy. Mình cũng biết là sẽ pick 1 khoảng nhỏ toàn bộ unit trong cái vùng con Morph đi qua nhưng ko biết làm thế nào để cho nó chỉ gây dmg 1 lần qua các unit đó tại cái trigger trên là đang làm skill Waveform của Morph nhưng nếu cứ 0.03s di chuyển con hero 1 lần với khoảng cách có 45 range mà pick trong khoảng 225 thì nó sẽ gây dmg liên tục trong khoảng 4 5 lần vào những unit nó đi qua... Ai có lòng thì chỉ hộ mình với...
     
  2. Tom_Kazansky

    Tom_Kazansky

    Tham gia ngày:
    28/12/06
    Bài viết:
    3,454
    Nơi ở:
    Hà Nội
    Deal dmg 1 lần:

    - tạo 1 unit group, tạm đặt tên là HitGroup
    - khi pick unit xung quanh để deal dmg thì thêm điều kiện: Boolean Comparison \ Unit - Unit in Unit Group(Matching unit) is in (Hit Group) equals to False
    - sau khi deal dmg cho 1 unit xong, add unit này vào HitGroup
    - sau khi spell đã "xong", clear HitGroup

    giải thích:
    - HitGroup là unit group chứa các unit đã nhận damage
    - khi pick các unit xung quanh, thêm điều kiện (Matching unit) is in (Hit Group) equals to False nghĩa là unit thỏa mãn điều kiện phải KHÔNG ở trong HitGroup (tức là CHƯA nhận damage)
    - 1 unit nhận dmg xong thì sẽ được thêm vào HitGroup
    - khi spell kết thúc, ko cần thiết group này nữa, Clear luôn

    ------------
    về trigger trên, các (Integer A) nên cho vào biến, sẽ hiệu quả hơn.

    đoạn
    Mã:
    Unit - Make EarthWaveCaster[(Integer A)] Vulnerable
    Unit - Turn collision for EarthWaveCaster[(Integer A)] Off
    Animation - Change EarthWaveCaster[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
    
    chỉ cần dùng 1 lần lúc "start effect", đâu cần chạy đi chạy lại đoạn này?

    đã biết cách "deal dmg 1 lần" rồi thì bỏ vụ dummy cast Slam đi
     
  3. Ryanpzo9

    Ryanpzo9 Donkey Kong

    Tham gia ngày:
    20/10/08
    Bài viết:
    326
    Thx anh vì cái khoản deal dmg :D Cái slam thực ra ko có dmg mà chỉ là effect slow thôi :D Lướt qua con nào con đấy bị slow ý mà anh :D Còn cái đoạn code này em đã thử cho vào lúc cast đầu rồi nhưng mà chả hiểu sao nó cóc invul + transper + Collision off ==! Thế nên mới phải để mỗi 0.03s. Nhưng mà chắc cũng chả sao đâu anh nhỉ?

    ---------- Post added at 11:51 ---------- Previous post was at 11:31 ----------

    Tiện thể anh coi lại luôn hộ em có phải thế này ko. Đã pick đã add mà vẫn gây dmg đến mấy lần 8-}

    Mã:
    Actions
        For each (Integer A) from 1 to EarthWaveIndex, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        EarthWaveDistance[(Integer A)] Greater than 0.00
                    Then - Actions
                        Unit - Make EarthWaveCaster[(Integer A)] Vulnerable
                        Unit - Turn collision for EarthWaveCaster[(Integer A)] Off
                        Animation - Change EarthWaveCaster[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
                        Set EarthWaveLoc = (Position of EarthWaveCaster[(Integer A)])
                        Set EarthWaveDistance[(Integer A)] = (EarthWaveDistance[(Integer A)] - 45.00)
                        Unit - Move EarthWaveCaster[(Integer A)] instantly to (EarthWaveLoc offset by 45.00 towards EarthWaveAngle[(Integer A)] degrees)
                        Special Effect - Create a special effect at EarthWaveLoc using Stonespear.mdx
                        Special Effect - Destroy (Last created special effect)
                        Special Effect - Create a special effect at EarthWaveLoc using Abilities\Spells\Orc\EarthQuake\EarthQuakeTarget.mdl
                        Special Effect - Destroy (Last created special effect)
                        [COLOR="#0000FF"]Set EarthWaveGroup[(Integer A)] = (Units within 225.00 of EarthWaveLoc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is in EarthWaveHitGroup) Equal to False and ((Matching unit) is belong to an enemy of (Owner of (EarthWaveCaster(Integer A))) Equal to True)[/COLOR]                    Unit Group - Pick every unit in EarthWaveGroup[(Integer A)] and do (Actions)
                            Loop - Actions
                                If ((Level of Earth Wave  for EarthWaveCaster[(Integer A)]) Equal to 1) then do (Unit - Cause EarthWaveCaster[(Integer A)] to damage (Picked unit), dealing 105.00 damage of attack type Spells and damage type Normal) else do (Do nothing)
                                If ((Level of Earth Wave  for EarthWaveCaster[(Integer A)]) Equal to 2) then do (Unit - Cause EarthWaveCaster[(Integer A)] to damage (Picked unit), dealing 155.00 damage of attack type Spells and damage type Normal) else do (Do nothing)
                                If ((Level of Earth Wave  for EarthWaveCaster[(Integer A)]) Equal to 3) then do (Unit - Cause EarthWaveCaster[(Integer A)] to damage (Picked unit), dealing 205.00 damage of attack type Spells and damage type Normal) else do (Do nothing)
                                If ((Level of Earth Wave  for EarthWaveCaster[(Integer A)]) Equal to 4) then do (Unit - Cause EarthWaveCaster[(Integer A)] to damage (Picked unit), dealing 255.00 damage of attack type Spells and damage type Normal) else do (Do nothing)
                                If ((Level of Earth Wave  for EarthWaveCaster[(Integer A)]) Equal to 5) then do (Unit - Cause EarthWaveCaster[(Integer A)] to damage (Picked unit), dealing 305.00 damage of attack type Spells and damage type Normal) else do (Do nothing)
                                [COLOR="#0000FF"]Unit Group - Add (Picked unit) to EarthWaveHitGroup[/COLOR]
                        Unit - Create 1 Earth Wave Dummy for (Owner of EarthWaveCaster[(Integer A)]) at EarthWaveLoc facing Default building facing degrees
                        Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
                        Unit - Set level of Earth Wave Dummy  for (Last created unit) to (Level of Earth Wave  for EarthWaveCaster[(Integer A)])
                        Unit - Order (Last created unit) to Neutral - Slam
                        Custom script:   call DestroyGroup(udg_EarthWaveGroup[GetForLoopIndexA()])
                        Custom script:   call RemoveLocation(udg_EarthWaveLoc)
                    Else - Actions
                        [COLOR="#0000FF"]Unit Group - Remove all units from EarthWaveHitGroup[/COLOR]
                        Unit - Turn collision for EarthWaveCaster[(Integer A)] On
                        Unit - Make EarthWaveCaster[(Integer A)] Vulnerable
                        Animation - Change EarthWaveCaster[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
    
    Làm MUI = GUI rắc rối thật ==! Mỗi tội h em mới đang chập chững học C nên chưa dám động vào Jass ==!
     
  4. Ăn xong dong

    Ăn xong dong Mr & Ms Pac-Man

    Tham gia ngày:
    7/6/11
    Bài viết:
    136
    Ai chỉ dùm làm sao Shop bán nhìu Item cho hero cùng 1 lúc ? Thanks nhìu
     
  5. kingghot

    kingghot Mr & Ms Pac-Man

    Tham gia ngày:
    15/4/10
    Bài viết:
    290
    Nơi ở:
    Rach Gia
    Hỏi:

    ai cho tôi trigger như sau đậy giùm

    sau khi giết unti A thì người giết sẽ bị tất cả trong đó có team đánh lại
     
  6. goldviper

    goldviper Mario & Luigi Lão Làng GVN

    Tham gia ngày:
    7/1/10
    Bài viết:
    715
    Nơi ở:
    Tổ dân phố
    ^3x
    Sao lại hết trigger slice rồi ko turn off lại , vậy distance nó less than 0 vẫn slice tiếp sao
    Cái phần dam nên cho vào biến ( 55 + (50xlevel skill)) để tránh có đến tận 5 dòng deal dam
    Thử cho cái dòng add vào group lên trên cái phần deal dam xem :-?

    Mọi người cho hỏi cái skill Spiked Carapace " Giáp gai " của bọ hung.
    Nó có cái phần Data - Recieved Damage Factor mặc định là 1.00
    vd: vậy chỉnh nó cao lên 2.00 rồi add cho 1 unit thì unit đó sẽ nhận số dam gấp 2 lần bình thường phải ko.
     
  7. Ryanpzo9

    Ryanpzo9 Donkey Kong

    Tham gia ngày:
    20/10/08
    Bài viết:
    326
    Mình làm MUI bạn ạ :) Cho nên ko turn on turn off gì hết. Non-MUI thì mình làm nhuyễn rồi nên h làm MUI để còn chơi cái trò mua bán skill :D
     
  8. royal309

    royal309 Youtube Master Race

    Tham gia ngày:
    21/7/09
    Bài viết:
    12
    hjx ko ai trả lời dùm em sao?
    :((
     
  9. Ryanpzo9

    Ryanpzo9 Donkey Kong

    Tham gia ngày:
    20/10/08
    Bài viết:
    326
    Hãy sử dụng luôn trigger khi time về 0. Nôm na là như thế này:
    Mã:
    Events
    Time-Timer[1]expires
    Conditions
    none
    Actions
    Countdown Timer-Pause Timer[1]
    Countdown Timer-Destroy TimerWindows[1]
    Set BossLoc = <Vị trí cần tạo boss>
    Unit - Creat 1 <Boss> for <Team Tấn Công> At BossLoc facing v...v...
    Set Boss = (Last Created Unit)
    Set AttackLoc = <Vị trí cho boss đến tấn công>
    Unit - Order Boss To Attack-Move to AttackLoc
    Custome Script: call RemoveLocation(udg_BossLoc)
    Custome Script: call RemoveLocation(udg_AttackLoc)
    Trigger - Add to <Win> new event (Boss Die)
    
    Mã:
    Win (Initially ON)
    
    Events //Ko cần vì đã add event ở trigger trên
    Conditions
    Actions
    Set WinGroup = <All Players của phe Def >
    Player Group - Pick every players in WinGroup and do (Action)
          Loop-Action
                 Game - Victory for (Picked Player), show v..v...
    Custome Script: call DestroyForce(udg_WinGroup) //Hết xừ game rồi chắc chả cần hủy leak đầu =))
    
     
  10. AzuhaSky

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

    Tham gia ngày:
    30/5/10
    Bài viết:
    550
    Nơi ở:
    WE Box
    Trùi ui? For loop Integer A làm j thế bạn?:-? MUI hở?Góp ý tý là Sao cậu không Pick tất cả các unit of type (dummy bạn move) để MUI cho dễ hơn ?:D
     
  11. Mr.Giang

    Mr.Giang Mr & Ms Pac-Man

    Tham gia ngày:
    2/2/08
    Bài viết:
    156
    Up lên vì chưa được trả lời
     
  12. 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
    ko hiểu :-??
    1 shop thì đã bán 12 items 1 hero vào có thể thấy 12 items mà :-/

    tất cả trong team là team nào :-/

    oh.

    ví dụ con Footman nhé. kiếm phần Object Manager Sound - Unit Sound Set Footman
    sau đó vào phần Sound Editor bấm kiếm Sound Set Footman Internal/Units/Footman ví dụ FootmanDeath.wav bấm chuột phải chọn Replace Internal Sound chọn sound nào đó là file wav là ok. vậy con footman chết sẽ ra sound đó'
     
  13. zzchaolegionzz

    zzchaolegionzz T.E.T.Я.I.S

    Tham gia ngày:
    27/9/07
    Bài viết:
    606
    Nơi ở:
    Black Parade
    cho mình hỏi làm sao để mất cái vòng sáng theo màu của player nhỉ. không phải làm mất mà là nhỏ lại cho vừa với hero thôi. chứ to quá nhìn xấu. ai chỉ mình với. VD player red thì mọi hero đều có cái vầng màu đỏ dưới chân đó. làm sao để cho cái vâng đó nhỏ lại. dùng War3modelEditor phải không nhỉ ;;) nhưng mình không biết làm. ai chỉ với
     
  14. Ryanpzo9

    Ryanpzo9 Donkey Kong

    Tham gia ngày:
    20/10/08
    Bài viết:
    326
    Move thẳng hero luôn đấy bạn ơi ko phải tạo dummy rồi move dummy đâu :D

    Mà anh Tom coi cho em cái trigger ở page trước cái :-ss Nó vẫn cứ deal dmg liên hồi :|
     
  15. thienmenh1

    thienmenh1 Mr & Ms Pac-Man

    Tham gia ngày:
    20/8/10
    Bài viết:
    258
    Nơi ở:
    Ω. Nam Định.
    Em bik hỏi cái này có lẽ không đúng chủ đề nhưng ai có directX8.1 thì cho em xin ... không có cái này em không làm map được ... haizz !
     
  16. Ryanpzo9

    Ryanpzo9 Donkey Kong

    Tham gia ngày:
    20/10/08
    Bài viết:
    326
    Đây này anh Tom ơi sửa luôn hộ em được thì tốt quá :D
     
  17. royal309

    royal309 Youtube Master Race

    Tham gia ngày:
    21/7/09
    Bài viết:
    12
    Cảm ơn bác Ryanpzo9
    nhưng có khúc này em hok hĩu
    Mã:
    Set WinGroup = <All Players của phe Def >
    Player Group - Pick every players in WinGroup and do (Action)
          Loop-Action
                 Game - Victory for (Picked Player), show v..v...
    Custome Script: call DestroyForce(udg_WinGroup) //Hết xừ game rồi chắc chả cần hủy leak đầu =))
     
  18. Ryanpzo9

    Ryanpzo9 Donkey Kong

    Tham gia ngày:
    20/10/08
    Bài viết:
    326
    WinGroup là cái Player Group mà trong đó là các player mà cậu muốn cho win (Set WinGroup = (All enemies of <Con boss thuộc về Player nào thì cho Player tương ứng vào đây>). Tức là tất cả kẻ thù của con boss. Mà nếu map của cậu là chống cửa thì tất cả kẻ thù của boss là người chơi rồi còn gì :D

    Pick toàn bộ player trong cái Group đó và cho các player đó chiến thắng game (Có cái trigger Game - Victory <Player cần win. Ở đây là (Picked Player)> (Show dialogs, Show scores))

    ---------- Post added at 16:57 ---------- Previous post was at 16:55 ----------

    Nếu là win xp thì dùng x9.0c luôn đi bạn ơi... Còn cao hơn xp thì dùng hẳn x10 v..v..
     
  19. royal309

    royal309 Youtube Master Race

    Tham gia ngày:
    21/7/09
    Bài viết:
    12
    Đó giờ chưa làm cái Variable lần nào nên ko biết. cái WinGroup đó Varible type là Player Group đó phải hok bác?

    ---------- Post added at 17:07 ---------- Previous post was at 16:59 ----------

    wa được khúc này rồi bác ơi.
    còn khúc loop-action ko biết nó nằm ở đâu >"<

    ---------- Post added at 17:18 ---------- Previous post was at 17:07 ----------

    hehe làm được rồi giờ test thử xem có được hok đã cảm ơn nhìu nha

    ---------- Post added at 17:39 ---------- Previous post was at 17:18 ----------

    ek nó chết mà cũng ko win
    trigger mình thế này

    [​IMG]
    [​IMG]
     
  20. Ryanpzo9

    Ryanpzo9 Donkey Kong

    Tham gia ngày:
    20/10/08
    Bài viết:
    326
    [/COLOR]ek nó chết mà cũng ko win
    trigger mình thế này

    [​IMG]
    [​IMG][/QUOTE]

    Cái trigger thứ 2 mình đã nhắc là Initially ON. Tức là để bật sẵn. Cậu để OFF thế kia thì ko win là phải ==!
     
Trạng thái chủ đề:
Không mở trả lời sau này.

Chia sẻ trang này