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

Vậy Hero thì làm thế nào :-?
Hỏi thêm là làm thế nào để tạo lightingeffect cho 2 nguồn di chuyên .Ví du : Drain Mana khi cả 2 unit đều di chuyển

Trong Trigger có Move Lighting mà
 
Hôm qua cái Win của em bị lỗi nên em cài lại, nhưng sau khi cài bật JNG thì nó cứ báo thế này:

View attachment 171167

Em đã lên mạng tải lại JNG mới rồi nhưng vẫn bị thế. Bật WE thì vẫn ổn. Có ai biết là lỗi gì không?

Cái này em sửa đc rồi. Các bác không cần trả lời đâu. Là do em cài Warcraft ở ổ C nên không bật đc, gỡ ra cài lại ở ổ D thì ngon lành.
 
Mình Nhớ Là Hôm bữa Bình Hỏi rồi, có bạn trả lời rồi mà tìm lại k thấy nữa.
ai Chỉ Mình Cách Tạo LeaderBoard Mà Hiện: Leve hero, gold, lumber, kill, death.
Cho Map Test Luôn Nhé.
MÌnh Thanks Trước.
 
Mình Nhớ Là Hôm bữa Bình Hỏi rồi, có bạn trả lời rồi mà tìm lại k thấy nữa.
ai Chỉ Mình Cách Tạo LeaderBoard Mà Hiện: Leve hero, gold, lumber, kill, death.
Cho Map Test Luôn Nhé.
MÌnh Thanks Trước.

LeaderBoard thì làm gì hiện đc nhiều thế hả bạn,bạn dùng multiboard đi,lên hive search có rất nhiều
 
Vì 2 con đệ mà chỉ có 1 biến The_Sentinel_Point.
=> Giải quyết: dùng 2 biến, vd: Point1 cho đệ thứ nhất, Point2 cho đệ thứ 2.

Em làm 2 biến như bác bảo rồi nhưng vẫn thế. Bác xem hộ em cái trigger cái:

Mã:
The Sentinel Move
    Events
        Time - Every 0.80 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (The_Sentinel_Hero is alive) Equal to True
            Then - Actions
                Set The_Sentinel_Point2 = (Position of The_Sentinel_Hero)
                Set The_Sentinel_Point[1] = (The_Sentinel_Point2 offset by 150.00 towards 180.00 degrees)
                Set The_Sentinel_Point[2] = (The_Sentinel_Point2 offset by 150.00 towards 360.00 degrees)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in The_Sentinel_Unit) Equal to 0
                    Then - Actions
                        For each (Integer A) from 1 to 2, do (Actions)
                            Loop - Actions
                                Unit - Create 1 Captain for (Owner of The_Sentinel_Hero) at The_Sentinel_Point[(Integer A)] facing (Facing of The_Sentinel_Hero) degrees
                                Unit Group - Add (Last created unit) to The_Sentinel_Unit
                    Else - Actions
                        For each (Integer A) from 1 to 2, do (Actions)
                            Loop - Actions
                                Unit Group - Pick every unit in The_Sentinel_Unit and do (Actions)
                                    Loop - Actions
                                        Unit - Order (Picked unit) to Attack-Move To The_Sentinel_Point[(Integer A)]
                Custom script:   call RemoveLocation(udg_The_Sentinel_Point2)
                Custom script:   call RemoveLocation(udg_The_Sentinel_Point[1])
                Custom script:   call RemoveLocation(udg_The_Sentinel_Point[2])
            Else - Actions
 
Em làm 2 biến như bác bảo rồi nhưng vẫn thế. Bác xem hộ em cái trigger cái:

Mã:
The Sentinel Move
    Events
        Time - Every 0.80 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (The_Sentinel_Hero is alive) Equal to True
            Then - Actions
                Set The_Sentinel_Point2 = (Position of The_Sentinel_Hero)
                Set The_Sentinel_Point[1] = (The_Sentinel_Point2 offset by 150.00 towards 180.00 degrees)
                Set The_Sentinel_Point[2] = (The_Sentinel_Point2 offset by 150.00 towards 360.00 degrees)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in The_Sentinel_Unit) Equal to 0
                    Then - Actions
                        For each (Integer A) from 1 to 2, do (Actions)
                            Loop - Actions
                                Unit - Create 1 Captain for (Owner of The_Sentinel_Hero) at The_Sentinel_Point[(Integer A)] facing (Facing of The_Sentinel_Hero) degrees
                                Unit Group - Add (Last created unit) to The_Sentinel_Unit
                    Else - Actions
                        For each (Integer A) from 1 to 2, do (Actions)
                            Loop - Actions
                                Unit Group - Pick every unit in The_Sentinel_Unit and do (Actions)
                                    Loop - Actions
                                        Unit - Order (Picked unit) to Attack-Move To The_Sentinel_Point[(Integer A)]
                Custom script:   call RemoveLocation(udg_The_Sentinel_Point2)
                Custom script:   call RemoveLocation(udg_The_Sentinel_Point[1])
                Custom script:   call RemoveLocation(udg_The_Sentinel_Point[2])
            Else - Actions

