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

Status
Không mở trả lời sau này.
Các anh cho em hỏi làm sao để cho hero lại gần mới nhận exp vậy? Em làm map rồi vào chơi thử thì con hero đứng ở nhà mà cứ lên cấp vùn vụt thôi.

Vào Advance > Gameplay Constants >Stick vào Use Custom Gameplay Constants
Tìm dòng Hero XP - Global Distribution, chỉnh về False.
Muốn chỉnh range nhận XP thì dòng Hero Maximum XP Range sẽ giải quyết.
 
Mình làm một cái mode -ar để random hero,set các biến Hero_Array = Unit Type rồi làm như bên dưới,mà thỉnh thoảng nó cứ trùng lặp các hero giống nhau.,mình phải làm sao ?

Mã:
Events
    Map initialization
Conditions
Actions
Set Random_Count = 78
Set Hero_Array[1] = |cffffff00B¸ T­íc|r
For each (Integer A) from 1 to 78, do (Actions)
    Loop - Actions
        Set Random_Data[(Integer A)] = (Integer A)


Mã:
Events
    Player - Player 2 (Blue) types a chat message containing -ar as An exact match

Conditions

Actions

For each (Integer A) from 1 to 12, do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Player((Integer A))) slot status) Equal to Is playing
            Then - Actions
                Set Random_Hero = (Random integer number between 1 and Random_Count)
                Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
                Selection - Select (Last created unit) for (Owner of (Last created unit))
                Game - Display to (All players) for 10.00 seconds the text: ((Name of (Player((Integer A)))) + ( ®· chän ngÉu nhiªn ®­îc  + (Name of (Last created unit))))
                Camera - Pan camera for (Player((Integer A))) to ((Player((Integer A))) start location) over 0.00 seconds
                Set UnitGroupArray[140] = (Units in pickhero <gen>)
                Unit Group - Pick every unit in UnitGroupArray[140] and do (Actions)
                    Loop - Actions
                        Unit - Remove (Picked unit) from the game
                Custom script:   call DestroyGroup (udg_UnitGroupArray[140])
                Set Random_Data[Random_Hero] = Random_Count
                Set Random_Count = (Random_Count - 1)
            Else - Actions
                Do nothing
 
Chỉnh sửa cuối:
Mình làm một cái mode -ar để random hero,set các biến Hero_Array = Unit Type rồi làm như bên dưới,mà thỉnh thoảng nó cứ trùng lặp các hero giống nhau.,mình phải làm sao ?
[spoil]
Mã:
Events
    Map initialization
Conditions
Actions
Set Random_Count = 78
Set Hero_Array[1] = |cffffff00B¸ T­íc|r
For each (Integer A) from 1 to 78, do (Actions)
    Loop - Actions
        Set Random_Data[(Integer A)] = (Integer A)


Mã:
Events
    Player - Player 2 (Blue) types a chat message containing -ar as An exact match

Conditions

Actions

For each (Integer A) from 1 to 12, do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Player((Integer A))) slot status) Equal to Is playing
            Then - Actions
                Set Random_Hero = (Random integer number between 1 and Random_Count)
                Unit - Create 1 Hero_Array[Random_Data[Random_Hero]] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
                Selection - Select (Last created unit) for (Owner of (Last created unit))
                Game - Display to (All players) for 10.00 seconds the text: ((Name of (Player((Integer A)))) + ( ®· chän ngÉu nhiªn ®­îc  + (Name of (Last created unit))))
                Camera - Pan camera for (Player((Integer A))) to ((Player((Integer A))) start location) over 0.00 seconds
                Set UnitGroupArray[140] = (Units in pickhero <gen>)
                Unit Group - Pick every unit in UnitGroupArray[140] and do (Actions)
                    Loop - Actions
                        Unit - Remove (Picked unit) from the game
                Custom script:   call DestroyGroup (udg_UnitGroupArray[140])
                Set Random_Data[Random_Hero] = Random_Count
                Set Random_Count = (Random_Count - 1)
            Else - Actions
                Do nothing
[/spoil]

1) Tại sao dùng đến biến Random_Data, tớ không hiểu :s
2) Lỗi của Code sau là do: nếu P1 random ra Hero_Array[4] trong 78 biến unit types. Đến lượt P2, vì random từ 1 -> 77 nên Hero_Array[4] vẫn có thể được chọn lại. Việc Set Random_Count = (Random_Count - 1) chỉ làm cho unit type thứ 78 không được random vào.

