Topic hỏi đáp về cách làm map | version 15

cho hỏi cách làm trigger như này : khi mua 1 item nào đó sẽ create random 1 -> 5 unit thuộc về unit mua
và chỉ dc mua 1 lần duy nhất đối với 1 player
 
Chỉnh sửa cuối:
Trong phần Object Editor của unit, muốn unit nào ko hiển thị trên minimap thì chỉnh lại đó bạn..............................

Stats - Hide minimap Display ...................................False

Chỉnh lại thành True

Muốn như vậy bạn phải biết chắc chắn unit nào sẽ xuất hiện trong map, unit nào ko. tuy thủ công một chút nhưng tiện, muốn unit nào cứ chỉnh unit đó...............................

Còn ko thì bạn phải thay thế các image mặc định thể hiện house, creep camp, neutral, resource,.... bằng các image cùng định dạng, kích cỡ, nhưng trát hết bề mặt image bằng channel alpha ( để ảnh trong suốt ), tương tự như khi ta thay icon minimap hero thành ngôi sao, chấm tròn... vậy đó.......................................................Tiện và nhanh nhưng sẽ có hiệu ứng trên toàn bộ unit cùng loại................

Thay ờ các dòng như

Icon - Minimap Hero
Icon - Minimap Creep Camp ( Large )


vv...vv..............

Nguyên tắc lý thyết là vậy, nhưng chưa làm bao giờ vì thấy chả có tác dụng gì trong map mình..................


Tks Thím nhiều ^ ^
Vậy là tất cả gút mắt của mình đã được giải quyết.
Cảm ơn thím.
 
em cho hỏi spell này cái.
Em làm skill với based là Thunder Clap.Nếu Picked unit là Hero và ally của mình.Khoảng cách giữa Point của casting unit và Point của Picked Unit Nhỏ hơn 2000 thì sẽ hoán đổi vị trí của Casting unit và Picked Unit cho nhau.=> giúp em với.Em làm mãi mà chẳng đc.
Anh em giúp với cho em code cụ thể nhé.Thanks All
 
Muốn làm cho thời tiết có tuyết rơi xung quanh mình giống như skill 3 của Tuskar trong DotA thì làm ntn ạ?
 
Cho mình hỏi cái cách tạo đấu tr­ường í,làm sao để khi tới giờ,nó sẽ chuển các herro của tất cả player từ 1 đến 6 vào khu đấu trường.Xong,nếu không có bất cứ hero nào khác trong đó(chơi 1 mình để test hoặc tự sướng í)thì nó sẽ tự động di chuyển ra ngoài.Hoặc nếu mình thắng thì nó cũng di chuyển ra ngoài.Với lại mỗi lần vào,mình sẽ nhận dc 1 số lượng gỗ cộng thẳng vào nhân vật lun.Ai cho mình map demo nhez,mình tks trươc.
Tại vì map của mình làm cái đấu trường chỉ đơn giản là

Dau Truong Ruc lua 2
Events
Time - Every 900.00 seconds of game time
Conditions
Actions
Wait 2.00 game-time seconds
Game - Display to (All players) the text: |c00FEBA0E§Êu Tr...
Wait 2.00 game-time seconds
Game - Display to (All players) the text: |c00FEBA0E4.|r |c00...
Wait 2.00 game-time seconds
Game - Display to (All players) the text: |c00FEBA0E3.|r |c00...
Wait 2.00 game-time seconds
Game - Display to (All players) the text: |c00FEBA0E2.|r |c00...
Wait 2.00 game-time seconds
Game - Display to (All players) the text: |c00FEBA0EB¾t §Ç...
Unit - Move (Random unit from (Units owned by Player 1 (Red))) instantly to (Center of Rect 1 <gen>)
Unit - Move (Random unit from (Units owned by Player 2 (Blue))) instantly to (Center of Rect 1 <gen>)
Unit - Move (Random unit from (Units owned by Player 3 (Teal))) instantly to (Center of Rect 1 <gen>)
Unit - Move (Random unit from (Units owned by Player 4 (Purple))) instantly to (Center of Rect 2 <gen>)
Unit - Move (Random unit from (Units owned by Player 5 (Yellow))) instantly to (Center of Rect 2 <gen>)
Unit - Move (Random unit from (Units owned by Player 6 (Orange))) instantly to (Center of Rect 2 <gen>)
Item - Create Huy Ch­¬ng at (Center of Rect 1 <gen>)
Item - Create Huy Ch­¬ng at (Center of Rect 2 <gen>)
Camera - Pan camera for Player 1 (Red) to (Center of Rect 1 <gen>) over 1.00 seconds
Camera - Pan camera for Player 2 (Blue) to (Center of Rect 1 <gen>) over 1.00 seconds
Camera - Pan camera for Player 3 (Teal) to (Center of Rect 1 <gen>) over 1.00 seconds
Camera - Pan camera for Player 4 (Purple) to (Center of Rect 2 <gen>) over 1.00 seconds
Camera - Pan camera for Player 5 (Yellow) to (Center of Rect 2 <gen>) over 1.00 seconds
Camera - Pan camera for Player 6 (Orange) to (Center of Rect 2 <gen>) over 1.00 seconds

