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

Status
Không mở trả lời sau này.
Có cách nào để tắt nhận exp của 1 hero không các bạn. Ví dụ người chơi A có 2 hero là hero 1 và hero 2. Giờ mình muốn chỉ hero 1 nhận exp còn hero 2 không nhận exp thì dùng lệnh gì vậy? Thx
-----------------------
Mình thấy rồi :D

Bạn có thể cho mọi người thấy bạn thấy gì không? Mình chưa biết vụ này :">
 
Drop item đã set sẵn.
Mình ví dụ: Khi vừa vào map thì tạo 1 trigger set 4 item
Mã:
Set item[1] = Item1
Set item[2] = Item2
Set item[3] = Item3
Set item[4] = Item4
Rồi tạo 1 trigger cho drop, vậy viết trigger này tới chỗ Action thì viết làm sao để random drop duy nhất 4 item trên ?
 
Chỉnh sửa cuối:
Rớt item là nghề của mình. :D

Set TempLoc = (Position of (Dying unit))
Set random_item = (Random integer number between 1 and 100)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
random_item Less than or equal to 70
Then - Actions
Set int_item = (Random integer number between 1 and 4)
Item - Create item[int_item] at TempLoc
Special Effect - Create a special effect at UnitDiesLoc using Abilities\Spells\Undead\AnimateDead\...v...v...
Special Effect - Destroy (Last created special effect)
call RemoveLocation(udg_TempLoc)
Else - Actions

Đây là lệnh cắt suất ăn cơm của hero.

Hero - Disable experience gain for (Last created unit)

Quên: Nếu bạn muốn rớt 1 lúc cả 4 item thì làm cái lệnh
for (inter A) for 1 to 4.
loop
Item - Create item[inter A] at TempLoc
 
Chỉnh sửa cuối:
Đã làm đc :D Thanks meo
P/s:
random_item Less than or equal to 70, dòng này là % để rớt random 1 trong 4 item trên đã set phải ko.
 
Thực ra thì mình thấy biến random_item hơi thừa. :-?
 
Không có cũng không sao. lắp trực tiếp vào if cũng được mà. :D nhưng nếu có nhiều đồ thì để thế này đỡ phải chỉnh từng chỗ.
 
1 ví dụ do WordEditor làm :
Hôm nay xin đóng góp thêm 1 spell custom lục từ đống spell cũ ^^!
[spoil]Tên Spell: Black Hole ( GUI - MUI )
Mô tả: Spell dạng channel, khi cast spell sẽ hút các unit địch trong khoảng cách vào hố đen, trước khi hố đen đóng lại sẽ có 1 luồng sáng lóe lên, tất cả unit gần hố đen sẽ bị hút vào một không gian khác, các unit khác không ở gần tâm hố đen sẽ may mắn thoát chết, cánh cổng thời gian đóng lại và tất cả sẽ chẳng còn gì sót lại ngoài vài...vũng máu bê bết đỏ... :)

Black Hole xuất hiện, mở ra cánh cổng đến không gian khác...
blackhole1.jpg


...và lúc cánh cổng bắt đầu khép lại..
blackhole2.jpg


...một ánh sáng hiện lên, Black Hole đã khép lại và mang theo tất cả những nạn nhân xấu số của nó.
blackhole3.jpg


Và đây là các trigger

Black Hole
Mã:
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Black Hole 
    Actions
        Set MUI = (MUI + 1)
        Set Caster[MUI] = (Casting unit)
        Set Boolean[MUI] = True
        Set TargetPoint[MUI] = (Target point of ability being cast)
        Unit - Create 1 Dummy Black hole for (Owner of Caster[MUI]) at TargetPoint[MUI] facing Default building facing degrees
        Set Dummy1[MUI] = (Last created unit)
        Unit - Create 1 Dummy Black hole (2) for (Owner of Caster[MUI]) at TargetPoint[MUI] facing Default building facing degrees
        Set Dummy2[MUI] = (Last created unit)
        Set Integer[MUI] = (((Level of Black Hole  for Caster[MUI]) x 125) + 71)
        Countdown Timer - Start Timer as a Repeating timer that will expire in 0.04 seconds