Trả lời hố rồi,ngượng quá đi =-=,sorry
 
Chỉnh sửa cuối:
Em làm 2 biến như bác bảo rồi nhưng vẫn thế. Bác xem hộ em cái trigger cái:

- Lỗi là do cái group đấy. Tuy dùng loop A, nhưng trong loop lại pick group => loop lần 1, cả 2 con đệ move vào point 1, loop lần 2 , cả 2 con đệ move vào point 2 => lỗi
- Sửa lại thế này:

Mã:
The Sentinel Move
    Events
        Time - Every 0.80 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (The_Sentinel_Hero is alive) Equal to True
            Then - Actions
                Set The_Sentinel_Point2 = (Position of The_Sentinel_Hero)
                Set The_Sentinel_Point[1] = (The_Sentinel_Point2 offset by 150.00 towards 180.00 degrees)
                Set The_Sentinel_Point[2] = (The_Sentinel_Point2 offset by 150.00 towards 360.00 degrees)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in The_Sentinel_Unit) Equal to 0
                    Then - Actions
                        For each (Integer A) from 1 to 2, do (Actions)
                            Loop - Actions
                                Unit - Create 1 Captain for (Owner of The_Sentinel_Hero) at The_Sentinel_Point[(Integer A)] facing (Facing of The_Sentinel_Hero) degrees
                                Unit Group - Add (Last created unit) to The_Sentinel_Unit
                                [COLOR=#0000FF]Set SummonedUnit[IntegerA] =  Last created unit[/COLOR]
                    Else - Actions
                        For each (Integer A) from 1 to 2, do (Actions)
                            Loop - Actions
                                [COLOR=#0000FF]Unit - Order SummonedUnit[IntegerA] to Attack-Move To The_Sentinel_Point[(Integer A)][/COLOR]
                Custom script:   call RemoveLocation(udg_The_Sentinel_Point2)
                Custom script:   call RemoveLocation(udg_The_Sentinel_Point[1])
                Custom script:   call RemoveLocation(udg_The_Sentinel_Point[2])
            Else - Actions
 
Chỉnh sửa cuối:
*Leo Nguyen: Thanks bác nhé, em làm được rồi.

*Em có 2 vấn đề muốn hỏi tiếp :D:
1: Em làm 1 skill Overload (Storm trong DotA) như sau:

Mã:
UnitTakeDamageInit
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Custom script:   set bj_wantDestroyGroup = true
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                Unit Group - Add (Picked unit) to UnitsEnterMap
                Trigger - Add to Overload Attack <gen> the event (Unit - (Picked unit) Takes damage)

Mã:
UnitTakeDamageDetector
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        ((Triggering unit) is in UnitsEnterMap) Equal to False
    Actions
        Unit Group - Add (Triggering unit) to UnitsEnterMap
        Trigger - Add to Overload Attack <gen> the event (Unit - (Triggering unit) Takes damage)

Mã:
Overload Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Level of Overload  for (Casting unit)) Greater than 0
    Actions
        Set Storm_Over_Caster = (Casting unit)
        Set Storm_Over_Point = (Position of Storm_Over_Caster)
        Unit - Create 1 Blood Strength Dummy for (Owner of Storm_Over_Caster) at Storm_Over_Point facing Default building facing degrees
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Unit - Add Overload Buff  to (Last created unit)
        Unit - Order (Last created unit) to Human Priest - Inner Fire Storm_Over_Caster
        Custom script:   call RemoveLocation(udg_Storm_Over_Point)

Mã:
Overload Attack
    Events
    Conditions
        ((Damage source) has buff Overload ) Equal to True
    Actions
        Unit - Remove Overload  buff from (Damage source)
        Set Storm_Over_Caster = (Damage source)
        Set Storm_Over_Point = (Position of (Triggering unit))
        Set Storm_Over_Group = (Units within 250.00 of Storm_Over_Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Storm_Over_Caster)) Equal to True))))
        Special Effect - Create a special effect at Storm_Over_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Unit Group - Pick every unit in Storm_Over_Group and do (Actions)
            Loop - Actions
                Unit - Cause Storm_Over_Caster to damage (Picked unit), dealing (15.00 + (15.00 x (Real((Level of Overload  for Storm_Over_Caster))))) damage of attack type Spells and damage type Normal
                Unit - Create 1 Blood Strength Dummy for (Owner of Storm_Over_Caster) at Storm_Over_Point facing Default building facing degrees
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Unit - Add Overload Slow  to (Last created unit)
                Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
        Custom script:   call RemoveLocation(udg_Storm_Over_Point)
        Custom script:   call DestroyGroup(udg_Storm_Over_Group)

Cái skill trên có 1 lỗi là khi dùng skill gây damage khác vào đối phương thì nó cũng có hiệu lực, giờ muốn sửa là chỉ khi tấn công nó mới có hiệu lực thì làm thế nào?

