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

Status
Không mở trả lời sau này.
hồi nào thế?

một unit khi chết, sau thời gian "decay" nó sẽ tự bị remove
với dummy lúc nào "Death Type" của nó lúc nào cũng phải có "Does not Decay", vì thế, chết xong nó sẽ bị remove luôn,
lấy đâu ra "trạng thái sống trong bộ nhớ" =))

Vậy nếu addexpiretimer cho một hero thì hero đó có bị remove luôn hay vẫn tồnt ại dưới dạng reviveable
 
Và bác cho hỏi luôn, dummy có model dùng add expire timer khi chết hắn vẫn văng máu tứ tung vậy.
 
cho mình hỏi skill ko có MUI dùng chung biến có ảnh hưởng gì ko vậy.Ví dụ những biến như caster , group , integer ,vv..
 
Dù MUI hay không MUI thì nên đặt các biến caster khác nhau, không thì spell này đang chạy thì spell kia chen ngang vào, thế là caster bị thay đổi => bug. Vì vậy nên làm mỗi spell 1 kiểu tên. VD: Acaster, Bcaster... và nên dùng array VD: Caster[1], Caster[2] nhưng chỉ đối với spell không MUI, MUI thì hơi khó :-??
 
Vậy nếu addexpiretimer cho một hero thì hero đó có bị remove luôn hay vẫn tồnt ại dưới dạng reviveable

Dĩ nhiên là revivable, nhưng ai lại đi lấy Hero làm Dummy, nó sẽ bị thấy ở hàng icon bên trái và khi hết thời gian sống nó sẽ có animation tử trận.

dummy có model dùng add expire timer khi chết hắn vẫn văng máu tứ tung vậy
:( chưa thấy bao giờ, chắc tại animation hả :|
 
vậy dummy dùng chung thì sao , cũng gây lỗi như vậy hả mấy pác.:(
 
làm sao để spawn creep liên tục, hồi sinh hero và biến trụ máu bắn được (như dota ấy)
 
Ai có thể giải thích cho mình lỗi trong Spell này được không:
Cụ thể là:
Spell Blink = Trigger của Mountain King trong Demo (quá đơn giản, chỉ 1 Event, 1 Condition, 1 Action) => hoạt động bình thường.
Nhưng Spell Bug Blink (đừng để ý cái tên) của Paladin cũng y hệt, chỉ thêm 1 Action là "Wait 0.5s seconds" trước cái Action "Move Instantly Unit" => khi dùng, hero ko thèm biến tới chỗ Target mà cứ biến thẳng đến "Center of Playable Map Area" (giữa bản đồ).
 
sau wait thì không còn Target point of ability being cast nữa, phải đặt vào biến trước khi wait:

Mã:
Bug Blink
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Bug Blink 
    Actions
        Set TempPoint = (Target point of ability being cast)
        Wait 0.50 seconds
        Unit - Move (Triggering unit) instantly to TempPoint
        Custom script:   call RemoveLocation( udg_TempPoint )
 
sau wait thì không còn Target point of ability being cast nữa, phải đặt vào biến trước khi wait

Ah mà tiện thể em hỏi luôn: khi thêm manacost và cooldown vào cái Blink đó thì vẫn vô tác dụng. Em biết đó là do lệnh Move Instant nhưng có cách nào sửa cái đó đơn giản mà ko dùng lệnh WAIT đc ko vì có rất nhiều spell cũng dạng Move như vậy, chả nhẽ nhìn Caster cast spell 1 lúc thì Action mới chạy => ko thật.
 
bởi vì ko có wait nên cooldown và mana cost mới ko có tác dụng, vì lúc "start effect" thì chưa mất mana và cooldown chưa kích hoạt
dùng 0.00s timer là đc:

Mã:
BlinkCast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Blink
    Actions
        Set BlinkCaster = (Triggering unit)
        Set BlinkTarget = (Target point of ability being cast)
        Countdown Timer - Start BlinkTimer as a One-shot timer that will expire in 0.00 seconds

Mã:
BlinkAct
    Events
        Time - BlinkTimer expires
    Conditions
    Actions
        Unit - Move BlinkCaster instantly to BlinkTarget
        Custom script:   call RemoveLocation( udg_BlinkTarget )

0.00s timer khác với "instant" nhá.
 
Chỉnh sửa cuối:
cho hỏi mình làm spell dưới đây có gì sai sót ko mà cast vào quái là lag như chưa bao h được lag :( .Mô tả : hero tung ra nhưng con dao độc vào những kẻ thù xung quanh , gây dam và slow .
Mã:
Envenomous Knives
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Envenomed Knives 
    Actions
        Set KnivesCaster = (Casting unit)
        Set KnivesCasterLoc = (Position of KnivesCaster)
        Set KnivesLevel = (Level of Envenomed Knives  for KnivesCaster)
        If ((Level of Envenomed Knives  for KnivesCaster) Equal to 1) then do (Set KnivesGroup = (Units within 300.00 of KnivesCasterLoc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of KnivesCaster)) Equal to True))))) else do (Do nothing)
        If ((Level of Envenomed Knives  for KnivesCaster) Equal to 2) then do (Set KnivesGroup = (Units within 350.00 of KnivesCasterLoc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of KnivesCaster)) Equal to True))))) else do (Do nothing)
        If ((Level of Envenomed Knives  for KnivesCaster) Equal to 3) then do (Set KnivesGroup = (Units within 400.00 of KnivesCasterLoc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of KnivesCaster)) Equal to True))))) else do (Do nothing)
        If ((Level of Envenomed Knives  for KnivesCaster) Equal to 4) then do (Set KnivesGroup = (Units within 500.00 of KnivesCasterLoc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of KnivesCaster)) Equal to True))))) else do (Do nothing)
        Unit Group - Pick every unit in KnivesGroup and do (Actions)
            Loop - Actions
                Unit - Create 1 EnvenomedKnivesDummy for (Owner of KnivesCaster) at KnivesCasterLoc facing Default building facing degrees
                Unit - Set level of Envenomed Knives (dummy)  for (Last created unit) to KnivesLevel
                Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)
                Unit - Add a 0.10 second Generic expiration timer to (Last created unit)
        Custom script:   call RemoveLocation(udg_KnivesCasterLoc)
        Custom script:   call DestroyGroup(udg_KnivesGroup)
 
