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

Status
Không mở trả lời sau này.
Cho hỏi trigger này có lôi, leak, ... gì ko mà khi dùng skill thì rất lag, dùng 2-3 lần là khỏi chơi
Mã:
Rockthrow
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Rockthrow 
    Actions
        Set Caster_Skill[1] = (Casting unit)
        Set Point_Skill[1] = (Position of Caster_Skill[1])
        Set Target_Skill[1] = (Target point of ability being cast)
        Unit - Create 1 Dummy_Rockthrow for (Owner of Caster_Skill[1]) at Point_Skill[1] facing (Facing of Caster_Skill[1]) degrees
        Set Dummy_Skill[1] = (Last created unit)
        Unit - Turn collision for Dummy_Skill[1] Off
        Trigger - Turn on Loop Rockthrow <gen>
Mã:
Loop Rockthrow
    Events
        Time - Every 0.04 seconds of game time
    Conditions
    Actions
        Set Point_Skill[2] = (Position of Dummy_Skill[1])
        Set Point_Skill[3] = (Point_Skill[2] offset by 30.00 towards (Angle from Point_Skill[1] to Target_Skill[1]) degrees)
        Unit - Move Dummy_Skill[1] instantly to Point_Skill[3]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Distance between Point_Skill[2] and Target_Skill[1]) Less than or equal to 100.00
            Then - Actions
                Trigger - Turn off (This trigger)
                Unit - Remove Dummy_Skill[1] from the game
                Custom script:   call RemoveLocation(udg_Target_Skill[1])
                Custom script:   call RemoveLocation(udg_Point_Skill[1])
                Custom script:   call RemoveLocation(udg_Point_Skill[2])
                Custom script:   call RemoveLocation(udg_Point_Skill[3])
                Set Group_Skill[1] = (Units within 500.00 of Target_Skill[1] matching (((Matching unit) belongs to an enemy of (Owner of Caster_Skill[1])) Equal to True))
                Unit Group - Pick every unit in Group_Skill[1] and do (Actions)
                    Loop - Actions
                        Unit - Cause Caster_Skill[1] to damage (Picked unit), dealing ((Real((Level of Rockthrow  for Caster_Skill[1]))) x (Real((Strength of Caster_Skill[1] (Include bonuses))))) damage of attack type Chaos and damage type Fire
                        Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
                        Special Effect - Destroy (Last created special effect)
                Custom script:   call DestroyGroup(udg_Group_Skill[1])
            Else - Actions
                Custom script:   call RemoveLocation(udg_Point_Skill[2])
                Custom script:   call RemoveLocation(udg_Point_Skill[3])
