thx bồ tèo, mà sao tui làm thì cái hình nó bị sai kích cỡ, nó thành hình chữ nhật, còn bị mấy cái đường đen đen chạy ra nữa Nhưng thôi kệ, cái đó tính sau, còn có cái này nữa nè, mọi người giúp giùm : lúc trc có chơi campaign của Undead thì thấy có con hero tên Lich King nhưng không có thanh level, EXP gì cả Vậy thì làm sao để : 1 unit thành 1 hero, mà không cần phải làm cách chuyển model 1 con hero thành model con unit đó, vì em làm sẵn con unit rồi nhưng muốn nó hiện cái icon lên cho giống hero thôi, với lại em không muốn có thanh EXP gì hết
Làm thử thế này: Chỉnh unit đó ở dòng Stats - Unit Classifcation là Worker Tuy nhiên khi unit đó đứng yên thì nó mới hiện Nếu ko phải thì cho cái ảnh để mình xem thử TOM: sử dụng JassNewGenPack, khi tạo mới Object sẽ được phép gõ raw id, cho chữ đầu tiên viết hoa (n000 -> N000) là unit mới tạo sẽ thành hero
Ai chỉ giúp mình lock độ cao của camera lại,chứ chỉnh độ cao của camera sau đó vuốt chuột giữa hay ấn insert hay delete thì camera lại trở về chế độ mặc định P/s: Mình viết một hàm khác để thu gọn lại,mỗi lần gọi đỡ tốn công viết như dưới Mã: function Whoknows takes nothing returns weapontype return WEAPON_TYPE_WHOKNOWS endfunction liệu có bị sao không ? Ví dụ thao tác chậm hơn,lag,blah blah
Trong GUI mình chưa tìm đc cách nào bắt đc chính xác sự kiện unit nhận dam vật lý cả, ko biết trong JASS có cách nào ko? Vd muốn làm skill chém nước của Kunkka hay skill dậm tăng dam của ES trong Dota ấy, làm sao để khi đánh 1 cái thì mất buff...
Không hiểu sao từ lúc mình làm cái trigger khi sử dụng 1 item thì drop item đó và add item mới cho hero thì khi test map load đc 1/4 cái thanh loading là bị "The Frozen Throne has stopped working" Del toàn bộ trigger đó đi vẫn cứ bị như vậy
à cũng có thể thay thành ConvertWeaponType(0) ví dụ Mã: function Whoknows takes nothing returns weapontype return ConvertWeaponType(0) endfunction
Nếu tạo như vậy = GUI Trigger thì độ giật sẽ rất rất cao, nên cách của bạn chỉ nên dùng vs JASS. Và mình cũng chỉnh xong rồi, dùng take damage -> damage taken là xong rồi set life là ok :) - - - Updated - - - Nên nhớ Es và kk khi chém/đánh trúng mới mất buff, nên bạn dùng take damage rồi check buff hoặc check skill của Caster :)
xài system damage này thì mọi vấn đề cũng hết nhưng phải nhớ rằng các damage mình gây ra phải thuộc trong system damage này! Ex: call Damage_Spell (u,t,100) khi damage do hero đánh ra sys damage này luôn chỉ rằng đó là damage physical và mình có thể detector nó ra nhưng mấy skill gây damage như war stomp hay chain lightning phải chuyển damage bằng Ex: call Damage_Spell (u,t,100) thì sys damage mới nhận là damage phép http://www.thehelper.net/threads/damage.117041/
tại mình bỏ WE lâu quá nên hok còn nhớ cách thức hoạt động nó nữa! và đây là 1 skill xài nó(system damage) cậu xem thử! Mã: scope DefilingTouch initializer Init globals public constant integer BUFF_ID = 'A047' //spell dummy public constant integer BUFF_DE = 'A046' //spell dummy public constant integer BUFF_SW = 'A04C' //slow public constant integer LEARN = 'A045' public constant string DeathEx = "Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdx" public constant string ExpEx = "Objects\\Spawnmodels\\Orc\\OrcSmallDeathExplode\\OrcSmallDeathExplode.mdx" endglobals private function f takes nothing returns boolean local unit c = GetEventDamageSource() //caster local unit t = GetTriggerUnit() //target local unit cor if IsUnitEnemy(c, GetOwningPlayer(t)) == true/* */ and Damage_IsPhysical()/* */ and not ( IsUnitType(t, UNIT_TYPE_STRUCTURE)) == true /* */ and Damage_IsAttack()/* */ and GetUnitAbilityLevel(c, BUFF_ID) > 0 then set TempInt = GetUnitAbilityLevel(c, LEARN) call UnitRemoveAbility(c, BUFF_ID) call UnitAddAbility(c, BUFF_DE) call SetUnitAbilityLevel(c, BUFF_DE, TempInt) call CreateDummy(c, BUFF_SW, TempInt, "slow", t) set cor = CreateCorpse(Player(PLAYER_NEUTRAL_AGGRESSIVE), Minion_P1Melee, GetUnitX(t), GetUnitY(t), GetRandomReal(0, 360)) call SetUnitBlendTime(cor, 0) call SetUnitAnimation(cor, "decay bone") call GroupAddUnit(bj_suspendDecayBoneGroup, cor) call DestroyEffect(AddSpecialEffect(ExpEx, GetUnitX(t), GetUnitY(t))) set TempReal = I2R(10 + (20 * TempInt)) call Damage_Spell(c, t, TempReal) endif set c = null set t = null return false endfunction private function Init takes nothing returns nothing local trigger t2 = CreateTrigger() call TriggerAddCondition(t2, Condition(function f)) call Damage_RegisterEvent(t2) endfunction endscope //******************************************************************************************* scope DefilingTouchLearn initializer Init private struct cache unit caster group g endstruct private function cond takes nothing returns boolean return GetLearnedSkill() == DefilingTouch_LEARN and IsUnitIllusion(GetTriggerUnit()) == false and GetUnitAbilityLevel(GetTriggerUnit(), GetLearnedSkill()) == 1 endfunction private function Loop takes nothing returns nothing local cache data = GetTimerData(GetExpiredTimer()) local unit e = null if GetUnitState(data.caster, UNIT_STATE_LIFE) <= 0. then return endif if GetUnitAbilityLevel(data.caster, DefilingTouch_BUFF_ID) > 0 then return endif set TempX = GetUnitX(data.caster) set TempY = GetUnitY(data.caster) //call GroupRefresh(data.g) call GroupClear(data.g) call GroupUnitsInArea(data.g, TempX, TempY, 100.) loop set e = FirstOfGroup(data.g) exitwhen null == e call GroupRemoveUnit(data.g, e) if GetUnitAbilityLevel(data.caster, DefilingTouch_BUFF_DE) > 0 and GetUnitState(e, UNIT_STATE_LIFE) <= 0. and IsUnitType(e, UNIT_TYPE_HERO) != true and IsUnitType(e, UNIT_TYPE_STRUCTURE) != true and IsUnitType(e, ConvertUnitType(20)) != true then call UnitRemoveAbility(data.caster, DefilingTouch_BUFF_DE) call UnitAddAbility(data.caster, DefilingTouch_BUFF_ID) call SetUnitAbilityLevel(data.caster, DefilingTouch_BUFF_ID, GetUnitAbilityLevel(data.caster, DefilingTouch_LEARN)) call RemoveUnit(e) call DestroyEffect(AddSpecialEffect(DefilingTouch_DeathEx, GetUnitX(e), GetUnitY(e))) //call GroupRefresh(data.g) call GroupClear(data.g) set e = null return endif endloop call GroupClear(data.g) set e = null endfunction private function f takes nothing returns nothing local cache data = cache.create() local unit u = GetTriggerUnit() local timer t = NewTimer() set data.g = CreateGroup()//NewGroup() set data.caster = u call SetTimerData(t, data) call TimerStart(t, 0.35, true, function Loop ) call UnitAddAbility(u, DefilingTouch_BUFF_ID) call SetUnitAbilityLevel(u, DefilingTouch_BUFF_ID, GetUnitAbilityLevel(u, DefilingTouch_LEARN)) set t = null set u = null endfunction private function Init takes nothing returns nothing local trigger t = CreateTrigger() call AddEvent(t, EVENT_PLAYER_HERO_SKILL) call TriggerAddCondition(t, Condition( function cond) ) call TriggerAddAction(t, function f) endfunction endscope
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 ?
@all : thực sự cái vấn đề về phân biệt dam là 1 vấn đề rất nhức nhối khi làm map (với mình là những ability kiểu passive ko phải orbeff hay buff placer) ,lúc làm những skill kiểu này mình thường thêm 1 trigger nữa kiểu Mã: Unit is Attacked Atking unit has skill A Turn on Taken Dmg trigger Taken dmg trigger sẽ hoạt động và turn off cho lần attked tiếp theo turn on lại ,như vậy thì ít ra nó cũng đỡ được 1 khoản là khi cast dmg spell thì nó ko hoạt động Thực tế thì cái này chỉ là chống đối tạm thời ,vd mình unit range có 2 skill passive A (hoạt động khi unit is attked và unit taken dmg như đã nói ở trên) và skill shadow strike (1 skill DOT hay dmg over time) mình cast ST và 1 unit B ,sau đó ra lệnh tấn công B ,như vậy thì passive sẽ hoạt động trước khi missle của range unit ở trên tới nơi Nhưng với những unit melee thì kiểu này có vẻ hiệu quả hơn hỏi lại
Ví dụ chèn patch là TerrainArt\LordaeronSummer\Lords_Dirt.blp Thì cái tile đó sẽ được replace ở tile có tên là Dirt trong LordaeronSummer