2: Câu thứ 2 em muốn hỏi là: Cái map của em khi mới vào game thì rất lag, không di chuyển chuột được. Sau 5 giây thì lại bình thường (hình như sau 5 giây trigger mới hoạt động). Em chơi trên Garena với bạn thì trong 5 giây đó em bị Disconect (em làm host), hết 5 giây thì bình thường :-??
 
Cái skill trên có 1 lỗi là khi dùng skill gây damage khác vào đối phương thì nó cũng có hiệu lực, giờ muốn sửa là chỉ khi tấn công nó mới có hiệu lực thì làm thế nào?

Nếu đã dùng trigger take damage để tạo trigger thì khả năng cao là nên dùng if/then/else thì hơn.
Ae check hộ leak của 2 spell này hộ mình. Spell 1 Dispersion (phản damage của spectre càng xa damage phản lại càng ít đi)
Mã:
Deflect Take Damage
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Set DeflectAdd = (Units in (Playable map area))
        Unit Group - Pick every unit in DeflectAdd and do (Actions)
            Loop - Actions
                Unit Group - Add (Picked unit) to DeflectAddSource
                Trigger - Add to Deflect Damage Start <gen> the event (Unit - (Picked unit) Takes damage)
        Custom script:   call DestroyGroup( udg_DeflectAddSource )

Deflect Damage Detector
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        ((Triggering unit) is in DeflectAddSource) Equal to False
    Actions
        Unit Group - Add (Triggering unit) to DeflectAddSource
        Trigger - Add to Deflect Damage Start <gen> the event (Unit - (Triggering unit) Takes damage)

Deflect Damage Start
    Events
    Conditions
    Actions
        Trigger - Turn off (This trigger)
        Set DeflectTarget = (Triggering unit)
        Set DeflectDamage = (Damage taken)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Dispersion  for DeflectTarget) Greater than 0
            Then - Actions
                Unit - Set life of DeflectTarget to ((Life of DeflectTarget) + (0.28 x DeflectDamage))
                Set DeflectionGroupDamage = (Units within 1000.00 of (Position of DeflectTarget) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Dead) Equal to False) and (((Matching unit) belongs to an ally of
                Unit Group - Pick every unit in DeflectionGroupDamage and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Distance between (Position of DeflectTarget) and (Position of (Picked unit))) Less than or equal to 300.00
                                ((Picked unit) is in DeflectionGroupDamageFar) Equal to False
                                ((Picked unit) is in DeflectionGroupDamageModerate) Equal to False
                                (Unit-type of (Picked unit)) Not equal to Land Mine
                                (Unit-type of (Picked unit)) Not equal to Bomb Trap
                            Then - Actions
                                Unit Group - Add (Picked unit) to DeflectionGroupDamageClose
                                Unit - Cause DeflectTarget to damage (Picked unit), dealing (0.28 x DeflectDamage) damage of attack type Chaos and damage type Universal
                                Special Effect - Create a special effect attached to the head of (Picked unit) using Abilities\Spells\Undead\DeathandDecay\DeathandDecayDamage.mdl
                                Special Effect - Destroy (Last created special effect)
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Distance between (Position of DeflectTarget) and (Position of (Picked unit))) Less than or equal to 700.00
                                ((Picked unit) is in DeflectionGroupDamageFar) Equal to False
                                ((Picked unit) is in DeflectionGroupDamageClose) Equal to False
                                (Unit-type of (Picked unit)) Not equal to Land Mine
                                (Unit-type of (Picked unit)) Not equal to Bomb Trap
                            Then - Actions
                                Unit Group - Add (Picked unit) to DeflectionGroupDamageModerate
                                Unit - Cause DeflectTarget to damage (Picked unit), dealing (0.20 x DeflectDamage) damage of attack type Chaos and damage type Universal
                                Special Effect - Create a special effect attached to the head of (Picked unit) using Abilities\Spells\Undead\DeathandDecay\DeathandDecayDamage.mdl
                                Special Effect - Destroy (Last created special effect)
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Distance between (Position of DeflectTarget) and (Position of (Picked unit))) Less than or equal to 1000.00
                                ((Picked unit) is in DeflectionGroupDamageClose) Equal to False
                                ((Picked unit) is in DeflectionGroupDamageModerate) Equal to False
                                (Unit-type of (Picked unit)) Not equal to Land Mine
                                (Unit-type of (Picked unit)) Not equal to Bomb Trap
                            Then - Actions
                                Unit Group - Add (Picked unit) to DeflectionGroupDamageFar
                                Unit - Cause DeflectTarget to damage (Picked unit), dealing (0.12 x DeflectDamage) damage of attack type Chaos and damage type Universal
                                Special Effect - Create a special effect attached to the head of (Picked unit) using Abilities\Spells\Undead\DeathandDecay\DeathandDecayDamage.mdl
                                Special Effect - Destroy (Last created special effect)
                            Else - Actions
                Custom script:   call DestroyGroup (udg_DeflectionGroupDamage)
                Unit Group - Remove all units from DeflectionGroupDamageClose
                Unit Group - Remove all units from DeflectionGroupDamageModerate
                Unit Group - Remove all units from DeflectionGroupDamageFar
            Else - Actions
        -------- ---------------------- --------
        Trigger - Turn on (This trigger)

