jupiter994
Youtube Master Race
- 10/8/09
- 23
- 1
À các bro cho mình hỏi phát , cái action " clear all units from unit group" có phải chống leak memory của "unit group" hay không ??? Cảm ơn nhiều !
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.
À các bro cho mình hỏi phát , cái action " clear all units from unit group" có phải chống leak memory của "unit group" hay không ??? Cảm ơn nhiều !
[COLOR="#0000FF"][B]globals[/B][/COLOR]
integer array tmpInt
group enumGroup=CreateGroup()
[COLOR="#0000FF"][B]endglobals[/B][/COLOR]
[COLOR="#0000FF"]
[B]function[/B][/COLOR] DoSomething[COLOR="#A52A2A"] [B]takes[/B][/COLOR] nothing [COLOR="#A52A2A"][B]returns[/B][/COLOR] boolean
local unit u=GetFilterUnit()
call CreateItem(tmpInt[0],GetUnitX(u),GetUnitY(u))
set u=null
return false
[COLOR="#0000FF"][B]endfucntion[/B][/COLOR]
[COLOR="#0000FF"][B]function [/B][/COLOR]MotHamNaoDoSeGoiHamNay[COLOR="#A52A2A"] [B]takes[/B][/COLOR] integer itemID[COLOR="#A52A2A"][B] returns[/B][/COLOR] nothing
set tmpInt[0]=itemID
call GroupEnumUnitsInRect(enumGroup,bj_mapInitialPlayableArea,Filter(function DoSomething))
[COLOR="#0000FF"][B]endfunction[/B][/COLOR]
local unit enumU
local group g= GroupEnumUnits //để lấy ra unit theo yêu cầu mà thôi
loop
set enumU=FirstOfGroup(g)
exitwhen enumU==null
// the codes
call GroupRemoveUnit(g, enumU)
endloop
Tôi thích KeyTimer hơn :)Chỉ có thể dùng cách TimerUtils của Vex hoặc T32 của jesus



À các bro cho mình hỏi phát , cái action " clear all units from unit group" có phải chống leak memory của "unit group" hay không ??? Cảm ơn nhiều !