Black Hole Run
Mã:
    Events
        Time - Timer expires
    Conditions
    Actions
        For each (Integer A) from 1 to MUI, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Integer[(Integer A)] Greater than 71
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Boolean[(Integer A)] Equal to False
                            Then - Actions
                                Set Integer[(Integer A)] = 72
                            Else - Actions
                        Set Group[(Integer A)] = (Units within 1000.00 of TargetPoint[(Integer A)] matching ((((Matching unit) belongs to an enemy of (Owner of Caster[(Integer A)])) Equal to True) and (((Matching unit) is alive) Equal to True)))
                        Unit Group - Pick every unit in Group[(Integer A)] and do (Actions)
                            Loop - Actions
                                Set Point[(Integer A)] = (Position of (Picked unit))
                                Set PointMove[(Integer A)] = (Point[(Integer A)] offset by 8.00 towards (Angle from Point[(Integer A)] to TargetPoint[(Integer A)]) degrees)
                                Unit - Turn collision for (Picked unit) Off
                                Unit - Pause (Picked unit)
                                Unit - Move (Picked unit) instantly to PointMove[(Integer A)]
                                Unit - Unpause (Picked unit)
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (((Picked unit) is in Groupcheck[(Integer A)]) Equal to False) and (((Picked unit) is alive) Equal to True)
                                    Then - Actions
                                        Unit Group - Add (Picked unit) to Groupcheck[(Integer A)]
                                    Else - Actions
                                Custom script:   call RemoveLocation(udg_Point[bj_forLoopAIndex])
                                Custom script:   call RemoveLocation(udg_PointMove[bj_forLoopAIndex])
                        Custom script:   call DestroyGroup(udg_Group[bj_forLoopAIndex])
                        Set Integer[(Integer A)] = (Integer[(Integer A)] - 1)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Integer[(Integer A)] Greater than 70
                            Then - Actions
                                Set Group[(Integer A)] = (Units within 1000.00 of TargetPoint[(Integer A)] matching ((((Matching unit) belongs to an enemy of (Owner of Caster[(Integer A)])) Equal to True) and (((Matching unit) is alive) Equal to True)))
                                Unit Group - Pick every unit in Group[(Integer A)] and do (Actions)
                                    Loop - Actions
                                        Set Point[(Integer A)] = (Position of (Picked unit))
                                        Set PointMove[(Integer A)] = (Point[(Integer A)] offset by 8.00 towards (Angle from Point[(Integer A)] to TargetPoint[(Integer A)]) degrees)
                                        Unit - Turn collision for (Picked unit) Off
                                        Unit - Pause (Picked unit)
                                        Unit - Move (Picked unit) instantly to PointMove[(Integer A)]
                                        Unit - Unpause (Picked unit)
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (((Picked unit) is in Groupcheck[(Integer A)]) Equal to False) and (((Picked unit) is alive) Equal to True)
                                            Then - Actions
                                                Unit Group - Add (Picked unit) to Groupcheck[(Integer A)]
                                            Else - Actions
                                        Custom script:   call RemoveLocation(udg_Point[bj_forLoopAIndex])
                                        Custom script:   call RemoveLocation(udg_PointMove[bj_forLoopAIndex])
                                Custom script:   call DestroyGroup(udg_Group[bj_forLoopAIndex])
                                Unit - Create 1 Dummy Effect for Neutral Passive at TargetPoint[(Integer A)] facing Default building facing degrees
                                Set Integer[(Integer A)] = (Integer[(Integer A)] - 1)
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        Integer[(Integer A)] Greater than 1
                                    Then - Actions
                                        Set Group[(Integer A)] = (Units within 1000.00 of TargetPoint[(Integer A)] matching ((((Matching unit) belongs to an enemy of (Owner of Caster[(Integer A)])) Equal to True) and (((Matching unit) is alive) Equal to True)))
                                        Unit Group - Pick every unit in Group[(Integer A)] and do (Actions)
                                            Loop - Actions
                                                Set Point[(Integer A)] = (Position of (Picked unit))
                                                Set PointMove[(Integer A)] = (Point[(Integer A)] offset by 8.00 towards (Angle from Point[(Integer A)] to TargetPoint[(Integer A)]) degrees)
                                                Unit - Turn collision for (Picked unit) Off
                                                Unit - Pause (Picked unit)
                                                Unit - Move (Picked unit) instantly to PointMove[(Integer A)]
                                                Unit - Unpause (Picked unit)
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        (((Picked unit) is in Groupcheck[(Integer A)]) Equal to False) and (((Picked unit) is alive) Equal to True)
                                                    Then - Actions
                                                        Unit Group - Add (Picked unit) to Groupcheck[(Integer A)]
                                                    Else - Actions
                                                Custom script:   call RemoveLocation(udg_Point[bj_forLoopAIndex])
                                                Custom script:   call RemoveLocation(udg_PointMove[bj_forLoopAIndex])
                                        Custom script:   call DestroyGroup(udg_Group[bj_forLoopAIndex])
                                        Set Integer[(Integer A)] = (Integer[(Integer A)] - 1)
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                Integer[(Integer A)] Greater than 0
                                            Then - Actions
                                                Set Group[(Integer A)] = (Units within 300.00 of TargetPoint[(Integer A)] matching ((((Matching unit) belongs to an enemy of (Owner of Caster[(Integer A)])) Equal to True) and (((Matching unit) is alive) Equal to True)))
                                                Unit Group - Pick every unit in Group[(Integer A)] and do (Actions)
                                                    Loop - Actions
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            If - Conditions
                                                                ((Picked unit) is A Hero) Equal to True
                                                            Then - Actions
                                                            Else - Actions
                                                                Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
                                                        Unit - Cause Caster[(Integer A)] to damage (Picked unit), dealing ((Real((Level of Black Hole  for Caster[(Integer A)]))) x 5000.00) damage of attack type Spells and damage type Normal
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            If - Conditions
                                                                (((Picked unit) is in Groupcheck[(Integer A)]) Equal to True) and (((Picked unit) is dead) Equal to False)
                                                            Then - Actions
                                                                Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                                                            Else - Actions
                                                Unit Group - Pick every unit in Groupcheck[(Integer A)] and do (Actions)
                                                    Loop - Actions
                                                        Unit - Turn collision for (Picked unit) On
                                                Custom script:   call DestroyGroup(udg_Group[bj_forLoopAIndex])
                                                Custom script:   call DestroyGroup(udg_Groupcheck[bj_forLoopAIndex])
                                                Unit - Kill Dummy1[(Integer A)]
                                                Unit - Kill Dummy2[(Integer A)]
                                                Unit - Create 1 Wisp for Neutral Passive at TargetPoint[(Integer A)] facing Default building facing degrees
                                                Special Effect - Create a special effect at TargetPoint[(Integer A)] using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
                                                Special Effect - Destroy (Last created special effect)
                                                Set Integer[(Integer A)] = (Integer[(Integer A)] - 1)
                                                Custom script:   call RemoveLocation(udg_TargetPoint[bj_forLoopAIndex])
                                            Else - Actions