Dau Truong Ruc Lua out
Events
Unit - A unit enters Rect 3 <gen>
Conditions
Actions
Wait 50.00 seconds
Game - Display to (All players) the text: |c00FEBA0ETh«ng b...
Unit - Move (Triggering unit) instantly to (Center of HS <gen>)
Camera - Pan camera for Player 1 (Red) to (Center of HS <gen>) over 1.00 seconds
Camera - Pan camera for Player 2 (Blue) to (Center of HS <gen>) over 1.00 seconds
Camera - Pan camera for Player 3 (Teal) to (Center of HS <gen>) over 1.00 seconds
Camera - Pan camera for Player 4 (Purple) to (Center of HS <gen>) over 1.00 seconds
Camera - Pan camera for Player 5 (Yellow) to (Center of HS <gen>) over 1.00 seconds
Camera - Pan camera for Player 6 (Orange) to (Center of HS <gen>) over 1.00 seconds


vậy đó
 
Tình hình là mới cài lại war 3 từ 2 file iso, patch gốc 1.07 :D bữa giờ search tìm patch 1.24e cũng nhiều mà toàn thiếu cái file worldedit, ai có cái patch có file đó thì up lên dùm mình nhé :D Tk trước ...
 
cho mình hỏi. có cách nào cho spellbook không bị trùng khi để 2 ability spell book cho unit ? và cách add spell cho spellbook ?
 
ai bik làm chiêu xoay kiếm ko?(vừa xoay vừa di chuyển dc)mình có model cây kiếm xoay rùi,nhưng ko bik chiêu nào mà add vô.(mình nghĩ là mình sẽ chọn chiêu nào mak khi casting,nó tạo ra cái effec cây kiếm xoay xung quanh,khi dịch đi vào đó thì mất máu.Trong khi cast,mình không thể đánh dược,chỉ di chuyển và chơi chiêu thui)

ai chơi LMHT thì no giống cái chiêu xoay kiếm của Garen í:3cool_nosebleed:
 
