- 29/8/09
- 2,654
- 5,688
Vậy nghĩa là mình không sử dụng các damage mà các ability có sẵn trong WE gây ra nữa mà dùng system này deal damage thì mới phân biệt được ?
phải .
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.
Vậy nghĩa là mình không sử dụng các damage mà các ability có sẵn trong WE gây ra nữa mà dùng system này deal damage thì mới phân biệt được ?
)

Ai cho mình hỏi:
Map mình chỉ import model, texture, và tileset. Size map trên 30mb ()
Rồi mình thay mấy model đó vào các unit có sẵn trong object để chơi melee với model mới
Thì chơi khoảng 5p bị fatal là sao nhỉ?![]()


Ánh sáng màu xanh thì cậu vào chỗ này down map The Ultimate Terraining Map 3.0.w3x
Vào Object Editor phần Cinematic tìm Light: Blue (Affects Shadows)
Đấy là phần ánh sáng màu xanh. Còn phần tuyết rơi thì chịu

^ Tạo một region, rồi nhấp vào và chỉnh weather effect![]()




^ Vừa sửa à
Làm mình tưởng ....
Weather cậu nói như là?
Mưa, tuyết,.. hả
Chắc phải tìm model tương thích, rồi dùng ability Armor Bonus cuả item để attach cho unit đó![]()
^ Vừa sửa à
Làm mình tưởng ....
Weather cậu nói như là?
Mưa, tuyết,.. hả
Chắc phải tìm model tương thích, rồi dùng ability Armor Bonus cuả item để attach cho unit đó![]()
library AutoIndexStorageHandle initializer Init
/*
su dung de danh dau' thu' tu. cac unit khi vua moi tao ra
ReleaseIndex(U) su dung de giai phong bo nho hashtable
GetIndex(U) su dung de lay lai con so' thu tu vua duoc cap phep cho unit truoc do'
*/
//**********************************************
globals
private integer Index = 0
private group g = CreateGroup()
private hashtable hash = InitHashtable()
endglobals
//**********************************************
function GetIndex takes unit u returns integer
local integer i = LoadInteger(hash, GetHandleId(u), 0)
if i == 0 then
debug call BJDebugMsg("Wexgen Auto Index: this unit not set index!")
return i
endif
return i
endfunction
function ReleaseIndex takes unit u returns nothing
local integer i = LoadInteger(hash, GetHandleId(u), 0)
if i == 0 then
debug call BJDebugMsg("Wexgen Auto Index: this unit dont sign index")
return
endif
set dex[i] = 0
call FlushChildHashtable(hash, GetHandleId(u))
call GroupRemoveUnit(g, u)
debug call BJDebugMsg("Wexgen Auto Index: this unit has been release index!")
endfunction
private function cond takes nothing returns boolean
local unit u = GetTriggerUnit()
if not IsUnitInGroup(u, g) and not IsUnitType(u, UNIT_TYPE_DEAD) then // and IsUnitType(u, UNIT_TYPE_HERO) == true then
set u = null
return true
endif
call ReleaseIndex(u)
set u = null
return false
endfunction
private function f takes nothing returns nothing
local unit u = GetTriggerUnit()
set Index = Index + 1 // 3
call SaveInteger(hash, GetHandleId(u), 0, Index)
call GroupAddUnit(g, u)
debug call BJDebugMsg("Wexgen Auto Index: this unit has been sign is No." + I2S(GetIndex(u)))
set u = null
endfunction
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
local region r = CreateRegion()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH )
call RegionAddRect(r, bj_mapInitialPlayableArea)
call TriggerRegisterEnterRegion(t, r, null)
call TriggerAddCondition(t, Condition( function cond ) )
call TriggerAddAction(t, function f )
endfunction
endlibrary
Untitled Trigger 001
Events
Unit - A unit Spawns a summoned unit
Conditions
(Unit-type of (Summoned unit)) Equal to Footman
Actions
Set int = (int + 1)
Region - Center region[int] on (Position of Unit[int])
Untitled Trigger 002
Events
Map initialization
Conditions
Actions
Set region[1] = Region 000 <gen>
Set region[2] = Region 000 Copy <gen>
Set region[3] = Region 000 Copy Copy <gen>

