
Từ bài viết của
viet8426
bước đấy thì em biết rồi =.=" ý em hỏi là hỏi phần Trigger ấy =.="
Ý quên ko bỏ vào code ^^
Trigger 1:
Code:
Bottle
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Healing Salve
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has an item of type Bottle 3/3) Equal to True
Then - Actions
Wait 3.00 seconds
Item - Remove (Item carried by (Triggering unit) of type Bottle 3/3)
Hero - Create Bottle 2/3 and give it to (Triggering unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has an item of type Bottle 2/3) Equal to True
Then - Actions
Wait 3.00 seconds
Item - Remove (Item carried by (Triggering unit) of type Bottle 2/3)
Hero - Create Bottle 1/3 and give it to (Triggering unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has an item of type Bottle 1/3) Equal to True
Then - Actions
Wait 3.00 seconds
Item - Remove (Item carried by (Triggering unit) of type Bottle 1/3)
Hero - Create Bottle 0/3 and give it to (Triggering unit)
Else - Actions
Trigger 2:
Code:
Bottle 2
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Set Point = (Position of Fountain of Health 0001 <gen>)
Set Group = (Units within 500.00 of Point matching ((((Matching unit) has an item of type Bottle 2/3) Equal to True) or ((((Matching unit) has an item of type Bottle 1/3) Equal to True) or (((Matching unit) has an item of type Bottle 0/3) Equal to True))))
Unit Group - Pick every unit in Group and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has an item of type Bottle 2/3) Equal to True
Then - Actions
Item - Remove (Item carried by (Picked unit) of type Bottle 2/3)
Hero - Create Bottle 3/3 and give it to (Picked unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has an item of type Bottle 1/3) Equal to True
Then - Actions
Item - Remove (Item carried by (Picked unit) of type Bottle 1/3)
Hero - Create Bottle 3/3 and give it to (Picked unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has an item of type Bottle 0/3) Equal to True
Then - Actions
Item - Remove (Item carried by (Picked unit) of type Bottle 0/3)
Hero - Create Bottle 3/3 and give it to (Picked unit)
Else - Actions
Custom script: call RemoveLocation(udg_Point)
Custom script: call DestroyGroup(udg_Group)
---------- Post added at 17:10 ---------- Previous post was at 17:08 ----------

Từ bài viết của
zzchaolegionzz
nói kĩ hơn đi

Cho cái map demo nè: http://www.mediafire.com/download.php?diwtutnfthb9nom
Bookmarks