Spell 2 Dust Tornado với vô số loop và hiệu ứng linh tinh, khả năng cao là khi cast phép quá 3 4 lần là giật tung màn hình :))
Mã:
GT Main
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Dust Tornado 
    Actions
        Trigger - Turn on GT Loop <gen>
        Trigger - Turn on GT Loop Effect <gen>
        Trigger - Turn on GT Loop Effect 2 <gen>
        Trigger - Turn on GT Loop Spin Dust <gen>
        -------- SETTINGS --------
        -------- This is the damage per 1/20 of second. --------
        Unit - Create 1 Tornado Dust for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
        Unit - Add a 9.50 second Generic expiration timer to (Last created unit)
        Animation - Play (Last created unit)'s birth animation
        Animation - Queue (Last created unit)'s stand walk animation
        Set Dummy = (Last created unit)
        Set GT_DamagePerSecond = 200.00
        -------- This is the AOE of Tornado. NOTE: 400 AOE ~ 100% Tornado Size --------
        Set GT_TornadoAOE = 500.00
        -------- This is the flying height inc/dec per 1/20 of second --------
        Set GT_FlyingRate = 15.50
        -------- This is the spin speed per 1/20 of second --------
        Set GT_SpinSpeed = 30.00
        -------- This is the maximum height that Tornado can reach --------
        Set GT_TornadoHeight = 600.00
        -------- This is the unit filter --------
        Set GT_AffectsFlyingUnits = False
        -------- END --------
        Set GT_CastCount = (GT_CastCount + 1)
        Set GT_IsHeightMax[GT_CastCount] = False
        Set GT_Caster[GT_CastCount] = (Triggering unit)
        Set GT_TargetPoint[GT_CastCount] = (Target point of ability being cast)
        Custom script:   set udg_ES_Splat = "THNE"
        Ubersplat - Create ubersplat at GT_TargetPoint[GT_CastCount] of type ES_Splat with color (100.00%, 100.00%, 100.00%) and 0.00% transparency (Disable paused state, Disable skipping birth time)
        Ubersplat - Change (Last created ubersplat): Enable render always state
        Set GT_AbilityLevelDamage[GT_CastCount] = ((Real((Level of (Ability being cast) for (Triggering unit)))) x GT_DamagePerSecond)
        Custom script:   set udg_GT_TornadoGroup[udg_GT_CastCount] = CreateGroup()
        Custom script:   set udg_GT_DamageGroup[udg_GT_CastCount] = CreateGroup()
        Custom script:   set udg_GT_DustGroup[udg_GT_CastCount] = CreateGroup()
        For each (Integer GT_LoopInteger) from 1 to 4, do (Actions)
            Loop - Actions
                Unit - Create 1 Dummy Tornado for (Owner of (Triggering unit)) at GT_TargetPoint[GT_CastCount] facing ((Real(GT_LoopInteger)) x 90.00) degrees
                Unit - Add a 9.50 second Generic expiration timer to (Last created unit)
                Unit Group - Add (Last created unit) to GT_TornadoGroup[GT_CastCount]
        For each (Integer GT_LoopInteger) from 1 to 6, do (Actions)
            Loop - Actions
                Unit - Create 1 Dust Tornado for (Owner of Dummy) at ((Position of Dummy) offset by 175.00 towards (60.00 x (Real(GT_LoopInteger))) degrees) facing Default building facing degrees
                Unit - Add a 9.50 second Generic expiration timer to (Last created unit)
                Unit Group - Add (Last created unit) to GT_DustGroup[GT_CastCount]