cho hỏi mình làm spell dưới đây có gì sai sót ko mà cast vào quái là lag như chưa bao h được lag :( .Mô tả : hero tung ra nhưng con dao độc vào những kẻ thù xung quanh , gây dam và slow.

Nhìn qua thì ko thấy gì sai cả, bạn up demo lên xem sao.
Tiện thể hỏi luôn câu này
Mã:
For each (Integer A) from 1 to 10, do (Actions)
    Loop - Actions
        Special Effect - Create a special effect at (Integer A) (cái Integer A ko phải là Point vì nó chỉ mang tính ví dụ cho các bạn hiểu thôi) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
        Special Effect - Destroy (Last created special effect)
Làm như vậy thì Trigger có destroy cả 10 cái effect ko hay chỉ 1 ?
 
cho hỏi mình làm spell dưới đây có gì sai sót ko mà cast vào quái là lag như chưa bao h được lag :( .Mô tả : hero tung ra nhưng con dao độc vào những kẻ thù xung quanh , gây dam và slow .
Mã:
Envenomous Knives
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Envenomed Knives 
    Actions
        Set KnivesCaster = (Casting unit)
        Set KnivesCasterLoc = (Position of KnivesCaster)
        Set KnivesLevel = (Level of Envenomed Knives  for KnivesCaster)
        If ((Level of Envenomed Knives  for KnivesCaster) Equal to 1) then do (Set KnivesGroup = (Units within 300.00 of KnivesCasterLoc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of KnivesCaster)) Equal to True))))) else do (Do nothing)
        If ((Level of Envenomed Knives  for KnivesCaster) Equal to 2) then do (Set KnivesGroup = (Units within 350.00 of KnivesCasterLoc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of KnivesCaster)) Equal to True))))) else do (Do nothing)
        If ((Level of Envenomed Knives  for KnivesCaster) Equal to 3) then do (Set KnivesGroup = (Units within 400.00 of KnivesCasterLoc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of KnivesCaster)) Equal to True))))) else do (Do nothing)
        If ((Level of Envenomed Knives  for KnivesCaster) Equal to 4) then do (Set KnivesGroup = (Units within 500.00 of KnivesCasterLoc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of KnivesCaster)) Equal to True))))) else do (Do nothing)
        Unit Group - Pick every unit in KnivesGroup and do (Actions)
            Loop - Actions
                Unit - Create 1 EnvenomedKnivesDummy for (Owner of KnivesCaster) at KnivesCasterLoc facing Default building facing degrees
                Unit - Set level of Envenomed Knives (dummy)  for [B](Last created unit)[/B] to KnivesLevel
                Unit - Order [B](Last created unit)[/B] to Night Elf Warden - Shadow Strike [B](Picked unit)[/B]
                Unit - Add a 0.10 second Generic expiration timer to [B](Last created unit)[/B]
        Custom script:   call RemoveLocation(udg_KnivesCasterLoc)
        Custom script:   call DestroyGroup(udg_KnivesGroup)

Leak + thiếu Set KnivesCaster = null, cũng có thể do base skill là ShockWave chăng @@

Nhìn qua thì ko thấy gì sai cả, bạn up demo lên xem sao.
Tiện thể hỏi luôn câu này
Mã:
For each (Integer A) from 1 to 10, do (Actions)
    Loop - Actions
        Special Effect - Create a special effect at (Integer A) (cái Integer A ko phải là Point vì nó chỉ mang tính ví dụ cho các bạn hiểu thôi) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
        Special Effect - Destroy (Last created special effect)
Làm như vậy thì Trigger có destroy cả 10 cái effect ko hay chỉ 1 ?

Làm như vậy là đúng rùi, chỉ khi để ngoài vòng loop là nó sẽ destroy cái effect cuối cùng (tức thứ 10) mà thôi :)
 
Cho em hỏi. Khi mình set 1 variable of unit ( để làm spell ) thì khi spell cast xong rồi nếu mình không set biến unit đó = null mà vẫn để nguyên vậy liệu có gây ra leak không?
 
Khi hero di chuyển thì hero đó sẽ chết cái này ai làm dc chỉ mình với :d
thank nhiều!!!
 
Status
Không mở trả lời sau này.
Back
Top