Theo tớ: bỏ cái Random_Data đi.
Mã:
[SIZE=3]Set Random_Hero = (Random integer number between 1 and Random_Count)
Unit - Create 1 Hero_Array[Random_Hero] for......
..Blah blah...
Set Hero_Array[Random_Hero] = Hero_Array[Random_Count] // Việc trên sau khi random 1 unit type (Vd là Hero_Array[4]=Mirana), trigger sẽ chuyển đổi unit type của Hero_Array[4](Mirana) với Hero_Array[78](Troll).
Set Random_Count = (Random_Count - 1)// không còn random được Mirana nhưng Troll được vì đã trở thành Hero_Array[4] [/SIZE]
 
Chỉnh sửa cuối:
ai làm giúp em cái chiêu của bar trong Diablo 2 với, nó bay lên rồi rớt xuống gây dam area và độ cao phụ thuộc khoảng cách nhưng em muốn cho độ cao ngẫu nhiên tí !
+ giúp em làm chiêu như LMTK của Kiếm đoàn trong map TK lun!^^

ai giúp em với ! :((
 
mọi người cho em hỏi Trigger này :
Actions
Unit - Move BM[1] instantly to ((Position of BM[1]) offset by 100.00 towards (Facing of BM[1]) degrees), facing (Facing of BM[1]) degrees
Set BMGroup[1] = (Units within 85.00 of (Position of BM[1]))
Unit Group - Pick every unit in BMGroup[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A structure) Equal to False
((Picked unit) belongs to an enemy of (Owner of BM[1])) Equal to True
((Picked unit) is alive) Equal to True
((Picked unit) is in BMGroup2) Not equal to True
Then - Actions
Unit Group - Add (Picked unit) to BMGroup2
Unit - Cause BM[1] to damage (Picked unit), dealing (Real(((Agility of BM[1] (Include bonuses)) x 5))) damage of attack type Hero and damage type Cold
EGUI Effect - Create an effect at (Position of (Picked unit)) using the model Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl that lasts for 1.00 seconds
Else - Actions
Custom script: call DestroyGroup ( udg_BMGroup[1] )
Custom script: call DestroyGroup ( udg_BMGroup2 )
Đây là chiêu lướt tới trước mặt cho em hỏi khi lướt 1 unit nó lướt qua có khi gây dame tới 2 lần mà em đả bỏ Picked unit vào Group rồi ?
 
mọi người cho em hỏi Trigger này :
[spoil]
Mã:
Actions
    Unit - Move BM[1] instantly to ((Position of BM[1]) offset by 100.00 towards (Facing of BM[1]) degrees), facing (Facing of BM[1]) degrees
    Set BMGroup[1] = (Units within 85.00 of (Position of BM[1]))
    Unit Group - Pick every unit in BMGroup[1] and do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    ((Picked unit) is A structure) Equal to False
                    ((Picked unit) belongs to an enemy of (Owner of BM[1])) Equal to True
                    ((Picked unit) is alive) Equal to True
                    ((Picked unit) is in BMGroup2) Not equal to True
                Then - Actions
                    Unit Group - Add (Picked unit) to BMGroup2
                    Unit - Cause BM[1] to damage (Picked unit), dealing (Real(((Agility of BM[1] (Include bonuses)) x 5))) damage of attack type Hero and damage type Cold
                    EGUI Effect - Create an effect at (Position of (Picked unit)) using the model Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl that lasts for 1.00 seconds
                Else - Actions
    Custom script:   call DestroyGroup ( udg_BMGroup[1] )
    Custom script:   call DestroyGroup ( udg_BMGroup2 )[/spoil]
Đây là chiêu lướt tới trước mặt cho em hỏi khi lướt 1 unit nó lướt qua có khi gây dame tới 2 lần mà em đả bỏ Picked unit vào Group rồi ?
Lỗi là ở đây: Custom script: call DestroyGroup ( udg_BMGroup2 )
Trong 1 lần slide, bạn hủy group2 thì nó vẫn deal damage như thường.
Solution: bỏ dòng đó đi. Sau khi hết slide thì chỉ Unit Group - Clear BMGroup2.
P/s: (nếu có) lần sau bạn hãy bỏ code vào khung
Mã:
và khung [spoil][/spoil] cho dễ nhìn.

ai làm giúp em cái chiêu của bar trong Diablo 2 với, nó bay lên rồi rớt xuống gây dam area và độ cao phụ thuộc khoảng cách nhưng em muốn cho độ cao ngẫu nhiên tí !
+ giúp em làm chiêu như LMTK của Kiếm đoàn trong map TK lun!^^
Chỉ làm spell đầu, còn kiếm đoàn với LMTK là cái gì tớ chả biết, và chả muốn làm
Note: spell ko MUI. Unit bay với độ cao random và deal damage custom (mặc định sẵn 0.5x (Khoảng cách + Độ cao).
 

Attachments

mọi người cho em hỏi Trigger này :
Actions
Unit - Move BM[1] instantly to ((Position of BM[1]) offset by 100.00 towards (Facing of BM[1]) degrees), facing (Facing of BM[1]) degrees
Set BMGroup[1] = (Units within 85.00 of (Position of BM[1]))
Unit Group - Pick every unit in BMGroup[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A structure) Equal to False
((Picked unit) belongs to an enemy of (Owner of BM[1])) Equal to True
((Picked unit) is alive) Equal to True
((Picked unit) is in BMGroup2) Not equal to True

Then - Actions
Unit Group - Add (Picked unit) to BMGroup2
Unit - Cause BM[1] to damage (Picked unit), dealing (Real(((Agility of BM[1] (Include bonuses)) x 5))) damage of attack type Hero and damage type Cold
EGUI Effect - Create an effect at (Position of (Picked unit)) using the model Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl that lasts for 1.00 seconds
Else - Actions
Custom script: call DestroyGroup ( udg_BMGroup[1] )
Custom script: call DestroyGroup ( udg_BMGroup2 )
Đây là chiêu lướt tới trước mặt cho em hỏi khi lướt 1 unit nó lướt qua có khi gây dame tới 2 lần mà em đả bỏ Picked unit vào Group rồi ?
Để trong hàm If thì là Matching Unit, Pick là dành cho Action

Edit: Sr nhìn nhầm @@ tại ko trong code nên quên nhìn dòng Unit Group trên :D
 
Chỉnh sửa cuối:
^: Đâu phải thế. Để Matching Unit vào những dòng ở trên đố trigger hoạt động đc.
@lonewolf: Thực ra để DestroyGroup thì chính xác hơn. Cái Group đó khi hết slide thì chả dùng gì đến nữa nên chả cần để lại, "destroy" nó đi.
 
có ai giúp mình cái trigger mỗi lần mua hero nó chuyển về chỗ hồ máu team đó như dota không mình mò mãi mà ko đc :((
 
Em sr viết trigger nhằm thật ra ko có Cái dòng custom scrip cuối nhé ,và nó vẫn deal 2 lần dame
 
Em sr viết trigger nhằm thật ra ko có Cái dòng custom scrip cuối nhé ,và nó vẫn deal 2 lần dame
Thử nhét cái hàm if 4 dòng đó vào luôn lúc set Group luôn, rồi dùng Matching unit
 
^ Cậu này khoái matching unit thật =))
Em sr viết trigger nhằm thật ra ko có Cái dòng custom scrip cuối nhé ,và nó vẫn deal 2 lần dame
Nói thế này nhé: đem cái trigger hoàn chỉnh lên giùm đi bạn, cứ úp úp mở mở cái trigger thì tớ chả biết có cái gì để sửa với chữa cả.
P/s: sao biết deal 2 lần damage ??
có ai giúp mình cái trigger mỗi lần mua hero nó chuyển về chỗ hồ máu team đó như dota không mình mò mãi mà ko đc :((
Muốn "như dota" thì gọn vào là thế này:
+ Tạo 1 Region 3 ở vùng pick hero.
+ Tạo Region1 ở hồ máu team 1, tạo Region2 ở hồ máu team 2
+ Tạo 1 trigger với Event Unit enters Region3. Condition đó là hero. Actions gồm có: nếu chủ unit là đồng đội của Sentinel (Boolean Condition), thì move về Region1. Else: move về Region2
 
Cho mình hỏi cái Geminate attack của NW trong Dota làm sao ??
 
Em bik chắc chắn Là nó deal 2,3 lần dame vì Map em có trigger hiện dame khi bị đánh thấy có lúc nó hiện lên 2,3 số 1 lúc nên => nó bị deal tới 2,3 lần dame
 
Cho mình hỏi cái Geminate attack của NW trong Dota làm sao ??
Tạo custom ability of the Orb of Lightning (new) 4 level và unit ability Searing Arrows 4 level có cooldown: 6/5/4/3s. Ability Orb of Lightning (new), chỉnh:
Data - Chance to hit heros: 100%
Data - Chance to hit summons: 100%
Data - Chance to hit units: 100%
Data - Effect Ability: Searing Arrows
Cho hero học Orb of Lightning (new). Tạo trigger:
[spoil]
Mã:
 Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to Geminate Attack <---- ( Orb of Lightning (new) )
    Actions
        Unit - Set level of Searing Arrows for (Triggering unit) to (Level of Geminate Attack for (Triggering unit))
[/spoil]
Nguồn: Tom_K

Em bik chắc chắn Là nó deal 2,3 lần dame vì Map em có trigger hiện dame khi bị đánh thấy có lúc nó hiện lên 2,3 số 1 lúc nên => nó bị deal tới 2,3 lần dame
[spoil]
Mã:
Events
    Every 0.04s of game time
Actions
    Unit - Move BM[1] instantly to ((Position of BM[1]) offset by 100.00 towards (Facing of BM[1]) degrees), facing (Facing of BM[1]) degrees
    Set BMGroup[1] = (Units within 85.00 of (Position of BM[1]))
    Unit Group - Pick every unit in BMGroup[1] and do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    ((Picked unit) is A structure) Equal to False
                    ((Picked unit) belongs to an enemy of (Owner of BM[1])) Equal to True
                    ((Picked unit) is alive) Equal to True
                    ((Picked unit) is in BMGroup2) Equal to False
                Then - Actions
                    Unit Group - Add (Picked unit) to BMGroup2
                    Unit - Cause BM[1] to damage (Picked unit), dealing (Real(((Agility of BM[1] (Include bonuses)) x 5))) damage of attack type Hero and damage type Cold
                    Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                    Special Effect - Destroy (Last created special effect)
                Else - Actions
    Custom script:   call DestroyGroup(udg_BMGroup[1])
[/spoil]
Sau khi hết slide thêm Unit Group - Clear all units in BMGroup2.
Edit: Theo lời game_war thì destroygroup, cái này đúng chỉ khi khi bắt đầu slide bạn có Customscript: set udg_BMGroup2 = CreateGroup() hay Set BMGroup2 = (Create Unit Group) (USMWE). Còn nếu ko thì chỉ clear unit.
 
Chỉnh sửa cuối:
anh Tom cho em xin Y!H để dễ bề học hỏi mấy cái Trigger trong WE dc ko?
 
anh Tom cho em xin Y!H để dễ bề học hỏi mấy cái Trigger trong WE dc ko?

Chắc chắn anh Tom sẽ nói câu là
Sorry, i can't

Mọi người ai biết làm skill dạng shockwave bằng trigger có thể làm giúp mình một cái được ko :-?
 
Chỉnh sửa cuối:
@Evil_Hunter Chắc chắn anh Tom sẽ nói câu là

sao cậu sure :-ss

anh Tom cho em xin Y!H để dễ bề học hỏi mấy cái Trigger trong WE dc ko?

sự thật anh tom bay giờ đang có 1 chuyện mà online chăm sốc WE củng hok dc :-<
 
Các cậu off-topic kinh quá

@fantom: anh Tom cho em xin Y!H để dễ bề học hỏi mấy cái Trigger trong WE dc ko?

Trước hết cậu chơi war3 coi nó có những cái gì thì trong trigger nó sẽ có cái để tạo/chỉnh những cái đó
Đừng để ý đến cái gì phức tạp mà cứ nắm rõ các cái cơ bản trong war3 như unit, item, Ability, effect, rect,....
Trigger nó là tác dụng đến những cái đó qua event
Ngoài các câu lệnh tương tác với những cái trên thì còn có cấc câu lệnh logic như If để phân loại các trường hợp, For để lặp...

Kết hợp nhiều lệnh thì cậu có thể tạo ra các cái phức tạp hơn
Ko hiểu gì thì lên đây search, ở đây ko có thì google search, ko thấy thì topic này sẽ đảm nhận trách nhiệm !
Còn ai có tinh thần trách nhiệm, niềm đam mê , nhiệt huyết với WE + thời gian thì cho bạn ấy xin cái nick YH ....
 
Status
Không mở trả lời sau này.
Back
Top