GT Loop
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        For each (Integer GT_LoopInteger) from 1 to GT_CastCount, do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in GT_TornadoGroup[GT_LoopInteger] and do (Actions)
                    Loop - Actions
                        Unit - Make (Picked unit) face ((Facing of (Picked unit)) + GT_SpinSpeed) over 0.00 seconds
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                GT_IsHeightMax[GT_LoopInteger] Equal to False
                            Then - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Current flying height of (Picked unit)) Less than GT_TornadoHeight
                                    Then - Actions
                                        Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) + GT_FlyingRate) at 0.00
                                    Else - Actions
                                        Set GT_IsHeightMax[GT_LoopInteger] = True
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Current flying height of (Picked unit)) Greater than or equal to 94.00
                                    Then - Actions
                                        Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) - GT_FlyingRate) at 0.00
                                    Else - Actions
                                        Set GT_IsHeightMax[GT_LoopInteger] = False
                        Set GT_CurrentHeight = (Current flying height of (Picked unit))
                        Set GT_CurrentFace = (Facing of (Picked unit))
                Custom script:   set bj_wantDestroyGroup = true
                Unit Group - Pick every unit in (Units within GT_TornadoAOE of GT_TargetPoint[GT_LoopInteger] matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) is A flying unit) Equal to True
                                GT_AffectsFlyingUnits Equal to False
                            Then - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        ((Picked unit) is in GT_DamageGroup[GT_LoopInteger]) Equal to False
                                    Then - Actions
                                        Unit Group - Add (Picked unit) to GT_DamageGroup[GT_LoopInteger]
                                        Unit - Turn collision for (Picked unit) Off
                                        Unit - Add Destroyer Form  to (Picked unit)
                                        Unit - Remove Destroyer Form  from (Picked unit)
                                    Else - Actions
                                Set GT_LeakPoint[1] = (Position of (Picked unit))
                                Set GT_LeakPoint[2] = (GT_LeakPoint[1] offset by ((Distance between GT_LeakPoint[1] and GT_TargetPoint[GT_LoopInteger]) / 50.00) towards (Angle from GT_LeakPoint[1] to GT_TargetPoint[GT_LoopInteger]) degrees)
                                Unit - Move (Picked unit) instantly to GT_LeakPoint[2]
                                Animation - Change (Picked unit) flying height to GT_CurrentHeight at 0.00
                                Unit - Make (Picked unit) face GT_CurrentFace over 0.00 seconds
                                Custom script:   call RemoveLocation(udg_GT_LeakPoint[1])
                                Custom script:   call RemoveLocation(udg_GT_LeakPoint[2])
                                Unit - Cause GT_Caster[GT_LoopInteger] to damage (Picked unit), dealing GT_AbilityLevelDamage[GT_LoopInteger] damage of attack type Spells and damage type Universal
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        ((Picked unit) is dead) Equal to True
                                    Then - Actions
                                        Animation - Change (Picked unit) flying height to (Default flying height of (Picked unit)) at 1000.00
                                    Else - Actions
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        ((Picked unit) is in GT_DamageGroup[GT_LoopInteger]) Equal to False
                                    Then - Actions
                                        Unit Group - Add (Picked unit) to GT_DamageGroup[GT_LoopInteger]
                                        Unit - Turn collision for (Picked unit) Off
                                        Unit - Add Destroyer Form  to (Picked unit)
                                        Unit - Remove Destroyer Form  from (Picked unit)
                                    Else - Actions
                                Set GT_LeakPoint[1] = (Position of (Picked unit))
                                Set GT_LeakPoint[2] = (GT_LeakPoint[1] offset by ((Distance between GT_LeakPoint[1] and GT_TargetPoint[GT_LoopInteger]) / 50.00) towards (Angle from GT_LeakPoint[1] to GT_TargetPoint[GT_LoopInteger]) degrees)
                                Unit - Move (Picked unit) instantly to GT_LeakPoint[2]
                                Unit - Make (Picked unit) face GT_CurrentFace over 0.00 seconds
                                Animation - Change (Picked unit) flying height to GT_CurrentHeight at 0.00
                                Custom script:   call RemoveLocation(udg_GT_LeakPoint[1])
                                Custom script:   call RemoveLocation(udg_GT_LeakPoint[2])
                                Unit - Cause GT_Caster[GT_LoopInteger] to damage (Picked unit), dealing GT_AbilityLevelDamage[GT_LoopInteger] damage of attack type Spells and damage type Universal
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        ((Picked unit) is dead) Equal to True
                                    Then - Actions
                                        Animation - Change (Picked unit) flying height to (Default flying height of (Picked unit)) at 1000.00
                                    Else - Actions

GT Loop Effect
    Events
        Time - Every 0.25 seconds of game time
    Conditions
    Actions
        Sound - Play CycloneBirth1 <gen> at 100.00% volume, located at (Position of Dummy) with Z offset 100.00
        For each (Integer GT_LoopInteger) from 1 to GT_CastCount, do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in GT_TornadoGroup[GT_LoopInteger] and do (Actions)
                    Loop - Actions
                Unit Group - Pick every unit in (Units within GT_TornadoAOE of GT_TargetPoint[GT_LoopInteger] matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) is A flying unit) Equal to True
                                GT_AffectsFlyingUnits Equal to False
                            Then - Actions
                                Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                                Special Effect - Destroy (Last created special effect)
                            Else - Actions
                                Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                                Special Effect - Destroy (Last created special effect)
        Unit Group - Pick every unit in GT_DustGroup[GT_LoopInteger] and do (Actions)
            Loop - Actions
                Unit - Make (Picked unit) face ((Facing of (Picked unit)) + GT_SpinSpeed) over 0.00 seconds
                Set GT_CurrentFaceDummy = (Facing of (Picked unit))
        Custom script:   set bj_wantDestroyGroup = true
        Unit Group - Pick every unit in (Units within GT_TornadoAOE of GT_TargetPoint[GT_LoopInteger] matching ((Unit-type of (Matching unit)) Equal to Dust Tornado)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is A flying unit) Equal to True
                        GT_AffectsFlyingUnits Equal to False
                    Then - Actions
                        Set GT_LeakPoint[3] = (Position of (Picked unit))
                        Unit - Make (Picked unit) face GT_CurrentFace over 0.00 seconds
                        Custom script:   call RemoveLocation(udg_GT_LeakPoint[3])
                    Else - Actions
                        Set GT_LeakPoint[3] = (Position of (Picked unit))
                        Unit - Make (Picked unit) face GT_CurrentFace over 0.00 seconds
                        Custom script:   call RemoveLocation(udg_GT_LeakPoint[3])
        Sound - Play CycloneDeath1 <gen> at 100.00% volume, located at (Position of Dummy) with Z offset 100.00