Thậm chí mình đã thử làm một skill khác, y chang, có điều ko remove cả leak,mà vẫn ko lag bằng skill này :-??
Cả 2 skill đều base y nhau, tuy nhiên skill lag này dummy có type move là hover và height là 200, chỉ khác 2 điểm vậy thôi :-?
Vậy ai giải thích giúp mình vì sao lại lag ko? :(
 
cho hỏi về lệnh này
Mã:
Time - Every 30.00 seconds of game time

trước giờ mình nghĩ lệnh này có tác dụng là cứ 30s kể từ khi trigger đc turn on thì sẽ chạy, nhưng hnay mình dùng nó như thế này:
Trigger 1: Initially off
Mã:
    Events
        Time - Every 30.00 seconds of game time
    Conditions
    Actions
Game - Display to (All players) the text: WTF

Trigger 2:
Mã:
    Events
        Time - Elapsed game time is 15.00 seconds
    Conditions
    Actions
        -------- TURN ON SPAWN CREEP --------
        Trigger - Turn on Trigger 1 <gen>


Đáng lẽ (theo mình nghĩ ) thì giây thứ turn on thì sau 30s ( giây thứ 45 ) sẽ chạy Game - Display to (All players) the text: WTF, nhưng khi test thì giây thử 30 đã chạy rồi. Ai giải thix hộ với :|

---------- Post added at 18:02 ---------- Previous post was at 18:00 ----------

Đáng lẽ (theo mình nghĩ ) thì khi turn on thì sau 30s ( giây thứ 45 ) sẽ chạy Game - Display to (All players) the text: WTF, nhưng khi test thì giây thử 30 đã chạy rồi. Ai giải thix hộ với
 
Đáng lẽ (theo mình nghĩ ) thì khi turn on thì sau 30s ( giây thứ 45 ) sẽ chạy Game - Display to (All players) the text: WTF, nhưng khi test thì giây thử 30 đã chạy rồi. Ai giải thix hộ với

Nó tính theo thời gian trôi qua của game. 30.00 seconds of game time nghĩa là cứ sau mỗi 30s tính từ lúc play map thì nó thực hiện trigger. Cái trigger turn on trigger kia chỉ bật/tắt trigger thôi, thời gian không cộng dồn vào.
 
cám ơn nhé, cho mình hỏi cái này , khi sử dụng các lênh remove leak có ảnh hưởng j tới var ko ? hay chỉ reset lại var thui, DestroyTimer thì hình như là xóa luôn cái timer fải ko? vì mình xài DestroyTimer cho 1 var thì ko thể gọi lại var đó nữa
 
Sau khi destroy không gán var lại cho timer đó thì cái var đó chỉ như một cái var rỗng thôi. Ví dụ như sau khi destroy Group nếu không CreateGroup hay set biến group đó là một số unit nào đó thì không thể add thêm unit vào group đó
 
Cho mình hỏi file nhạc dùng để import vào map thì là đuôi .mp3, nhưng sao cái nhạc mình cũng là .mp3 mà import vào mà mở nó ko lên
Nó còn báo là " This does not appear to be a vail sound file "
Edit: Đã import đc

Nhưng tại sao chỉ Play Sound đc đúng 1 lần, dùng trigger Play lần nữa nó k chạy ?
 
Chỉnh sửa cuối:
cám ơn nhé, cho mình hỏi cái này , khi sử dụng các lênh remove leak có ảnh hưởng j tới var ko ? hay chỉ reset lại var thui, DestroyTimer thì hình như là xóa luôn cái timer fải ko? vì mình xài DestroyTimer cho 1 var thì ko thể gọi lại var đó nữa

mà bạn sau khi destroy timer variable thì có thể create lại mà ?

chẳng hạn như MyTimer << var = set udg_MyTimer = CreateTimer()
 
Cho hỏi nếu chỉ play sound thôi có gây leak không? Có cần phải stop/destroy sound đó?
 
Có thể mở 1 map đã đc bảo vệ ko :( ? Map tui làm bị xóa sạch sẽ rùi :((
 
Ai rành về phần Sound cho hỏi, file nhạc mình import là .mp3, dùng trigger Play - Sound lần 1 nghe bt, nhưng dùng trigger Play cho thêm lần nữa thì nó k hát ? Có ai biết tại sao k ?
 
Cho hỏi nếu chỉ play sound thôi có gây leak không? Có cần phải stop/destroy sound đó?

Cho mình hỏi file nhạc dùng để import vào map thì là đuôi .mp3, nhưng sao cái nhạc mình cũng là .mp3 mà import vào mà mở nó ko lên
Nó còn báo là " This does not appear to be a vail sound file "
Edit: Đã import đc

Nhưng tại sao chỉ Play Sound đc đúng 1 lần, dùng trigger Play lần nữa nó k chạy ?

Destroy đi thì cái sound đó không play lại được nữa,thử là biết mà
 
cho hỏi khi xài lệnh Set TempGroup = Unit in range....., những Unit trong range nhưng có skill Locust sẽ ko đc set vào group fải ko ?
 
K có Destroy, mình tạo trigger chờ 2s cho nó Play 1 lần thì nó hát bt, xong 1 trigger chờ 30s cho nó Play lần 2 thì nó k hát nữa :|
 
cho hỏi khi xài lệnh Set TempGroup = Unit in range....., những Unit trong range nhưng có skill Locust sẽ ko đc set vào group fải ko ?
Phải.

Cho hỏi nếu chỉ play sound thôi có gây leak không? Có cần phải stop/destroy sound đó?

Nếu dùng tiếp thì ko sao, nếu ko còn dùng nữa thì destroy để ko leak.
 
Cho hỏi trigger này có lôi, leak, ... gì ko mà khi dùng skill thì rất lag, dùng 2-3 lần là khỏi chơi
Mã:
Rockthrow
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Rockthrow 
    Actions
        Set Caster_Skill[1] = (Casting unit)
        Set Point_Skill[1] = (Position of Caster_Skill[1])
        Set Target_Skill[1] = (Target point of ability being cast)
        Unit - Create 1 Dummy_Rockthrow for (Owner of Caster_Skill[1]) at Point_Skill[1] facing (Facing of Caster_Skill[1]) degrees
        Set Dummy_Skill[1] = (Last created unit)
        Unit - Turn collision for Dummy_Skill[1] Off
        Trigger - Turn on Loop Rockthrow <gen>
Mã:
Loop Rockthrow
    Events
        Time - Every 0.04 seconds of game time
    Conditions
    Actions
        Set Point_Skill[2] = (Position of Dummy_Skill[1])
        Set Point_Skill[3] = (Point_Skill[2] offset by 30.00 towards (Angle from Point_Skill[1] to Target_Skill[1]) degrees)
        Unit - Move Dummy_Skill[1] instantly to Point_Skill[3]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Distance between Point_Skill[2] and Target_Skill[1]) Less than or equal to 100.00
            Then - Actions
                Trigger - Turn off (This trigger)
                Unit - Remove Dummy_Skill[1] from the game
                Custom script:   call RemoveLocation(udg_Target_Skill[1])
                Custom script:   call RemoveLocation(udg_Point_Skill[1])
                Custom script:   call RemoveLocation(udg_Point_Skill[2])
                Custom script:   call RemoveLocation(udg_Point_Skill[3])
                Set Group_Skill[1] = (Units within 500.00 of Target_Skill[1] matching (((Matching unit) belongs to an enemy of (Owner of Caster_Skill[1])) Equal to True))
                Unit Group - Pick every unit in Group_Skill[1] and do (Actions)
                    Loop - Actions
                        Unit - Cause Caster_Skill[1] to damage (Picked unit), dealing ((Real((Level of Rockthrow  for Caster_Skill[1]))) x (Real((Strength of Caster_Skill[1] (Include bonuses))))) damage of attack type Chaos and damage type Fire
                        Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
                        Special Effect - Destroy (Last created special effect)
                Custom script:   call DestroyGroup(udg_Group_Skill[1])
            Else - Actions
                Custom script:   call RemoveLocation(udg_Point_Skill[2])
                Custom script:   call RemoveLocation(udg_Point_Skill[3])
Thậm chí mình đã thử làm một skill khác, y chang, có điều ko remove cả leak,mà vẫn ko lag bằng skill này :-??
Cả 2 skill đều base y nhau, tuy nhiên skill lag này dummy có type move là hover và height là 200, chỉ khác 2 điểm vậy thôi :-?
Vậy ai giải thích giúp mình vì sao lại lag ko? :(

Quoteeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
 
cho hỏi Damage Type Universal và Devine khác nhau ntn ?

---------- Post added at 12:19 ---------- Previous post was at 12:12 ----------

khi dùng trigger để deal dmg lên 1 unit thì nên dùng loại Dmg nào để Damge đó xuyên giáp, ko xuyên kháng phép, giảm bởi kháng phép
 
cho hỏi Damage Type Universal và Devine khác nhau ntn ?

---------- Post added at 12:19 ---------- Previous post was at 12:12 ----------

khi dùng trigger để deal dmg lên 1 unit thì nên dùng loại Dmg nào để Damge đó xuyên giáp, ko xuyên kháng phép, giảm bởi kháng phép

Divine khác Universal là Divine không tác dụng với unit kháng phép,Universal thì có,cả hai đều gây sát thương tuyệt đối.



Quoteeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

Thử thay effect xem sao
 
Chỉnh sửa cuối:
Mã:
Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Rockthrow 
    Actions
        Set Caster_Skill[1] = (Casting unit)
        Set Point_Skill[1] = (Position of Caster_Skill[1])
        Set Target_Skill[1] = (Target point of ability being cast)
        Unit - Create 1 Dummy_Rockthrow for (Owner of Caster_Skill[1]) at Point_Skill[1] facing (Facing of Caster_Skill[1]) degrees
        Set Dummy_Skill[1] = (Last created unit)
        Unit - Turn collision for Dummy_Skill[1] Off
        Trigger - Turn on Loop Rockthrow <gen>

Mã:
Loop Rockthrow
    Events
        Time - Every 0.04 seconds of game time
    Conditions
    Actions
        Set Point_Skill[2] = (Position of Dummy_Skill[1])
        Set Point_Skill[3] = (Point_Skill[2] offset by 30.00 towards (Angle from Point_Skill[1] to Target_Skill[1]) degrees)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Distance between Point_Skill[2] and Target_Skill[1]) Less than or equal to 100.00
            Then - Actions
                Trigger - Turn off (This trigger)
                Unit - Remove Dummy_Skill[1] from the game
                Set Group_Skill[1] = (Units within 500.00 of Target_Skill[1] matching (((Matching unit) belongs to an enemy of (Owner of Caster_Skill[1])) Equal to True))
                Unit Group - Pick every unit in Group_Skill[1] and do (Actions)
                    Loop - Actions
                        Unit - Cause Caster_Skill[1] to damage (Picked unit), dealing ((Real((Level of Rockthrow  for Caster_Skill[1]))) x (Real((Strength of Caster_Skill[1] (Include bonuses))))) damage of attack type Chaos and damage type Fire
                        Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
                        Special Effect - Destroy (Last created special effect)
               [B] Custom script:   call RemoveLocation(udg_Point_Skill[1])
                Custom script:   call RemoveLocation(udg_Point_Skill[2])
                Custom script:   call RemoveLocation(udg_Point_Skill[3])
                Custom script:   call RemoveLocation(udg_Target_Skill[1])[/B]
                Custom script:   call DestroyGroup(udg_Group_Skill[1])
            Else - Actions
                [B]Unit - Move Dummy_Skill[1] instantly to Point_Skill[3][/B]
                Custom script:   call RemoveLocation(udg_Point_Skill[2])
                Custom script:   call RemoveLocation(udg_Point_Skill[3])
Sửa thế này nếu như còn lag thì chắc là do leak trigger khác
 
[spoil]
Mã:
Rockthrow
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Rockthrow 
    Actions
        Set Caster_Skill[1] = (Casting unit)
        Set Point_Skill[1] = (Position of Caster_Skill[1])
        Set Target_Skill[1] = (Target point of ability being cast)
        Unit - Create 1 Dummy_Rockthrow for (Owner of Caster_Skill[1]) at Point_Skill[1] facing (Facing of Caster_Skill[1]) degrees
        Set Dummy_Skill[1] = (Last created unit)
[COLOR="#FF0000"]        Unit - Turn collision for Dummy_Skill[1] Off[/COLOR] Locust cũng phải off ?
        Trigger - Turn on Loop Rockthrow <gen>
Mã:
Loop Rockthrow
    Events
        Time - Every 0.04 seconds of game time
    Conditions
    Actions
        Set Point_Skill[2] = (Position of Dummy_Skill[1])
        Set Point_Skill[3] = (Point_Skill[2] offset by 30.00 towards (Angle from Point_Skill[1] to Target_Skill[1]) degrees)
        Unit - Move Dummy_Skill[1] instantly to Point_Skill[3]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Distance between Point_Skill[2] and Target_Skill[1]) Less than or equal to 100.00
            Then - Actions
                Trigger - Turn off (This trigger)
                Unit - Remove Dummy_Skill[1] from the game
[COLOR="#FF0000"]                Custom script:   call RemoveLocation(udg_Target_Skill[1])[/COLOR] Remove rồi thì ở dưới SetGroup ở đâu?
                Custom script:   call RemoveLocation(udg_Point_Skill[1])
                Custom script:   call RemoveLocation(udg_Point_Skill[2])
                Custom script:   call RemoveLocation(udg_Point_Skill[3])
                Set Group_Skill[1] = (Units within 500.00 of [COLOR="#FF0000"]Target_Skill[1][/COLOR] matching (((Matching unit) belongs to an enemy of (Owner of Caster_Skill[1])) Equal to True))
                Unit Group - Pick every unit in Group_Skill[1] and do (Actions)
                    Loop - Actions
                        Unit - Cause Caster_Skill[1] to damage (Picked unit), dealing ((Real((Level of Rockthrow  for Caster_Skill[1]))) x (Real((Strength of Caster_Skill[1] (Include bonuses))))) damage of attack type Chaos and damage type Fire
                        Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
                        Special Effect - Destroy (Last created special effect)
                Custom script:   call DestroyGroup(udg_Group_Skill[1])
            Else - Actions
                Custom script:   call RemoveLocation(udg_Point_Skill[2])
                Custom script:   call RemoveLocation(udg_Point_Skill[3])
Thậm chí mình đã thử làm một skill khác, y chang, có điều ko remove cả leak,mà vẫn ko lag bằng skill này :-??
Cả 2 skill đều base y nhau, tuy nhiên skill lag này dummy có type move là hover và height là 200, chỉ khác 2 điểm vậy thôi :-?
Vậy ai giải thích giúp mình vì sao lại lag ko? :([/B]
[/spoil]
Vụ Lag thì chả biết, đã thử dummy rồi, hover hay flying ... và chả có gì cả, tất cả FPS như nhau hết.

cho hỏi Damage Type Universal và Devine khác nhau ntn ? khi dùng trigger để deal dmg lên 1 unit thì nên dùng loại Dmg nào để Damge đó xuyên giáp, ko xuyên kháng phép, giảm bởi kháng phép
1) Universal có thể tác dụng lên chống phép, Devine thì ko. Xem cái này
2) Spell - Magic
 
Chỉnh sửa cuối:
Status
Không mở trả lời sau này.
Back
Top