Spell là thế này, nguyên lý như sau: tạo ra 1 cái pit (AoE). hiện lên mấy cái gai xung quanh đấy ok? unit nào đi vào thì bị mất 100 máu và bị trói trong vòng 3s (nhưng chỉ 1 lần -> tức là nếu unit này đã đi vào cái Pit rồi và sau khi hết trói sẽ ko bị trói và nhận damage thêm nữa). Ai xem mình lỗi ở đâuPit of Malice
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Pit of Malice
Actions
For each (Integer A) from 1 to 24, do (Actions)
Loop - Actions
Special Effect - Destroy PitOfMalice[(Integer A)]
Set PitInteger = (PitInteger + 1)
Set PitInteger2[PitInteger] = (PitInteger2[PitInteger] + 1)
Set PitCaster = (Casting unit)
Set PitPosition = (Target point of ability being cast)
Set PitGroupDamage = (Units within 350.00 of PitPosition matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of PitCaster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in PitG
Set PitDuration[PitInteger] = 7.00
Sound - Play TempleOfTheDamnedWhat <gen> at 100.00% volume, located at PitPosition with Z offset 0.00
Unit Group - Pick every unit in PitGroupDamage and do (Actions)
Loop - Actions
Unit - Create 1 Dummy Unit for (Owner of PitCaster) at PitPosition facing Default building facing degrees
Unit - Add Pit Roots (Passive) to (Last created unit)
Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle (Picked unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
For each (Integer A) from 1 to 24, do (Actions)
Loop - Actions
Set PitTargetPosition = (PitPosition offset by 350.00 towards (15.00 x (Real((Integer A)))) degrees)
Special Effect - Create a special effect at PitTargetPosition using Abilities\Spells\Undead\Graveyard\GraveMarker.mdl
Set PitOfMalice[(Integer A)] = (Last created special effect)
Trigger - Turn on Pit of Malice lock <gen>
Pit of Malice lock
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Set PitDuration[PitInteger] = (PitDuration[PitInteger] - 0.10)
Unit Group - Pick every unit in PitGroupDamage and do (Actions)
Loop - Actions
Unit - Create 1 Dummy Unit for (Owner of PitCaster) at PitPosition facing Default building facing degrees
Unit - Add Pit Roots (Passive) to (Last created unit)
Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle (Picked unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PitDuration[PitInteger] Less than or equal to 0.00
Then - Actions
For each (Integer A) from 1 to 24, do (Actions)
Loop - Actions
Special Effect - Destroy PitOfMalice[(Integer A)]
Trigger - Turn off (This trigger)
Unit Group - Remove all units from PitGroupDamageDone
Custom script: call DestroyGroup( udg_PitGroupDamage )
Custom script: call DestroyGroup( udg_PitGroupDamageDone )
Custom script: call RemoveLocation( udg_PitPosition )
Custom script: call RemoveLocation( udg_PitTargetPosition )
Else - Actions
ai cho mình hỏi làm cách nào để trong fun ReleaseIndex có thể tận dụng lại dải số Index?
ví dụ khi unit A ra đời sẽ đánh số 1 và unit B sẽ là số 2 còn lại C là số 3 D là số 4
nhưng trong lúc đó C(3) mà chết thì số (3) của C sẽ được để dành cho E (tức E ra đời sẽ mang số 3) còn F ra đời thì tiếp tục mang dải số tiếp theo là số 5
ai help mình vụ này với nghĩ hoài hok ra :(
Mã:library AutoIndexStorageHandle initializer Init /* su dung de danh dau' thu' tu. cac unit khi vua moi tao ra ReleaseIndex(U) su dung de giai phong bo nho hashtable GetIndex(U) su dung de lay lai con so' thu tu vua duoc cap phep cho unit truoc do' */ //********************************************** globals private integer Index = 0 private group g = CreateGroup() private hashtable hash = InitHashtable() endglobals //********************************************** function GetIndex takes unit u returns integer local integer i = LoadInteger(hash, GetHandleId(u), 0) if i == 0 then debug call BJDebugMsg("Wexgen Auto Index: this unit not set index!") return i endif return i endfunction function ReleaseIndex takes unit u returns nothing local integer i = LoadInteger(hash, GetHandleId(u), 0) if i == 0 then debug call BJDebugMsg("Wexgen Auto Index: this unit dont sign index") return endif set dex[i] = 0 call FlushChildHashtable(hash, GetHandleId(u)) call GroupRemoveUnit(g, u) debug call BJDebugMsg("Wexgen Auto Index: this unit has been release index!") endfunction private function cond takes nothing returns boolean local unit u = GetTriggerUnit() if not IsUnitInGroup(u, g) and not IsUnitType(u, UNIT_TYPE_DEAD) then // and IsUnitType(u, UNIT_TYPE_HERO) == true then set u = null return true endif call ReleaseIndex(u) set u = null return false endfunction private function f takes nothing returns nothing local unit u = GetTriggerUnit() set Index = Index + 1 // 3 call SaveInteger(hash, GetHandleId(u), 0, Index) call GroupAddUnit(g, u) debug call BJDebugMsg("Wexgen Auto Index: this unit has been sign is No." + I2S(GetIndex(u))) set u = null endfunction private function Init takes nothing returns nothing local trigger t = CreateTrigger() local region r = CreateRegion() call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH ) call RegionAddRect(r, bj_mapInitialPlayableArea) call TriggerRegisterEnterRegion(t, r, null) call TriggerAddCondition(t, Condition( function cond ) ) call TriggerAddAction(t, function f ) endfunction endlibrary

Stork[gm];22319757 nói:Tình hình là mình đang vướng skill Pit of Malice của pit lord (dota). lúc đi vào unit ko bị entangle mặc dù đã chỉnh thế này.
Spell là thế này, nguyên lý như sau: tạo ra 1 cái pit (AoE). hiện lên mấy cái gai xung quanh đấy ok? unit nào đi vào thì bị mất 100 máu và bị trói trong vòng 3s (nhưng chỉ 1 lần -> tức là nếu unit này đã đi vào cái Pit rồi và sau khi hết trói sẽ ko bị trói và nhận damage thêm nữa). Ai xem mình lỗi ở đâu
, dmg thì tự cho nhé...Stork[gm];22319757 nói:Tình hình là mình đang vướng skill Pit of Malice của pit lord (dota). lúc đi vào unit ko bị entangle mặc dù đã chỉnh thế này.
Sai ở chỗ lúc đầu khi cast thì set group = unit trong phạm vi đó, sau đó khi lặp thì vẫn lặp với group đó mà không set lại hoặc add thêm unit nào nữa thì nó vẫn không ảnh hưởng tới những unit đi vàoMã:Pit of Malice Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Pit of Malice Actions For each (Integer A) from 1 to 24, do (Actions) Loop - Actions Special Effect - Destroy PitOfMalice[(Integer A)] Set PitInteger = (PitInteger + 1) Set PitInteger2[PitInteger] = (PitInteger2[PitInteger] + 1) Set PitCaster = (Casting unit) Set PitPosition = (Target point of ability being cast) [COLOR="#FF0000"]Set PitGroupDamage = (Units within 350.00 of PitPosition matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of PitCaster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in PitG[/COLOR] Set PitDuration[PitInteger] = 7.00 Sound - Play TempleOfTheDamnedWhat <gen> at 100.00% volume, located at PitPosition with Z offset 0.00 [COLOR="#FF0000"]Unit Group - Pick every unit in PitGroupDamage and do (Actions)[/COLOR] Loop - Actions Unit - Create 1 Dummy Unit for (Owner of PitCaster) at PitPosition facing Default building facing degrees Unit - Add Pit Roots (Passive) to (Last created unit) Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle (Picked unit) Unit - Add a 1.00 second Generic expiration timer to (Last created unit) For each (Integer A) from 1 to 24, do (Actions) Loop - Actions Set PitTargetPosition = (PitPosition offset by 350.00 towards (15.00 x (Real((Integer A)))) degrees) Special Effect - Create a special effect at PitTargetPosition using Abilities\Spells\Undead\Graveyard\GraveMarker.mdl Set PitOfMalice[(Integer A)] = (Last created special effect) Trigger - Turn on Pit of Malice lock <gen> Pit of Malice lock Events Time - Every 0.10 seconds of game time Conditions Actions Set PitDuration[PitInteger] = (PitDuration[PitInteger] - 0.10) Unit Group - Pick every unit in PitGroupDamage and do (Actions) Loop - Actions Unit - Create 1 Dummy Unit for (Owner of PitCaster) at PitPosition facing Default building facing degrees Unit - Add Pit Roots (Passive) to (Last created unit) Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle (Picked unit) Unit - Add a 1.00 second Generic expiration timer to (Last created unit) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions PitDuration[PitInteger] Less than or equal to 0.00 Then - Actions For each (Integer A) from 1 to 24, do (Actions) Loop - Actions Special Effect - Destroy PitOfMalice[(Integer A)] Trigger - Turn off (This trigger) Unit Group - Remove all units from PitGroupDamageDone Custom script: call DestroyGroup( udg_PitGroupDamage ) Custom script: call DestroyGroup( udg_PitGroupDamageDone ) Custom script: call RemoveLocation( udg_PitPosition ) Custom script: call RemoveLocation( udg_PitTargetPosition ) Else - Actions
- - - Updated - - -
sặc! bôi nhầm chỗ rồi, bôi lại nè, mod xóa dùm bài kia dùm em ạ!Stork[gm];22319757 nói:Tình hình là mình đang vướng skill Pit of Malice của pit lord (dota). lúc đi vào unit ko bị entangle mặc dù đã chỉnh thế này.
Sai ở chỗ lúc đầu khi cast thì set group = unit trong phạm vi đó, sau đó khi lặp thì vẫn lặp với group đó mà không set lại hoặc add thêm unit nào nữa thì nó vẫn không ảnh hưởng tới những unit đi vàoMã:Pit of Malice Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Pit of Malice Actions For each (Integer A) from 1 to 24, do (Actions) Loop - Actions Special Effect - Destroy PitOfMalice[(Integer A)] Set PitInteger = (PitInteger + 1) Set PitInteger2[PitInteger] = (PitInteger2[PitInteger] + 1) Set PitCaster = (Casting unit) Set PitPosition = (Target point of ability being cast) [COLOR="#FF0000"]Set PitGroupDamage = (Units within 350.00 of PitPosition matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of PitCaster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in PitG[/COLOR] Set PitDuration[PitInteger] = 7.00 Sound - Play TempleOfTheDamnedWhat <gen> at 100.00% volume, located at PitPosition with Z offset 0.00 Unit Group - Pick every unit in PitGroupDamage and do (Actions) Loop - Actions Unit - Create 1 Dummy Unit for (Owner of PitCaster) at PitPosition facing Default building facing degrees Unit - Add Pit Roots (Passive) to (Last created unit) Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle (Picked unit) Unit - Add a 1.00 second Generic expiration timer to (Last created unit) For each (Integer A) from 1 to 24, do (Actions) Loop - Actions Set PitTargetPosition = (PitPosition offset by 350.00 towards (15.00 x (Real((Integer A)))) degrees) Special Effect - Create a special effect at PitTargetPosition using Abilities\Spells\Undead\Graveyard\GraveMarker.mdl Set PitOfMalice[(Integer A)] = (Last created special effect) Trigger - Turn on Pit of Malice lock <gen> Pit of Malice lock Events Time - Every 0.10 seconds of game time Conditions Actions Set PitDuration[PitInteger] = (PitDuration[PitInteger] - 0.10) [COLOR="#FF0000"]Unit Group - Pick every unit in PitGroupDamage and do (Actions)[/COLOR] Loop - Actions Unit - Create 1 Dummy Unit for (Owner of PitCaster) at PitPosition facing Default building facing degrees Unit - Add Pit Roots (Passive) to (Last created unit) Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle (Picked unit) Unit - Add a 1.00 second Generic expiration timer to (Last created unit) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions PitDuration[PitInteger] Less than or equal to 0.00 Then - Actions For each (Integer A) from 1 to 24, do (Actions) Loop - Actions Special Effect - Destroy PitOfMalice[(Integer A)] Trigger - Turn off (This trigger) Unit Group - Remove all units from PitGroupDamageDone Custom script: call DestroyGroup( udg_PitGroupDamage ) Custom script: call DestroyGroup( udg_PitGroupDamageDone ) Custom script: call RemoveLocation( udg_PitPosition ) Custom script: call RemoveLocation( udg_PitTargetPosition ) Else - Actions
- - - Updated - - -
sặc! bôi nhầm chỗ rồi, bôi lại nè, mod xóa dùm bài kia dùm em ạ!Stork[gm];22319757 nói:Tình hình là mình đang vướng skill Pit of Malice của pit lord (dota). lúc đi vào unit ko bị entangle mặc dù đã chỉnh thế này.
Sai ở chỗ lúc đầu khi cast thì set group = unit trong phạm vi đó, sau đó khi lặp thì vẫn lặp với group đó mà không set lại hoặc add thêm unit nào nữa thì nó vẫn không ảnh hưởng tới những unit đi vàoMã:Pit of Malice Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Pit of Malice Actions For each (Integer A) from 1 to 24, do (Actions) Loop - Actions Special Effect - Destroy PitOfMalice[(Integer A)] Set PitInteger = (PitInteger + 1) Set PitInteger2[PitInteger] = (PitInteger2[PitInteger] + 1) Set PitCaster = (Casting unit) Set PitPosition = (Target point of ability being cast) [COLOR="#FF0000"]Set PitGroupDamage = (Units within 350.00 of PitPosition matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of PitCaster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in PitG[/COLOR] Set PitDuration[PitInteger] = 7.00 Sound - Play TempleOfTheDamnedWhat <gen> at 100.00% volume, located at PitPosition with Z offset 0.00 Unit Group - Pick every unit in PitGroupDamage and do (Actions) Loop - Actions Unit - Create 1 Dummy Unit for (Owner of PitCaster) at PitPosition facing Default building facing degrees Unit - Add Pit Roots (Passive) to (Last created unit) Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle (Picked unit) Unit - Add a 1.00 second Generic expiration timer to (Last created unit) For each (Integer A) from 1 to 24, do (Actions) Loop - Actions Set PitTargetPosition = (PitPosition offset by 350.00 towards (15.00 x (Real((Integer A)))) degrees) Special Effect - Create a special effect at PitTargetPosition using Abilities\Spells\Undead\Graveyard\GraveMarker.mdl Set PitOfMalice[(Integer A)] = (Last created special effect) Trigger - Turn on Pit of Malice lock <gen> Pit of Malice lock Events Time - Every 0.10 seconds of game time Conditions Actions Set PitDuration[PitInteger] = (PitDuration[PitInteger] - 0.10) [COLOR="#FF0000"]Unit Group - Pick every unit in PitGroupDamage and do (Actions)[/COLOR] Loop - Actions Unit - Create 1 Dummy Unit for (Owner of PitCaster) at PitPosition facing Default building facing degrees Unit - Add Pit Roots (Passive) to (Last created unit) Unit - Order (Last created unit) to Night Elf Tree Of Life - Entangle (Picked unit) Unit - Add a 1.00 second Generic expiration timer to (Last created unit) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions PitDuration[PitInteger] Less than or equal to 0.00 Then - Actions For each (Integer A) from 1 to 24, do (Actions) Loop - Actions Special Effect - Destroy PitOfMalice[(Integer A)] Trigger - Turn off (This trigger) Unit Group - Remove all units from PitGroupDamageDone Custom script: call DestroyGroup( udg_PitGroupDamage ) Custom script: call DestroyGroup( udg_PitGroupDamageDone ) Custom script: call RemoveLocation( udg_PitPosition ) Custom script: call RemoveLocation( udg_PitTargetPosition ) Else - Actions