Tai onl = dt k post vao code dc nen ghi ra lyon. Xem ho minh cai trigger no loi o dau ma cast > 10 lan no bi lag
Spell
Event
A unit starts.... Ability
Condition
Ability .... Kamejoko
Action
Mui= Mui + 1
Cast[Mui] = triggering unit
Animation - play Cast[Mui] attack, slam animation
TempLoc[0]= position of Cast[Mui]
TempLoc[1]= Target point of ability being cast
angle[Mui] = facing of Cast[Mui]
Tick[ Mui] = 25
Dmg[Mui]= 100000x lv of .....
Creat 1 kame for ( owner of Cast[Mui] at TempLoc[0] facing angle[Mui] degrees
Add a 3s ..... time to last created Unit
Create lighting for ...(nhu tren)
Add ....( nhu tren)
Creat dummy 8 ...(nt)
Dummy[Mui]=last created unit
Add ......... timer to Dummy[Mui]
Custom script : call RemoveLocation(udg_TempLoc[0])
---------------------------------------------
Effect
Event
Every 0,04s of game time
Condition
Action
For each integer In from 1 to Mui, do (Action)
Loop Action
If .....(Else Actions)
Condition
Tick[In] equal to 0
Then
Mui=Mui-1
For each integer B from In to Mui do (Action)
angle([integer B]) = angle([integer B + 1])
Cast([int B])=..int B+1
Dummy[int B] = int B + 1
Tick[int B] = ....int B + 1
Dmg[int B]=... Int B+1
Else
TempLoc[2]= position of Dummy[In]
TempLoc[3]= TempLoc[2] offset by 25 towards angle[In] degrees
Move Dummy[In] instantly to TempLoc[3]
Group= unit within 300 of TempLoc[2] matching ( Matching unit belong to an enemy of Owner of Cast[In] equal to True)
Pick every unit in Group and do ( Action)
Loop action
Cause Dummy[In] to damage Picked unit dealing Dmg[In] damage of attack type spells and damage type normal
Custom script: call DestroyGroup(udg_Group)
Custom script: call RemoveLocation(udg_TempLoc[3])
Reset Cast[In] animation
Xem ho minh caj nha dag voi lam tang sinh nhat thag ban than. Tien the cho xin cai trigger qua cau cua con goku trong MTH y nem 1 qua cau den 1 vi tri no? Roi gay dame. Tks
 
Mọi người cho hỏi có cách nào xử lý map này không vậy?
http://www.epicwar.com/maps/162895/

Tình hình là map này chơi bình thường, nhưng solo thì khá oải. Nên mình muốn tinh chỉnh nó đi 1 tí, nhưng không hiểu map này bị gì mà nếu save lại bằng editor (không chỉnh sửa hay cả chỉnh sửa, hay chỉ là save as) thì đều báo lỗi. Bạn nào có thể fix được không? Mình cám ơn rất nhiều.
 
ai biết làm spell:giết 1 con creep tăng thêm 1.5 amation change size unit ko ạ.Nếu size quá 3000 thì nổ.Giúp em với
 
Cho mình xin demo hoặc trigger 1 spell như sau :

Khi 1 Hero cast 1 spell Morphin (biến hình của Ilidan) , trong thời gian hiệu lực , nếu máu giảm còn 10% thì sẽ ẩn Unit hiện tại đi và thay vào 1 Unit (Hero) khác với cùng lv và chỉ số sức mạnh , cùng lượng máu , sau 1 thời gian Unit ấy sẽ bị remove và bỏ ẩn unit Hero ban đầu

Mong cả nhà giúp @@
 
mọi người cho hỏi tại sao mình cast 1 spell JASS(cụ thể là chain lightning có thể hút máu ), thì nó có vấn đề là bị hiện lỗi:

double free of type: eventhandler
thỉnh thoảng hiện double free of type: dummy, double free of type: vector

code:
[SPOIL]
Mã:
scope LifeAbsorb initializer InitTrig_LifeAbsorb

    globals
        private constant integer AbilID = 'A03R' //* The Spells MainAbility
        private real array absorbLife[4]
    endglobals
    
    //* Extend your struct with the ChainAbility
    struct LifeAbsorb extends ChainAbility
        private real lifeAbsorbed=0.
        integer level=0
        
        //* Assign your own TargetFilter
        //* Use ChainAbility.CurrentTarget instead of FilterUnit()
        //* Use ChainAbility.CastingUnit as the Chains source unit
        //* ! If this method is not declared in the Childstruct the standard filter will apply !
        method targetFilter takes nothing returns boolean
            return IsUnitEnemy(ChainAbility.CurrentTarget,GetOwningPlayer(ChainAbility.CastingUnit)) and not IsUnitType(ChainAbility.CurrentTarget, UNIT_TYPE_MAGIC_IMMUNE) and not IsUnitType(ChainAbility.CurrentTarget, UNIT_TYPE_STRUCTURE) and IsUnitVisible(ChainAbility.CurrentTarget,GetOwningPlayer(ChainAbility.CastingUnit)) and GetWidgetLife(ChainAbility.CurrentTarget)>0.405 
        endmethod
        
        //* Assign what shall happen when a unit gets hit by a Chain
        //* Use ChainAbility.CurrentTarget as the Unit that gets hit
        //* Use ChainAbility.CastingUnit as the Chains source Unit
        //* Use ChainAbility.CurrentHit to get the number of allready hit targets
        //* ! If this method is not declared in the Childstruct nothing will happen when a unit is hit !
        method onTargetHit takes nothing returns nothing
            if ChainAbility.CurrentTarget==ChainAbility.CastingUnit then
                call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",ChainAbility.CastingUnit,"origin"))
                call SetWidgetLife(ChainAbility.CastingUnit,GetWidgetLife(ChainAbility.CastingUnit)+.lifeAbsorbed)
            else
                call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayDamage.mdl",ChainAbility.CurrentTarget,"chest"))
                call UnitDamageTarget(ChainAbility.CastingUnit,ChainAbility.CurrentTarget,absorbLife[.level],true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
                set .lifeAbsorbed=.lifeAbsorbed+absorbLife[.level]
            endif
        endmethod
        
        //* The Life absorbed per level
        static method lifeAbsorbSetup takes nothing returns nothing
            set absorbLife[0]=25.
            set absorbLife[1]=50.
            set absorbLife[2]=75.
            set absorbLife[3]=100.
        endmethod
        
    endstruct
    
    //* The function that fires on SpellCast
    private function SpellCast takes nothing returns nothing
        local LifeAbsorb object
        if GetSpellAbilityId()==AbilID then
            //* Your Chain Setup:
                //* Create the Chain with the source Unit, the target Unit and the Chains missile model path
                set object=LifeAbsorb.create()
                //* Change the Chains zArc to your value (makes the chain fly a parabola curve)
                set object.useZArc=1.
                //* Change the Chains model
                set object.missileModel="Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilMissile.mdl"
                //* Change the Chains Lightning model
                set object.setLightningModel=DrainLife
                //* Change the Chains movespeed
                set object.missileSpeed=3700
                //* Change the Chains detectionrange
                set object.pickRange=600
                //* Change the flag whether a unit gets hit more than once
                set object.hitMoreThanOnce=false
                //* Change the flag whether the chain shall move back to the source
                set object.moveBackToSource=true
                //* Change the Chains hitcount
                set object.hitCount=8
                //* Start the Chain
                set object.level=GetUnitAbilityLevel(GetSpellAbilityUnit(),AbilID)-1
                call object.Cast(GetSpellAbilityUnit(),GetSpellTargetUnit())
            //* End Chain Setup
        endif
    endfunction
    
    private function InitTrig_LifeAbsorb takes nothing returns nothing 
        local trigger t=CreateTrigger()
        call LifeAbsorb.lifeAbsorbSetup()
        call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
        call TriggerAddAction(t,function SpellCast)
    endfunction
endscope
[/SPOIL]
 
mọi người cho hỏi tại sao mình cast 1 spell JASS(cụ thể là chain lightning có thể hút máu ), thì nó có vấn đề là bị hiện lỗi:

double free of type: eventhandler
thỉnh thoảng hiện double free of type: dummy, double free of type: vector

code:
[SPOIL]
Mã:
scope LifeAbsorb initializer InitTrig_LifeAbsorb

    globals
        private constant integer AbilID = 'A03R' //* The Spells MainAbility
        private real array absorbLife[4]
    endglobals
    
    //* Extend your struct with the ChainAbility
    struct LifeAbsorb extends ChainAbility
        private real lifeAbsorbed=0.
        integer level=0
        
        //* Assign your own TargetFilter
        //* Use ChainAbility.CurrentTarget instead of FilterUnit()
        //* Use ChainAbility.CastingUnit as the Chains source unit
        //* ! If this method is not declared in the Childstruct the standard filter will apply !
        method targetFilter takes nothing returns boolean
            return IsUnitEnemy(ChainAbility.CurrentTarget,GetOwningPlayer(ChainAbility.CastingUnit)) and not IsUnitType(ChainAbility.CurrentTarget, UNIT_TYPE_MAGIC_IMMUNE) and not IsUnitType(ChainAbility.CurrentTarget, UNIT_TYPE_STRUCTURE) and IsUnitVisible(ChainAbility.CurrentTarget,GetOwningPlayer(ChainAbility.CastingUnit)) and GetWidgetLife(ChainAbility.CurrentTarget)>0.405 
        endmethod
        
        //* Assign what shall happen when a unit gets hit by a Chain
        //* Use ChainAbility.CurrentTarget as the Unit that gets hit
        //* Use ChainAbility.CastingUnit as the Chains source Unit
        //* Use ChainAbility.CurrentHit to get the number of allready hit targets
        //* ! If this method is not declared in the Childstruct nothing will happen when a unit is hit !
        method onTargetHit takes nothing returns nothing
            if ChainAbility.CurrentTarget==ChainAbility.CastingUnit then
                call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",ChainAbility.CastingUnit,"origin"))
                call SetWidgetLife(ChainAbility.CastingUnit,GetWidgetLife(ChainAbility.CastingUnit)+.lifeAbsorbed)
            else
                call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayDamage.mdl",ChainAbility.CurrentTarget,"chest"))
                call UnitDamageTarget(ChainAbility.CastingUnit,ChainAbility.CurrentTarget,absorbLife[.level],true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
                set .lifeAbsorbed=.lifeAbsorbed+absorbLife[.level]
            endif
        endmethod
        
        //* The Life absorbed per level
        static method lifeAbsorbSetup takes nothing returns nothing
            set absorbLife[0]=25.
            set absorbLife[1]=50.
            set absorbLife[2]=75.
            set absorbLife[3]=100.
        endmethod
        
    endstruct
    
    //* The function that fires on SpellCast
    private function SpellCast takes nothing returns nothing
        local LifeAbsorb object
        if GetSpellAbilityId()==AbilID then
            //* Your Chain Setup:
                //* Create the Chain with the source Unit, the target Unit and the Chains missile model path
                set object=LifeAbsorb.create()
                //* Change the Chains zArc to your value (makes the chain fly a parabola curve)
                set object.useZArc=1.
                //* Change the Chains model
                set object.missileModel="Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilMissile.mdl"
                //* Change the Chains Lightning model
                set object.setLightningModel=DrainLife
                //* Change the Chains movespeed
                set object.missileSpeed=3700
                //* Change the Chains detectionrange
                set object.pickRange=600
                //* Change the flag whether a unit gets hit more than once
                set object.hitMoreThanOnce=false
                //* Change the flag whether the chain shall move back to the source
                set object.moveBackToSource=true
                //* Change the Chains hitcount
                set object.hitCount=8
                //* Start the Chain
                set object.level=GetUnitAbilityLevel(GetSpellAbilityUnit(),AbilID)-1
                call object.Cast(GetSpellAbilityUnit(),GetSpellTargetUnit())
            //* End Chain Setup
        endif
    endfunction
    
    private function InitTrig_LifeAbsorb takes nothing returns nothing 
        local trigger t=CreateTrigger()
        call LifeAbsorb.lifeAbsorbSetup()
        call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
        call TriggerAddAction(t,function SpellCast)
    endfunction
endscope
[/SPOIL]

cái đó là code dẫn lối thôi. nó hok có bị gì cả. vấn đề là tồn tại system của nó. theo tớ biết cái kia của cậu là do system này!

http://www.hiveworkshop.com/forums/spells-569/chain-ability-system-v-06-a-173391/?prev=r=20&page=51

cậu vào copy lại phần System Code search 1 dòng trong nó có tên là

private method remove takes nothing returns nothing
call .targetChecker.destroy()
call .clear()//xóa đoạn này đi
call .destroy()
endmethod
 
Mọi người cho mình hỏi là làm thế nào để tạo 1 hệ thống spell như Invoker trong Dota. Mình rất mê mẩn em này :( Ai có map demo cho xin thì càng tốt.
Hỏi câu nữa là có thể add 3 orb của invoker cho model khác được không, nếu có thì làm thế nào.
 
Mọi người cho mình hỏi là làm thế nào để tạo 1 hệ thống spell như Invoker trong Dota. Mình rất mê mẩn em này :( Ai có map demo cho xin thì càng tốt.
Hỏi câu nữa là có thể add 3 orb của invoker cho model khác được không, nếu có thì làm thế nào.

bạn vào đây xem!
http://www.thehelper.net/threads/dota-hero-invoker.73581/

...
chỉ có model invoker là có vụ add orb thôi. chứ mấy con model khác của war hầu như hok có cái nào đặc biệt như blood mage này cả!
 
Chỉnh sửa cuối:
có ai bít làm trigger này ko : khi 1 player nào đó enter gõ 1 đoạn code ( bất kì ) thì sẽ nhận dc các phần thưởng như vàng , gỗ , item , level , stat v.v và các player khác ko thấy dc code đó có nghĩa là đoạn code đó ngoài player gõ ra ko xuất hiện trên player khác
 
To : minhtronglam90 Bật f12 chọn chat to observer ý, rồi gõ gì thì gõ, đâu ai thấy được đâu @@
Cho hỏi làm sao để set lv skill hero cho skill của unit dummy, mình xài Jassnewgen pack. Tìm mãi chả thấy cái dòng nào để set @@
 
Back
Top