Actions
Custom script: set bj_wantDestroyGroup=true
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
Do something
Unit Group Good
Events
Conditions
Actions
Set Temp_Group = (Units in (Playable map area))
Unit Group - Pick every unit in Temp_Group and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)
Custom script: call DestroyGroup (udg_Temp_Group)
,không bik mìk có gọi là newbie không nhỉ 
Trigger đây bạn:cho mình hỏi làm sao để làm mấy cái skill tích trữ? (Giống như skill 3 NVm khi kill 1 unit thì dc tăng thêm 2 Dam)
Untitled Trigger 001
Events
Unit - A unit Dies
Conditions
(Unit-type of (Killing unit)) Equal to (tên hero của bạn)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is A Hero) Equal to True
Then - Actions
Hero - Modify Strength of (Killing unit): Add 3
Else - Actions
Hero - Modify Strength of (Killing unit): Add 3
Wait (10.00 x (Real((Level of (Skill của bạn) for (Killing unit))))) seconds
Hero - Modify Strength of (Killing unit): Subtract 10[COLOR="Silver"]
[SIZE=1]---------- Post added at 13:22 ---------- Previous post was at 13:20 ----------[/SIZE]
[/COLOR]Fix trigger trên
[code]Spell Nevermore
Events
Unit - A unit Dies
Conditions
(Unit-type of (Killing unit)) Equal to (Hero của bạn)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is A Hero) Equal to True
Then - Actions
Hero - Modify Strength of (Killing unit): Add 3
Else - Actions
Hero - Modify Strength of (Killing unit): Add 3
Wait (10.00 x (Real((Level of (Skill của bạn) for (Killing unit))))) seconds
Hero - Modify Strength of (Killing unit): Subtract 10[\code][COLOR="Silver"]
[SIZE=1]---------- Post added at 13:23 ---------- Previous post was at 13:22 ----------[/SIZE]
[/COLOR][quote="leviettuan123123, post: 20728821"]topic có vẻ đắt khách nhỉ :D ,không bik mìk có gọi là newbie không nhỉ :-?[COLOR="Silver"]
[SIZE=1]---------- Post added at 13:20 ---------- Previous post was at 13:14 ----------[/SIZE]
[/COLOR]
Trigger đây bạn:
[code]Untitled Trigger 001
Events
Unit - A unit Dies
Conditions
(Unit-type of (Killing unit)) Equal to (tên hero của bạn)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is A Hero) Equal to True
Then - Actions
Hero - Modify Strength of (Killing unit): Add 3
Else - Actions
Hero - Modify Strength of (Killing unit): Add 3
Wait (10.00 x (Real((Level of (Skill của bạn) for (Killing unit))))) seconds
Hero - Modify Strength of (Killing unit): Subtract 10[COLOR="Silver"]
[SIZE=1]---------- Post added at 13:22 ---------- Previous post was at 13:20 ----------[/SIZE]
[/COLOR]Fix trigger trên
[code]Spell Nevermore
Events
Unit - A unit Dies
Conditions
(Unit-type of (Killing unit)) Equal to (Hero của bạn)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is A Hero) Equal to True
Then - Actions
Hero - Modify Strength of (Killing unit): Add 3
Else - Actions
Hero - Modify Strength of (Killing unit): Add 3
Wait (10.00 x (Real((Level of (Skill của bạn) for (Killing unit))))) seconds
Hero - Modify Strength of (Killing unit): Subtract 10[\code][/QUOTE]
bị sida @@ xin thông cảm
[code]Spell Nevermore
Events
Unit - A unit Dies
Conditions
(Unit-type of (Killing unit)) Equal to (Hero của bạn)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is A Hero) Equal to True
Then - Actions
Hero - Modify Strength of (Killing unit): Add 3
Else - Actions
Hero - Modify Strength of (Killing unit): Add 3
Wait (10.00 x (Real((Level of (Skill của bạn) for (Killing unit))))) seconds
Hero - Modify Strength of (Killing unit): Subtract 10
Hero - Modify Strength of (Killing unit): Add 3
Wait (10.00 x (Real((Level of (Skill của bạn) for (Killing unit))))) seconds
Hero - Modify Strength of (Killing unit): Subtract 10
sorry mình nhấn nhầm Hero - Modify Strength of (Killing unit): Subtract 3 chứ không fải Hero - Modify Strength of (Killing unit): Subtract 10 đâu nhaMình ho hỉu cái dòng cuối cùng này
Mã:Hero - Modify Strength of (Killing unit): Add 3 Wait (10.00 x (Real((Level of (Skill của bạn) for (Killing unit))))) seconds Hero - Modify Strength of (Killing unit): Subtract 10
Wait (10.00 x (Real((Level of (Skill của bạn) for (Killing unit))))) seconds có nghĩa là sẽ đợi sau (10 x với cấp độ skill của con nevermore) thời gian , rồi Hero - Modify Strength of (Killing unit): Subtract 3 strength của người giết sẽ bị trừ đi 3 điểm sau thời gian đó
Wait (10.00 x (Real((Level of (Skill của bạn) for (Killing unit))))) seconds bạn tạo dòng này để chờ sau (10.00 x (Real((Level of (Skill của bạn) for (Killing unit))) thời gian rồi sẽ sử dụng dòng Hero - Modify Strength of (Killing unit): Subtract 3để giảm strength xuống . Xong :)

E có ý tưởng về 1 map ntn :
- Map gồm 2 phe , và 1 con trùm cuối khá mạnh , phe nào giết được con trùm cuối đó thì thắng ! (2 phe có thể kill lẫn nhau)
- Hệ thống quái xuất hiện như DDay .
- Có thể ép đồ như map tổng hợp .
- Boss phụ để kiếm thêm tiền (5' ra 1 con )
- Cứ 15' thì sẽ có 1 món đồ tăng damge thêm +xxxxx xuất hiện tại 1 vị trí nhất định và được bao quanh bởi 4 iron gate ...2 phe sẽ phải phá cửa để ăn item và ra tỉa máu boss ...
ý tưởng tạm thời như vậy , map tạo cho mấy đứa lớp chơi nên cũng lủng củng ...
Em nhờ mấy bác tư vấn giúp e các bước thực hiện ...
Skill Necromastery của Nevermore trong DotA không phải là trigger với action là cộng thêm Stats Points mà là một trigger = JASS với câu lệnh modify damage "thêm vào" . Theo như cách làm của leviettuan123123 thì skill này gần giống với skill 3 của Cóc trong DotA (nhưng của Cóc khác ở chỗ là nó sẽ trừ Primary Attribute của attaked) và đặc biệt điều này chỉ cộng thêm Strenght cho hero và nó cũng chỉ có damage khi và chỉ khi hero đó có Primary Attribute là Strenght![]()
Dài cũng đc, nhưng phải vừa học vừa làm ...thực hành đi đôi vs lý thuyết chắc mau hiểu hơn ...
, thì cứ làm , có gì kó lên đây hỏi ,mọi người sẽ giải đáp mọi khó khăn của bạn để map mau hoàn thiện hơn :)