Dark Gamer
Legend of Zelda
- 26/8/07
- 1,125
- 29
- Thread starter
- #1,161
@ask : Animation - Change (Unit can sua)'s vertex coloring to (100.00%, 100.00%, 100.00%) with x% transparency
x càng to càng mờ
show damage :
varible :
Dam : real
UnitTakeDam : Unit
UnitBiTakeDam : Unit
Group : Unit Group
Boolean : Boolean Array // cái nài nhằm biết xem cái play nào muốn show dam
Đầu tiên bạn cho
ở phần mở đầu của map
cần tạo 2 trigger :
nhiệm vụ của cái nài là để add toàn bộ unit mà sau nai xuất hiện vào trong 1 group để tránh trùng lập. Đồng thời add unit thêm cái Event Take Damage
đây là phần show damage. nếu bạn muốn show cho play nào thì Set Boolean[Number của play] = true
có gì hok hỉu thì hỏi ná
mình có gửi file ở dưới
nói thực mình cũng chưa test có lỗi thì sr ná :)
thêm cái :
@ hok nhớ tên :) : cái vụ buff tăng max life thì trigger mình hok biết cách làm multi ( tức là stack ấy ) mà bạn phải làm cooldown > duration thôi :whew:
sytem tăng max life
sytem tăng max mana
và cách sử dụng vd :
khi bạn chat test thì sẽ có Max_Life = số life bạn muốn thêm
coi như nó là buff dur = 30s nhé
Some Unit là unit mún add thêm
enjoy
quên mất là có 3 var nhé :
Max_Life = integer
Max_Mana = integer
Some_Unit = unit
map ở dưới
x càng to càng mờ
show damage :
varible :
Dam : real
UnitTakeDam : Unit
UnitBiTakeDam : Unit
Group : Unit Group
Boolean : Boolean Array // cái nài nhằm biết xem cái play nào muốn show dam
Đầu tiên bạn cho
Mã:
Initialization
Events
Map initialization
Conditions
Actions
Melee Game - Use melee time of day (for all players)
Set Group = (Units in (Playable map area))
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Set Boolean[(Integer A)] = True
Unit Group - Pick every unit in Group and do (Actions)
Loop - Actions
Trigger - Add to Cai thu 2 <gen> the event (Unit - (Picked unit) Takes damage)
cần tạo 2 trigger :
Mã:
Cai thu 1
Events
Unit - A unit enters (Playable map area)
Conditions
((Triggering unit) is in Group) Equal to False
Actions
Unit Group - Add (Triggering unit) to Group
Trigger - Add to Cai thu 2 <gen> the event (Unit - (Triggering unit) Takes damage)
nhiệm vụ của cái nài là để add toàn bộ unit mà sau nai xuất hiện vào trong 1 group để tránh trùng lập. Đồng thời add unit thêm cái Event Take Damage
Mã:
Cai thu 2
Events
Conditions
Actions
Trigger - Turn off (This trigger)
Set UnitTakeDam = (Damage source)
Set UnitBiTakeDamage = (Triggering unit)
Set Dam = (Damage taken)
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
Boolean[(Integer A)] Equal to True
Then - Actions
Floating Text - Create floating text that reads (String(Dam)) above UnitTakeDam with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Show (Last created floating text) for (Player group((Player((Integer A)))))
Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
Floating Text - Change (Last created floating text): Enable permanence
Floating Text - Change the fading age of (Last created floating text) to 1.50 seconds
Else - Actions
Set UnitBiTakeDamage = No unit
Set UnitTakeDam = No unit
Set Dam = 0.00
Trigger - Turn on (This trigger)
đây là phần show damage. nếu bạn muốn show cho play nào thì Set Boolean[Number của play] = true
có gì hok hỉu thì hỏi ná
mình có gửi file ở dưới
nói thực mình cũng chưa test có lỗi thì sr ná :)
thêm cái :
@ hok nhớ tên :) : cái vụ buff tăng max life thì trigger mình hok biết cách làm multi ( tức là stack ấy ) mà bạn phải làm cooldown > duration thôi :whew:
Mã:
Set Max Hp
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Max_Hp Greater than 0
Then - Actions
Set Loop_Integer = ((Max_Hp - (Max_Hp mod 100)) / 100)
For each (Integer A) from 1 to Loop_Integer, do (Actions)
Loop - Actions
Unit - Add Max Life Modifier to Some_Unit
Unit - Set level of Max Life Modifier for Some_Unit to 4
Unit - Remove Max Life Modifier from Some_Unit
Set Max_Hp = (Max_Hp mod 100)
Set Loop_Integer = ((Max_Hp - (Max_Hp mod 10)) / 10)
For each (Integer A) from 1 to Loop_Integer, do (Actions)
Loop - Actions
Unit - Add Max Life Modifier to Some_Unit
Unit - Set level of Max Life Modifier for Some_Unit to 3
Unit - Remove Max Life Modifier from Some_Unit
Set Max_Hp = (Max_Hp mod 10)
For each (Integer A) from 1 to Max_Hp, do (Actions)
Loop - Actions
Unit - Add Max Life Modifier to Some_Unit
Unit - Set level of Max Life Modifier for Some_Unit to 2
Unit - Remove Max Life Modifier from Some_Unit
Else - Actions
Set Max_Hp = (0 - Max_Hp)
Set Loop_Integer = ((Max_Hp - (Max_Hp mod 100)) / 100)
For each (Integer A) from 1 to Loop_Integer, do (Actions)
Loop - Actions
Unit - Add Max Life Modifier to Some_Unit
Unit - Set level of Max Life Modifier for Some_Unit to 7
Unit - Remove Max Life Modifier from Some_Unit
Set Max_Hp = (Max_Hp mod 100)
Set Loop_Integer = ((Max_Hp - (Max_Hp mod 10)) / 10)
For each (Integer A) from 1 to Loop_Integer, do (Actions)
Loop - Actions
Unit - Add Max Life Modifier to Some_Unit
Unit - Set level of Max Life Modifier for Some_Unit to 6
Unit - Remove Max Life Modifier from Some_Unit
Set Max_Hp = (Max_Hp mod 10)
For each (Integer A) from 1 to Max_Hp, do (Actions)
Loop - Actions
Unit - Add Max Life Modifier to Some_Unit
Unit - Set level of Max Life Modifier for Some_Unit to 5
Unit - Remove Max Life Modifier from Some_Unit
sytem tăng max life
Mã:
Set Max Mana
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Max_Mana Greater than 0
Then - Actions
Set Loop_Integer = ((Max_Mana - (Max_Mana mod 100)) / 100)
For each (Integer A) from 1 to Loop_Integer, do (Actions)
Loop - Actions
Unit - Add Max Mana Modifier to Some_Unit
Unit - Set level of Max Mana Modifier for Some_Unit to 4
Unit - Remove Max Mana Modifier from Some_Unit
Set Max_Mana = (Max_Mana mod 100)
Set Loop_Integer = ((Max_Mana - (Max_Mana mod 10)) / 10)
For each (Integer A) from 1 to Loop_Integer, do (Actions)
Loop - Actions
Unit - Add Max Mana Modifier to Some_Unit
Unit - Set level of Max Mana Modifier for Some_Unit to 3
Unit - Remove Max Mana Modifier from Some_Unit
Set Max_Mana = (Max_Mana mod 10)
For each (Integer A) from 1 to Max_Hp, do (Actions)
Loop - Actions
Unit - Add Max Mana Modifier to Some_Unit
Unit - Set level of Max Mana Modifier for Some_Unit to 2
Unit - Remove Max Mana Modifier from Some_Unit
Else - Actions
Set Max_Mana = (0 - Max_Mana)
Set Loop_Integer = ((Max_Mana - (Max_Mana mod 100)) / 100)
For each (Integer A) from 1 to Loop_Integer, do (Actions)
Loop - Actions
Unit - Add Max Mana Modifier to Some_Unit
Unit - Set level of Max Mana Modifier for Some_Unit to 7
Unit - Remove Max Mana Modifier from Some_Unit
Set Max_Mana = (Max_Mana mod 100)
Set Loop_Integer = ((Max_Mana - (Max_Mana mod 10)) / 10)
For each (Integer A) from 1 to Loop_Integer, do (Actions)
Loop - Actions
Unit - Add Max Mana Modifier to Some_Unit
Unit - Set level of Max Mana Modifier for Some_Unit to 6
Unit - Remove Max Mana Modifier from Some_Unit
Set Max_Mana = (Max_Mana mod 10)
For each (Integer A) from 1 to Max_Hp, do (Actions)
Loop - Actions
Unit - Add Max Mana Modifier to Some_Unit
Unit - Set level of Max Mana Modifier for Some_Unit to 5
Unit - Remove Max Mana Modifier from Some_Unit
sytem tăng max mana
và cách sử dụng vd :
Mã:
Test Set Max Hp and Mana
Events
Player - Player 1 (Red) types a chat message containing test as A substring
Conditions
Actions
Set Group = (Units currently selected by Player 1 (Red))
Unit Group - Pick every unit in Group and do (Actions)
Loop - Actions
Set Max_Hp = 300
Set Max_Mana = 300
Set Some_Unit = (Picked unit)
Trigger - Run Set Max Hp <gen> (ignoring conditions)
Trigger - Run Set Max Mana <gen> (ignoring conditions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Max Life Modifier for (Picked unit)) Equal to 0
Then - Actions
Game - Display to (All players) for 30.00 seconds the text: (Set Max HP for + (Name of (Picked unit)))
Else - Actions
Wait 30.00 seconds
Unit Group - Pick every unit in Group and do (Actions)
Loop - Actions
Set Max_Hp = -300
Set Max_Mana = -300
Set Some_Unit = (Picked unit)
Trigger - Run Set Max Hp <gen> (ignoring conditions)
Trigger - Run Set Max Mana <gen> (ignoring conditions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Max Life Modifier for (Picked unit)) Equal to 0
Then - Actions
Game - Display to (All players) for 30.00 seconds the text: (Set Max HP for + (Name of (Picked unit)))
Else - Actions
khi bạn chat test thì sẽ có Max_Life = số life bạn muốn thêm
coi như nó là buff dur = 30s nhé
Some Unit là unit mún add thêmenjoy
quên mất là có 3 var nhé :
Max_Life = integer
Max_Mana = integer
Some_Unit = unit
map ở dưới
bạn thử dùng preload xem sao