Black Hole Check - Kiểm tra xem hero đã mất chanel hay không
Mã:
    Events
        Unit - A unit Stops casting an ability
    Conditions
        (Ability being cast) Equal to Black Hole 
    Actions
        For each (Integer A) from 1 to MUI, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        And - All (Conditions) are true
                            Conditions
                                Integer[(Integer A)] Greater than 71
                                (Casting unit) Equal to Caster[(Integer A)]
                    Then - Actions
                        Set Boolean[(Integer A)] = False
                    Else - Actions
[/spoil]

Spell này đã lâu lắm rồi nên mình chẳng còn nhớ gì để giảng giải lại, mong các bạn thông cảm @@!
 
Cho e hỏi trigger Spell này có leak hay lỗi gì hok, mà sao khi em cast spell thì gây lag cực độ và làm đứng lun game @@
Trigger 1 :
Mã:
Agent curse
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Agent curse 
    Actions
        Set SW_caster = (Casting unit)
        Set SW_point[1] = (Position of SW_caster)
        Set SW_point[2] = (SW_point[1] offset by 150.00 towards (Facing of SW_caster) degrees)
        Set SW_point[3] = (SW_point[2] offset by 900.00 towards (Facing of SW_caster) degrees)
        Set Dame = ((Real((Level of Agent curse  for SW_caster))) x ((Real((Strength of SW_caster (Include bonuses)))) x 5.00))
        Unit - Create 1 Agent curse for (Owner of SW_caster) at SW_point[2] facing SW_point[3]
        Set SW_dummy = (Last created unit)
        For each (Integer A) from 1 to 2, do (Actions)
            Loop - Actions
                Custom script:   call RemoveLocation(udg_SW_point[bj_forLoopAIndex])
        Trigger - Turn on Agent curse move <gen>
