Mình thử làm trigger kiểu auto cast nhưng không được.Tẹo thử chiêu Diase Cloud gì đó xem<chiêu của abomination nhỉ>?
Cho mình hỏi:
0-Xem giùm chiêu sâu vô hình ở map mình?
1-Mình set đủ 12 player,1->10 của người chơi,11 là computer phe mình,12 là computer phe nó mà sao khi test map nó chỉ hiện 1 cái là mình<red> và 1 cái là computer normal<blue><vẫn chưa add force>
2-Mấy bình máu,mình chỉnh no target require rồi mà cứ bấm sử dụng nó lại hiện ra cái biểu tượng target phải bấm vô người mới sử dụng được?
3-Mấy bình mana mình chỉnh dispel on attack = false rồi mà ăn đòn vẫn mất hồi mana?
4-Mấy cái chỗ Hero Experience Gain ở Gameplay Constant nhờ các bạn hướng dẫn giùm,chỉnh loạn xà ngầu lên à.Có thể chỉnh exp nhận được từ các con quái khác nhau ko<vd lv 5 có con chó và con mèo,đánh chó trung bình 50 exp<có thể random từ 50-75>,đánh mèo trung bình 100<random 100-150>?
0 - lỗi à ? ko rõ lắm

1 - Scenario \ Force Properties <- chưa set force
2 - Bình máu base từ Rejurvenation, sao ko base nốt từ Clarity Potion ?
3 - chịu rồi, ko hiểu. có lẽ là lỗi do nhà sản xuất

4 -
----
Từ
tutorial của
AceHart
Trong Gameplay Constant:
Hero XP Gained - Normal, Constant factor: 5
Hero XP Gained - Normal, Level factor: 5
Hero XP Gained - Normal, Previous value factor: 1
Hero XP Gained - Normal, Table: 25
Level 1 unit sẽ cho:
Hero XP Gained - Normal, Tabl exp, tức là 25 exp
Sau đó, từ level 2, sẽ có:
Experience gained = "Previous value" * "Previous value factor" + "Level" * "Level factor" + "Constant factor"
Exp nhận đc khi kill 1 unit level 2:
25 (previous value) * 1 (previous value factor) + 2 (level) * 5 (level factor) + 5 (constant factor)
= 25 * 1 + 2 * 5 + 5
= 25 + 10 + 5
= 40
Và 1 unit level 3 sẽ cho ta:
40 * 1 + 3 * 5 + 5
= 40 + 15 + 5
= 60
Và level 4 unit cho: 60 * 1 + 4 * 5 + 5 = 85
Rồi cứ thế tiếp tục
---
Theo như tutorial, ko thể random exp nhận đc, nếu muốn làm random, bạn phải "tự cho exp" khi kill unit.
Chuẩn bị 2 biến: ExpGainMin và ExpGainMax, đều là integer và có array. (vì exp là integer)
Bạn phải đặt trước: ExpGainMin[1] đây là số min kinh nghiệm mà giết unit level 1 nhận đc, ExpGainMax[1] đây là số max kinh nghiệm mà giết unit level 1 nhận đc. Đặt từ 1 -> X (tùy), khi dùng thì số index sẽ là level của unit bị giết.
Ngoài ra cần các biến khác: TempGroup (group), TempUnit, TempUnit2( unit), TempInt, TempInt2 (integer)
Mã:
ExpGain
Events
Unit - A unit Dies
Conditions
(Killing unit) Not equal to (Triggering unit)
(Killing unit) Not equal to No unit
((Triggering unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
Actions
Set TempUnit = (Triggering unit)
Set TempUnit2 = (Killing unit)
Set TempLoc = (Position of TempUnit)
Set TempGroup = (Units within 1200.00 of TempLoc matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an ally of (Owner of TempUnit2)) Equal to True)))
Set TempInt = (Level of TempUnit)
Set TempInt2 = (Random integer number between ExpGainMin[TempInt] and ExpGainMax[TempInt])
Set TempInt = (Number of units in TempGroup)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempInt Greater than 0
Then - Actions
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Hero - Add (TempInt2 / TempInt) experience to (Picked unit), Show level-up graphics
Else - Actions
Custom script: call RemoveLocation( udg_TempLoc )
Custom script: call DestroyGroup( udg_TempGroup )
Trigger trên là khi một unit bị chết, nếu ko phải nó tự giết mình (killed himself) và ko phải ko ai giết nó cả và ko phải bị ally giết, ta sẽ pick "hero" trong range 1200 mà là ally của Killing Unit, từ level của unit bị giết, ta có số Exp sẽ nhận đc, random luôn (vào TempInt2) và đếm số hero trong group vừa pick (chia Exp mà) rồi add exp thôi.
Chú ý: nếu làm theo cách này, 4 giá trị trong gameplay constants nói trên, hãy để 0 hết -> tức là ko nhận đc exp từ "tự động cho exp", còn cách trên là "cho exp bằng tay"