GT Loop Effect 2
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        For each (Integer GT_LoopInteger) from 1 to GT_CastCount, do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in GT_TornadoGroup[GT_LoopInteger] and do (Actions)
                    Loop - Actions
                Unit Group - Pick every unit in (Units within GT_TornadoAOE of GT_TargetPoint[GT_LoopInteger] matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) is A flying unit) Equal to True
                                GT_AffectsFlyingUnits Equal to False
                            Then - Actions
                                Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
                                Special Effect - Destroy (Last created special effect)
                            Else - Actions
                                Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
                                Special Effect - Destroy (Last created special effect)

GT Loop Spin Dust
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        For each (Integer GT_LoopInteger) from 1 to GT_CastCount, do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in GT_DustGroup[GT_LoopInteger] and do (Actions)
                    Loop - Actions
                        Unit - Make (Picked unit) face ((Facing of (Picked unit)) + GT_SpinSpeed) over 0.00 seconds
                        Set GT_CurrentFaceDummy = (Facing of (Picked unit))
                Custom script:   set bj_wantDestroyGroup = true
                Unit Group - Pick every unit in (Units within GT_TornadoAOE of GT_TargetPoint[GT_LoopInteger] matching ((Unit-type of (Matching unit)) Equal to Dust Tornado)) and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) is A flying unit) Equal to True
                                GT_AffectsFlyingUnits Equal to False
                            Then - Actions
                                Set GT_LeakPoint[3] = (Position of (Picked unit))
                                Unit - Make (Picked unit) face GT_CurrentFace over 0.00 seconds
                                Custom script:   call RemoveLocation(udg_GT_LeakPoint[3])
                            Else - Actions
                                Set GT_LeakPoint[3] = (Position of (Picked unit))
                                Unit - Make (Picked unit) face GT_CurrentFace over 0.00 seconds
                                Custom script:   call RemoveLocation(udg_GT_LeakPoint[3])

GT End
    Events
        Unit - A unit Finishes casting an ability
        Unit - A unit Stops casting an ability
    Conditions
        (Ability being cast) Equal to Dust Tornado 
    Actions
        Unit - Create 1 Dummy Unit for (Owner of GT_Caster[GT_CastCount]) at GT_TargetPoint[GT_CastCount] facing Default building facing degrees
        Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
        Unit - Add Great Tornado Stomp  to (Last created unit)
        Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
        For each (Integer GT_LoopInteger) from 1 to GT_CastCount, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Triggering unit) Equal to GT_Caster[GT_LoopInteger]
                    Then - Actions
                        Unit Group - Pick every unit in GT_TornadoGroup[GT_LoopInteger] and do (Actions)
                            Loop - Actions
                                Animation - Change (Picked unit)'s animation speed to 300.00% of its original speed
                                Unit - Kill (Picked unit)
                                Unit - Kill Dummy
                        Unit Group - Pick every unit in GT_DustGroup[GT_LoopInteger] and do (Actions)
                            Loop - Actions
                                Unit - Kill (Picked unit)
                        Unit Group - Pick every unit in GT_DamageGroup[GT_LoopInteger] and do (Actions)
                            Loop - Actions
                                Unit - Turn collision for (Picked unit) On
                                Animation - Change (Picked unit) flying height to (Default flying height of (Picked unit)) at 1250.00
                                Unit - Cause GT_Caster[GT_LoopInteger] to damage (Picked unit), dealing 0.00 damage of attack type Chaos and damage type Universal
                                Unit - Create 1 Dummy Unit for (Owner of GT_Caster[GT_CastCount]) at (Position of (Picked unit)) facing Default building facing degrees
                                Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                                Unit - Add Great Tornado DPS  to (Last created unit)
                                Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Picked unit)
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        ((Picked unit) is dead) Equal to True
                                    Then - Actions
                                        Animation - Change (Picked unit) flying height to (Default flying height of (Picked unit)) at 1250.00
                                    Else - Actions
                        Custom script:   call RemoveLocation(udg_GT_TargetPoint[udg_GT_LoopInteger])
                        Set GT_TargetPoint[GT_LoopInteger] = GT_TargetPoint[GT_CastCount]
                        Set GT_Caster[GT_LoopInteger] = GT_Caster[GT_CastCount]
                        Set GT_IsHeightMax[GT_LoopInteger] = GT_IsHeightMax[GT_CastCount]
                        Unit Group - Remove all units from GT_TornadoGroup[GT_LoopInteger]
                        Unit Group - Add all units of GT_TornadoGroup[GT_CastCount] to GT_TornadoGroup[GT_LoopInteger]
                        Unit Group - Remove all units from GT_DamageGroup[GT_LoopInteger]
                        Unit Group - Add all units of GT_DamageGroup[GT_CastCount] to GT_DamageGroup[GT_LoopInteger]
                        Unit Group - Remove all units from GT_DustGroup[GT_LoopInteger]
                        Unit Group - Add all units of GT_DustGroup[GT_CastCount] to GT_DustGroup[GT_LoopInteger]
                        Custom script:   call DestroyGroup(udg_GT_TornadoGroup[udg_GT_CastCount])
                        Custom script:   call DestroyGroup(udg_GT_DamageGroup[udg_GT_CastCount])
                        Custom script:   call DestroyGroup(udg_GT_DustGroup[udg_GT_CastCount])
                        Set GT_CastCount = (GT_CastCount - 1)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                GT_CastCount Equal to 0
                            Then - Actions
                                Trigger - Turn off GT Loop <gen>
                                Trigger - Turn off GT Loop Effect <gen>
                                Trigger - Turn off GT Loop Effect 2 <gen>
                                Trigger - Turn off GT Loop Spin Dust <gen>
                            Else - Actions
                    Else - Actions

