Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Em dùng phoenix firechỉnh initial dam thành 2 à
![]()
có ai cho hỏi, khi kill unit rớt item k? (create)
thì khi đó, jass có event item đó ko?
YAN[asian];15767490 nói:Cho hỏi cách :
1. Làm 1 unit bị giảm attack range (tất nhiên là với ranger) và movement speed, càng cầm nhiều item càng giảm.
2. Ép đồ bằng ngọc như trong map của Rex (ko nhớ tên) và map Fday của Kan, cụ thể là ấn cái item "ngọc" vào item muốn ép ấy thì ra 1 item mới.
Stork[gm];15769705 nói:bạn nghĩ poison nova có intial damage ko? tốt nhất nên dùng triggers


ý mình là hỏi cái item này để đặt thời gian remove cho item đócòn item mà rơi ra do trigger sau "A unit dies" thì khỏi cần.
Drop Item
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Footman
Actions
Set TempPoint = (Position of (Triggering unit))
Item - Create Tome of Experience at TempPoint
Custom Script: call RemoveLocation( udg_TempPoint )
Ai chỉ giúp cái này, đang tập tành làm JassCho hỏi cách làm 1 skill Jass đơn giản. Nếu convert từ GUI -> Jass thì ko có cái Local Var. Cho hỏi luôn Local Var và Gobal Var khác nhau thế nào ?? Cái nào để làm MUI ???
P/s: Nếu muốn làm Damage Spell = damage base của hero thì có phải dùng lệnh GetUserData() ko ???
Bài này sẽ hướng dẫn cách hồi sinh hero như DDay: có thời gian theo level của hero, có hiện thời gian đếm ngược.
-----------------------------------
Đầu tiên là vô Region Pallete. Trên menu của WE, Layer \ Region hoặc tại Terrain Editor, ấn "R".
Tạo 2 region là vị trí revive của team 1 và team 2. Của Tom là Team1 HeroRevive và Team2 HeroRevive (xem map demo)
------------------------------------
Sau đó vào Trigger Editor:
Variable: ấn Ctrl + B để tạo
HeroForRevive - Unit Array 12 (12 là số player, size khởi tạo của array)
ReviveTimer - Timer Array 12 (size khởi tạo mà để là 1 thì có lỗi)
ReviveTimerWindow - Timer Window Array 12
TempCheck - Boolean
TempInt - Integer
TempLoc - Point
TempReal - Real
TempUnit - Unit
Trigger:
Tạo 3 trigger:
Trigger trên để "add event" timer expired cho trigger revive chính (HeroRevive đó)Mã:HeroReviveInitialization Events Time - Elapsed game time is 0.00 seconds Conditions Actions For each (Integer A) from 1 to 12, do (Actions) Loop - Actions Trigger - Add to HeroRevive <gen> the event (Time - ReviveTimer[(Integer A)] expires)
Trigger trên là khi một hero chết, tạo thời gian đếm và bảng đếm. Thời gian hồi sinh hero là TempReal (in đậm)Mã:Hero Dies Events Unit - A unit Dies Conditions ((Triggering unit) is A Hero) Equal to True Actions Set TempUnit = (Triggering unit) Set TempInt = (Player number of (Owner of TempUnit)) [B]Set TempReal = (3.00 + (5.00 x (Real((Hero level of TempUnit)))))[/B] Countdown Timer - Start ReviveTimer[TempInt] as a One-shot timer that will expire in TempReal seconds Countdown Timer - Create a timer window for ReviveTimer[TempInt] with title (Name of TempUnit) Set ReviveTimerWindow[TempInt] = (Last created timer window) Countdown Timer - Show ReviveTimerWindow[TempInt] Set HeroForRevive[TempInt] = TempUnit
Trigger trên thì ko thấy event đâu cả, hic Tom quên, nhg đùa thôi, Tom đã add event cho nó ở trigger thứ 1 rồiMã:HeroRevive Events Conditions Actions For each (Integer A) from 1 to 12, do (Actions) Loop - Actions Set TempInt = (Integer A) Custom script: set udg_TempCheck = ( GetExpiredTimer() == udg_ReviveTimer[ udg_TempInt ] ) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions TempCheck Equal to True Then - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (HeroForRevive[TempInt] belongs to an ally of Player 1 (Red)) Equal to True Then - Actions Set TempLoc = (Center of Team1 HeroRevive <gen>) Else - Actions Set TempLoc = (Center of Team2 HeroRevive <gen>) Hero - Instantly revive HeroForRevive[TempInt] at TempLoc, Show revival graphics Camera - Pan camera for (Player(TempInt)) to TempLoc over 0.00 seconds Custom script: call RemoveLocation( udg_TempLoc ) Countdown Timer - Destroy ReviveTimerWindow[TempInt] Else - Actions
Trong trigger này, khi một trong 12 timer kết thúc (tức là thời gian đếm đã về 0) thì sẽ kiếm tra xem timer kết thúc này là timer thứ mấy, từ 1 -> 12. Nếu là timer thứ 1 thì sẽ hồi sinh hero của player 1, là timer thứ 5 thì hồi sinh hero của player 5. Đó là biến TempCheck, có 1 dòng jass - Custom Script ấy nhg ko sao đâu.
Khi TempCheck = true, tức là tìm đc timer bị hết là timer nào, tiến hành revive hero. Thứ 1 là xem hero cần revive thuộc team nào (cái If đó) để xác định vị trí revive. Thứ 2 là hồi sinh hero, dùng lệnh Hero - Revive, sau đó dùng Pan Camera để đưa camera cho player về vị trí hồi sinh. 2 dòng cuối là xóa point để tránh leak và xóa bảng đếm thời gian.
-----
Copy cái này đơn giản thôi, chỉ cần tạo Region, rồi copy hết cái mục Revive Heroes vào, "enable" các lệnh đỏ đỏ là xong.
-----
Chú ý: cái này chỉ "MPI" tức là chỉ hoạt động đúng khi mỗi player có MỘT hero.
Ngoài ra nếu muốn tên hero hay tên player trên bảng đếm thời gian, cũng như có "màu" thì có lẽ newbie nên học thêm đã. Đến lúc nào đó sẽ tự làm đc.
-----
Tom đã gứi kèm map demo ở dưới, ai ko rõ thì cứ vào xem ::)

@tom
có thể tạo dùm một loại mã
khi mua trang bị hồi sinh thì tất cả hồi sinh không
sẳn xóa luôn cái cloodown timer khi mua trang bị hồi sinh
dh-g làm dc mua hồi sinh thôi còn xóa cái cloodown timer khi hồi sinh bằng trang bị là bó tay![]()
ng` ta tạo spell thì ng` ta thích có initial damage hay không là do ng` ta chứ, nghĩ gì nữa
dùng trigger thế nào nhỉ? demo phát nào![]()
Xoaitemtheowait
Events
Time - Every 60.00 seconds of game time //( thời gian cần wait thôi)
Conditions
Actions
Item - Remove (Random item in (Entire map))
ai giúp cái này giúp dùm luôn đi có thể item vừa mới vút ra mất tiêu không biết
[BL].Kunkka;15778444 nói:Ai giúp em làm Regen giống Heart trong Dota với
Heart Item
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) has an item of type Heart) Equal to True))) and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + 1.00)%
Trigger đây:
Mã:Heart Item Events Time - Every 1.00 seconds of game time Conditions Actions Custom script: set bj_wantDestroyGroup = true Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) has an item of type Heart) Equal to True))) and do (Actions) Loop - Actions Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + 1.00)%
Countdown Timer - Destroy ReviveTimerWindow
destroy tat ca timerwindow dc ma`