Trigger 2 :
Mã:
Agent curse move
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set SW_point[1] = (Position of SW_dummy)
        Set SW_point[2] = (SW_point[1] offset by 15.00 towards (Facing of SW_dummy) degrees)
        Unit - Move SW_dummy instantly to SW_point[2]
        Environment - Create a 0.01 second Temporary crater deformation at SW_point[1] with radius 200.00 and depth 10.00
        Set SW_group[1] = (Units within 225.00 of SW_point[1] matching (((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of SW_caster)) Equal to True)) and (((Matching unit) is in SW_group[2]) Equal to False)))
        Unit Group - Pick every unit in SW_group[1] and do (Actions)
            Loop - Actions
                Unit - Cause SW_caster to damage (Picked unit), dealing Dame damage of attack type Spells and damage type Normal
                Unit Group - Add (Picked unit) to SW_group[2]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Distance between SW_point[2] and SW_point[3]) Less than or equal to 10.00
            Then - Actions
                Unit - Kill SW_dummy
                Unit Group - Remove all units from SW_group[1]
                Unit Group - Remove all units from SW_group[2]
                For each (Integer A) from 1 to 3, do (Actions)
                    Loop - Actions
                        Custom script:   call RemoveLocation(udg_SW_point[bj_forLoopAIndex])
                Trigger - Turn off (This trigger)
            Else - Actions
                For each (Integer A) from 1 to 2, do (Actions)
                    Loop - Actions
                        Custom script:   call RemoveLocation(udg_SW_point[bj_forLoopAIndex])

Quote lại cái này, ai giúp e với. Cho e hỏi thêm cái này. Khi unit mình cast spell là Point Taget thì làm sao để deal dame custom vào nó giống như pick Unit Group vậy ák ???

Quote lần 3 ai giúp với @@
30 char.................
 
cho hỏi làm cách nào để check được ngày hay đêm, giống kiểu skill 3 của Balanar trong dota chỉ active được vào buổi đêm ấy :">

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

cho hỏi cách check ngày và đêm, giống kiểu skill 3 của Balanar trong dota ấy :">
 
Cho mình hỏi,Bây giờ vào chỗ nhà và mua sách thì mua sách không bị delay
Vậy làm như thế kiểu gì vậy ?
 
Em có một câu hỏi hơi noob tí: Em dùng jassnewgen v5d để làm map do nghe nói nó tốt hơn WE và hỗ trợ viết tiếng V trong map, nhưng có vẻ jassnewgen dựa trên WE của bản 1.21. Như thế thì map làm ra có chạy được trên 1.24e+ không và model của WE 1.21 chắc chắn sẽ thiếu so với bản WE 1.24, còn trigger hay code em sợ cũng sẽ không tốt bằng làm trên WE mới. Các bác trả lời giùm em mấy vấn đề trên, nếu có bản jassnewgen mới hơn hoặc chạy dựa trên 1.24 thì cho em xin.
 