Spell 3: Knockback Stomp
Mã:
NS Begin Copy
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Great Tornado Stomp 
    Actions
        Set NS_Unit[1] = (Casting unit)
        Set NS_Pos[1] = (Position of NS_Unit[1])
        Custom script:   set udg_ES_Splat = "THNE"
        Ubersplat - Create ubersplat at (Position of (Triggering unit)) of type ES_Splat with color (100.00%, 100.00%, 100.00%) and 0.00% transparency (Disable paused state, Disable skipping birth time)
        Ubersplat - Change (Last created ubersplat): Enable render always state
        Unit Group - Pick every unit in (Units within 500.00 of (Position of NS_Unit[1]) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) belongs to an enemy of  and do (Actions)
            Loop - Actions
                Unit - Create 1 Dummy Unit for (Owner of NS_Unit[1]) at (Position of (Picked unit)) facing Default building facing degrees
                Unit - Add Great Tornado Stun  to (Last created unit)
                Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Set NS_Unit[2] = (Picked unit)
        Set NS_Slidecount = 0
        Trigger - Turn on NS Color Copy <gen>

NS Color Copy
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
            Then - Actions
                Set NS_Pos[2] = (Position of NS_Unit[2])
                Set NS_Angle = (Angle from NS_Pos[1] to NS_Pos[2])
                Set NS_Pos[3] = (NS_Pos[1] offset by 50.00 towards NS_Angle degrees)
                Set NS_Group = (Units within 500.00 of NS_Pos[1] matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of NS_Un
                Unit Group - Pick every unit in NS_Group and do (Actions)
                    Loop - Actions
                        Unit - Cause NS_Unit[1] to damage (Picked unit), dealing 10000.00 damage of attack type Chaos and damage type Unknown
                        Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
                        Special Effect - Destroy (Last created special effect)
                Set NS_Pos[6] = (Position of NS_Unit[1])
                Trigger - Turn on NS Slide Copy <gen>
                Trigger - Turn off (This trigger)
            Else - Actions

NS Slide Copy
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in NS_Group and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is dead) Equal to True
                    Then - Actions
                        Animation - Change (Picked unit) flying height to (Default flying height of (Picked unit)) at 1250.00
                        Set NS_Pos[4] = (Position of (Picked unit))
                        Set NS_Angle = (Angle from NS_Pos[3] to NS_Pos[4])
                        Set NS_Pos[5] = (NS_Pos[4] offset by 7.35 towards NS_Angle degrees)
                        Unit - Move (Picked unit) instantly to NS_Pos[5]
                        Special Effect - Create a special effect at NS_Pos[4] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
                        Special Effect - Destroy (Last created special effect)
                        Custom script:   call RemoveLocation(udg_NS_Pos[4])
                        Custom script:   call RemoveLocation(udg_NS_Pos[5])
                    Else - Actions
                        Set NS_Pos[4] = (Position of (Picked unit))
                        Set NS_Angle = (Angle from NS_Pos[3] to NS_Pos[4])
                        Set NS_Pos[5] = (NS_Pos[4] offset by 7.35 towards NS_Angle degrees)
                        Unit - Move (Picked unit) instantly to NS_Pos[5]
                        Special Effect - Create a special effect at NS_Pos[4] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
                        Special Effect - Destroy (Last created special effect)
                        Custom script:   call RemoveLocation(udg_NS_Pos[4])
                        Custom script:   call RemoveLocation(udg_NS_Pos[5])
                Destructible - Pick every destructible within 200.00 of (Position of (Picked unit)) and do (Actions)
                    Loop - Actions
                        Destructible - Kill (Picked destructible)
        Set NS_Slidecount = (NS_Slidecount + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                NS_Slidecount Equal to 92
            Then - Actions
                Trigger - Turn off (This trigger)
                For each (Integer A) from 1 to 6, do (Actions)
                    Loop - Actions
                        Custom script:   call RemoveLocation(udg_NS_Pos[bj_forLoopAIndex])
                Set NS_Unit[(Integer A)] = No unit
                Unit Group - Remove all units from NS_Group
                Custom script:   call DestroyGroup( udg_NS_Group )
            Else - Actions
 
cho mình hỏi về nguyên nhân của mất kết nối 1 player :| nghĩa là đang test, tự dưng 1 người bị disconec, trong khi mọi người thấy hắn "left the game"
 
Nếu là do local player thì tất dis ngay lập tức trừ host,còn dis từ từ có time đếm ngược thì chỉ có thể do đường truyền...
 
cám ơn bác, sẵn cho em hỏi thêm lí do nào khiến game bị delay (có lẽ k phải do kết nối, vì chính host cũng bị :@) )
delay ban đầu là 1s, sau này lên 3s, quit luôn
 
Các bác ơi giúp mình với. Tại sao với code này, khi với vào game thì nó có tạo quái, nhưng khi kill hết một lượt thì ko hồi sinh nữa trong khi event là every 1 second rồi ? Chỉ có 1 Hero đánh thôi nhé.
Mã:
Devil Square Copy
    Events
        Time - Every 1.00 seconds of game time
    Conditions
        (Number of units in (Units in Devil Square <gen>)) Less than or equal to 5
    Actions
        Unit - Create 12 Devil Earthbound Infernal for Player 10 (Light Blue) at (Center of Devil Square <gen>) facing Default building facing degrees
 
Các bác ơi giúp mình với. Tại sao với code này, khi với vào game thì nó có tạo quái, nhưng khi kill hết một lượt thì ko hồi sinh nữa trong khi event là every 1 second rồi ? Chỉ có 1 Hero đánh thôi nhé.
Mã:
Devil Square Copy
    Events
        Time - Every 1.00 seconds of game time
    Conditions
        [B](Number of units in (Units in Devil Square <gen>)) Less than or equal to 5[/B]
    Actions
        Unit - Create 12 Devil Earthbound Infernal for Player 10 (Light Blue) at (Center of Devil Square <gen>) facing Default building facing degrees
Thứ nhất làm thế này rất leak,thứ hai là bạn chẳng đặt điều kiện gì cho cái group đó nên khi các unit trước đó chết rồi nhưng vẫn bỏ lại xác,thì nó vẫn tính là 1 đơn vị trong group

cám ơn bác, sẵn cho em hỏi thêm lí do nào khiến game bị delay (có lẽ k phải do kết nối, vì chính host cũng bị :@) )
delay ban đầu là 1s, sau này lên 3s, quit luôn

Remove leak là một,dùng wait-checking condition sai cách là hai,và rất rất nhiều lý do nữa khiến game bị delay
 
có lẽ là "wait-checking condition" rồi, thanks bác nhé
 
Sao khi làm Loading Screen thì khi vào game nhìn nó xấu thế? Em đã thử các kích cỡ 1024x768 và 512x512 đều như vậy. Làm sao cho ảnh nó nét như DotA được không?
 
Sao khi làm Loading Screen thì khi vào game nhìn nó xấu thế? Em đã thử các kích cỡ 1024x768 và 512x512 đều như vậy. Làm sao cho ảnh nó nét như DotA được không?
Vậy thì làm ảnh cỡ 2048x1536 hoặc to hơn nữa thì nét :4cool_cold:
 
Sao khi làm Loading Screen thì khi vào game nhìn nó xấu thế? Em đã thử các kích cỡ 1024x768 và 512x512 đều như vậy. Làm sao cho ảnh nó nét như DotA được không?

Bạn cứ so sánh với Dota làm gì :)) Dota nó là hoàn hảo đến mức bựa dị sida rồi :)) Còn mình dùng 1024x768 chia ra làm 4 ảnh import vào map chất lượng vẫn giữ nguyên.
 
Ai tạo giúp skill này bằng Trigger với:
Ném 1 quả bomb độc vào đối phương gây damage = lv skill x streng x 2 , có 30% khiến đối phương nhiễm độc gây damage = 5% max HP đối phương,tồn tại 3s,khi đối phương đang nhiễm độc mà HP hiện tại dưới 20% thì kill luôn.
Hi sinh 30% max HP để tạo nên những rễ cây xung quanh mình Aoe 350 trói tất cả đối phương trong 3s,gây damage trên s bằng lượng HP vừa hi sinh x level skill x 0.1.. cái này có lẽ sửa lại từ skill con Treant Protector trong DotA đc nhỉ
 
Back
Top