cho hỏi làm cách nào để check được ngày hay đêm, giống kiểu skill 3 của Balanar trong dota chỉ active được vào buổi đêm ấy :">cho hỏi cách check ngày và đêm, giống kiểu skill 3 của Balanar trong dota ấy :">

Mã:
    Events
        Time - Every 2.00 seconds of game time
    Conditions
        (In-game time of day) Greater than or equal to 10.00
    Actions
cho hỏi làm thế nào bán đồ đối phương cũng mua được
Add ability Select Hero. Item sold, không phải Item made.

Cho mình hỏi,Bây giờ vào chỗ nhà và mua sách thì mua sách không bị delay
Vậy làm như thế kiểu gì vậy ?
Object Editor, bạn vào item cần sửa =, đổi
Stats - Stock Start Delay = 0
Stats - Stock Replesnish Interval = 0

Em có một câu hỏi hơi noob tí: Em dùng jassnewgen v5d để làm map do nghe nói nó tốt hơn WE và hỗ trợ viết tiếng V trong map, nhưng có vẻ jassnewgen dựa trên WE của bản 1.21. Như thế thì map làm ra có chạy được trên 1.24e+ không và model của WE 1.21 chắc chắn sẽ thiếu so với bản WE 1.24, còn trigger hay code em sợ cũng sẽ không tốt bằng làm trên WE mới. Các bác trả lời giùm em mấy vấn đề trên, nếu có bản jassnewgen mới hơn hoặc chạy dựa trên 1.24 thì cho em xin.
Cài patch ngoài ổ Warcraft của bạn là 1.24 thì dùng Newgen bình thường, nó ghi là 1.21 nhưng patch 1.24 không sao cả. Tốt nhất từ 1.24 trờ đi nên dùng JNG, vì WE 1.24 sẽ báo lỗi trigger với map của bạn.
 
Chỉnh sửa cuối:
>Em dùng jassnewgen v5d để làm map do nghe nói nó tốt hơn WE và hỗ trợ viết tiếng V trong map

việc có tiếng Việt là do nhập thêm font vào thôi

>có vẻ jassnewgen dựa trên WE của bản 1.21. Như thế thì map làm ra có chạy được trên 1.24e+ không và model của WE 1.21 chắc chắn sẽ thiếu so với bản WE 1.24

các tài nguyên thì phụ thuộc vào phiên bản War của bạn, vẫn có thể truy xuất bình thường
việc JNGP save map ở 1.21 thì không quan trọng, cái chính là code của map ra sao, có gây không tương thích với 1.24e+ ko thôi

>còn trigger hay code em sợ cũng sẽ không tốt bằng làm trên WE mới

trong phần trigger thường (gọi là GUI) thì JNGP bị thiếu so với WE thường
nhg phần JASS thì mạnh hơn
 
có cách nèo khi tăng skill Attribute Bonus mà có + thêm armor ko ? Thanks
 
Mình không nhớ đã đọc ở đâu cách làm skill 3 của thằng súng trong dota, ai chỉ dùm luôn đc không???

---------- Post added at 12:50 ---------- Previous post was at 12:21 ----------

Mình không nhớ đã đọc ở đâu cách làm skill 3 của thằng súng trong dota, ai chỉ dùm luôn đc không???

Quên chú thích thêm là khi học skill sẽ tăng range attack của nó.

---------- Post added at 13:05 ---------- Previous post was at 12:50 ----------

1 cái nữa, ai làm dùm mình 1 cái demo auto cast spell của kiếm thế đc không
 
Làm sao để có thể model khi active spell Immolation ? Khi tắt spell Immolation thì trở lại bình thường ? Thanks
 
Cho mình hỏi Classification Giant có ảnh hưởng gì tới Unit ạ ? =)
 
Status
Không mở trả lời sau này.
Back
Top