Topic hỏi đáp (tập 6) về cách làm map

Status
Không mở trả lời sau này.
giúp mình spell này với
- cast time = 5s
- sau khi cast spell xong , damage nhân vật tăng lên 50 lần , đấm đá bình thường , không làm gì cả , chỉ có damage là tăng
- khi caster đánh ngay cú đánh đầu tiên , spells biến mất , damage trở lại như cũ
Trigger đây
Mã:
Trigger 1
    Events
        Unit - A unit Finishes casting an ability
    Conditions
        (Ability being cast) Equal to (==) [U]DummySkill[/U]
    Actions
        Unit - Create 1 [U]Dummy[/U] for [U]Player[/U] at (Position of (Casting unit)) facing Default building facing (270.0) degrees
        Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
        Unit - Add Inner Fire to (Last created unit)
        Unit - Order (Last created unit) to Human Priest - Inner Fire (Casting unit)
Mã:
Trigger 2
    Events
        Unit - A unit Is attacked
    Conditions
    Actions
        Wait 1.00 seconds
        If (((Attacking unit) has buff Inner Fire) Equal to (==) True) then do (Unit - Remove Inner Fire buff from (Attacking unit)) else do (Do nothing)
-Cái skill Dummy thì để casting time là 5. Skill Inner Fire thì chỉnh damage increase là 50 = 500% = gấp 50 lần damage( gấp 50 lần là dame cao lắm đó ) và xóa cái Requirement đi.
-Cái trigger trên là sao vậy, sao có "tùy bạn" với "có thể không cần cũng không được" là sao. Trigger cũng sai, xin nhắc lại là
em cần tạo creep ra giống dota
ai chỉ dùm nhé
 
lấy skill roar của NE rồi sửa thành + 5000% dmg, sửa casting time thành 5 s
tạo 1 trigger
Event - a Uint Start Effect of an ability
Conditions - Ability being cast equal to Roar ( cái spell lấy của NE ấy )
Actions
Set Integer = 0



Lập 1 trigger nữa
Event - Unit is attacked
Conditions - Attacking unit has buff Roar ( cái buff skill Roar của NE )
Action
Set Integer = Integer + 1
Set a = attacking unit
If Con equal to true then do actions
Condition - Integer equal to 2
Loop- Actions
Unit - Remove Roar form a ( Remove special buf )
Else- Actions
Do nothing
Do lười và bận nên hok làm map demo, thông cảm :D

---------- Post added at 19:39 ---------- Previous post was at 19:36 ----------

Skill của bạn Leo Trigger thứ 2 mà Wait 1s thì những con có Attack Speed nhỏ hơn 1 giây 1 phát sẽ nện đc nhìu lần 5000% dmg đó, bạn nên sửa lại
 
^
cast time 5s thì spell nào non-target chỉnh cast time = 5s là được,khi start effect thì cho dummy cast inner fire vào.

thêm cái event unit is being attacked,check nếu attacking unit có buff 50 lần thì remove đi,easy .

edit: dùng Roar!
 
Last edited by a moderator:
anh em làm ơn cho hỏi cách tạo 1 nhân vật bán đồ, mình add model nhân vật vào shop bán đồ để biến nó thành nhân vật bán đồ thì khi text game thấy dưới chân nhân vật ấy vẫn còn cái nền của ngôi nhà, có cách nào xóa cái nền ấy đi không, minh là lính mới, nếu hỏi sai xin đừng chửi.
 
Skill của bạn Leo Trigger thứ 2 mà Wait 1s thì những con có Attack Speed nhỏ hơn 1 giây 1 phát sẽ nện đc nhìu lần 5000% dmg đó, bạn nên sửa lại
Cái đấy mình test thử với con footman cái rate nó chậm nên mới wait 1 second, chứ vào map thì unit create là dummy rate cao wait chỉ 0.1 second thôi
 
mình biết một cách nhưng có vẽ hơi dài dòng cách đó như sau :
click vào thàng Nông Dân Peasant sửa
-Abilities - Normal:(bạn ko add jì hết)
-Combat-Attacks Enabled NONE
-Movement - Speed Base 0
-Techtree-Items Sold ( bạn muốn bán ji thì add vào)
những lỗi là khi mua đồ nó rớt ra ngoài rồi bạn lụm vào :))
 
tks những ai đã giúp mình :D
-------
để làm shop từ 1 custom unit , bạn thêm vào vài dòng sau đây nhé

ability: Sell items , Shop Purchase item , invul ( nên có để tránh bị phá )
Stats - Is a building : True
Bonus vào bài trên ^^

-------------

mọi người chỉ mình cách nào cho unit cầm súng bắn liên thanh cooldowns 0,1s hôk chỉ mình với
 
Chỉnh sửa cuối:
@frostwyrm: Thực sự thì vấn đề này khá là rắc rối. Đòi hỏi cần phải "trigger" TẤT CẢ các spells. Như vậy mới phân biệt đc đâu là damage "attack", đâu là damage "spell". System cụ thể: Intuitive Damage Detection System
Map demo (dùng system trên) ở dưới.

@Leoni: Muốn nó bắn nhanh thì phải chỉnh phần Combat - Attack - Cooldown Time càng thấp càng tốt. Nếu vẫn chưa nhanh "như ý" thì chỉnh cả phần Combat - Attack - Animation Backswing PointCombat - Attack - Animation Damage Point (giống cooldown time, càng thấp thì unit càng đánh nhanh). Tuy nhiên nếu chỉnh 2 cái Animation kia thấp quá thì animation của unit sẽ không "play" hết, tức là chỉ giơ tay lên, chưa hạ tay xuống thì đã đánh phát tiếp theo.
 

Attachments

Chỉnh sửa cuối:
ý mình là làm 1 skill sao cho trong vòng 1 giây nó bắn 10 phát ấy :|
 
Dùng Event: Every 0.1s
Action: Tạo Dummy
Add abillity stormbot cho dummy
Issue Dummy cast Stormbot vào target
Mỗi 0.1s sẽ order dummy cast skill bắn vào target
Bây giờ chỉ cần đổi thông tin về abillity stormbot là xong
 
cho hỏi các skill bị buff trong war3
khi bị nhiễm độc lửa trong 5 giây khi còn 3 giây thì hết .Nó lại đính buff thì trở lại 5 giây hay không đính buff nó sẽ đợi hết 3 giây mới đính lại

Trở lại 5 giây .
 
Gamewar hoặc Tom cho Kan hỏi
Mã:
scope CriticalStrike initializer Init
globals
    [B]private constant integer MAX_HANDLE_NO = 8190
    private constant integer MIN_HANDLE_ID = 0x100000
    
    private boolean array Flag[MAX_HANDLE_NO][/B]
endglobals

[B]private function H2I takes handle h returns integer
    return GetHandleId(h)
endfunction[/B]
//
private function Conditions takes nothing returns boolean
    return GetTriggerDamageType() == DAMAGE_TYPE_ATTACK and [B]Flag[H2I(GetTriggerDamageSource())-MIN_HANDLE_ID] [/B]and GetUnitAbilityLevel(GetTriggerDamageSource(), 'AOcr') > 0 and not IsUnitType(GetTriggerUnit(), UNIT_TYPE_STRUCTURE)
endfunction

private function Actions takes nothing returns nothing
    local unit u = GetTriggerDamageSource()
    local unit t = GetTriggerDamageTarget()
    local integer lvl = GetUnitAbilityLevel(u, 'AOcr')
    local integer pr = GetTriggerPriority(GetTriggeringTrigger())
    local texttag te = CreateTextTag()
    local real d = GetTriggerDamage()
    call DestroyEffect( AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",t,"origin") )
    //Deals +100%/200%/300%/etc damage
    call BJDebugMsg("Critical Strike has a |cff00ffff"+I2S(pr)+"|r priority which should fire a |cff00ffff5|r-PR trigger!")
    call UnitDamageTargetEx(u, t, d*(lvl+1), ATTACK_TYPE_HERO, DAMAGE_TYPE_EXTRA, true)
    call SetTextTagText(te, I2S(R2I(d*(lvl)))+"!", 0.024)
    call SetTextTagPos(te, GetUnitX(u), GetUnitY(u), 0.00)
    call SetTextTagColor(te, 255, 0, 0, 255)
    call SetTextTagVelocity(te, 0, 0.04)
    call SetTextTagVisibility(te, true)
    call SetTextTagFadepoint(te, 2)
    call SetTextTagLifespan(te, 5)
    call SetTextTagPermanent(te, false)
    set Flag[H2I(u)-MIN_HANDLE_ID] = false
    
    set te = null
    set u = null
    set t = null
endfunction

private function Atk_Conditions takes nothing returns boolean
    return GetUnitAbilityLevel(GetAttacker(), 'AOcr') > 0 and not IsUnitType(GetTriggerUnit(), UNIT_TYPE_STRUCTURE)
endfunction

globals 
    integer crit = 0
endglobals

private function Atk_Actions takes nothing returns nothing
    local unit u = GetAttacker()
    //if GetRandomInt(1, 100) <= 30 then
    if crit == 2 then
        call SetUnitAnimation(u, "attack slam")
        call QueueUnitAnimation(u, "stand ready")
        set Flag[H2I(u)-MIN_HANDLE_ID] = true
        set crit = 0
    else
        set Flag[H2I(u)-MIN_HANDLE_ID] = false
        set crit = crit + 1
    endif
    set u = null
endfunction

//Life Steal
private function LifeSteal takes nothing returns nothing
    local unit atk = GetTriggerDamageSource()
    local unit vic = GetTriggerDamageTarget()
    
    local integer level = GetUnitAbilityLevel( atk, 'AOcr' )
    
    local real life
    local real steal
    local real dam = GetTriggerDamage()
    
    if dam > 0 and ( GetTriggerDamageType() == DAMAGE_TYPE_ATTACK or GetTriggerDamageType() == DAMAGE_TYPE_EXTRA ) and level > 0 then
        set life = GetUnitState( atk, UNIT_STATE_LIFE )
        set steal = ( dam / 100 ) * ( 10 + level * 10 ) 
        
        call SetUnitState( atk, UNIT_STATE_LIFE, life + steal )
        call DestroyEffect( AddSpecialEffectTarget( "Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl", atk, "origin" ) )
        
        call BJDebugMsg("Steal |cff00ffff"+R2S(steal)+"|r hit points")
    
    endif
    
    set atk = null
    set vic = null
endfunction

private function Init takes nothing returns nothing
    local trigger trg = CreateTrigger()
    
    call TriggerAddAction(trg, function Actions)
    call TriggerAddCondition(trg, Condition(function Conditions))
    call TriggerRegisterDamageEvent(trg, 1)
    
    set trg = CreateTrigger()
    call TriggerAddAction(trg, function LifeSteal)
    call TriggerRegisterDamageEvent(trg, 1)
    
    set trg = CreateTrigger()
    call TriggerAddAction(trg, function Atk_Actions)
    call TriggerAddCondition(trg, Condition(function Atk_Conditions))
    call TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_ATTACKED)
    
    set trg = null
endfunction
endscope

Mấy dòng in đậm trong đoạn code trích từ demo system IDDS, đó là skill chance % to bonus damage, chắc cũng giống cái rìu chắc gỗ trong Dota, vậy mấy dòng đó ý là sao nhỉ ? Thường thì thay vì điều kiên target phải có buff, đằng này chỉ có vài dòng đó là làm được luôn rùi...
 
^: System này không dùng "detect buff" mà. Còn mấy cái bôi đen, là % chance (err... cũng chả biết đúng không, thực ra là cứ chém 3 phát lại đc 1 phát, nếu tớ không nhầm). Còn cái rìu gỗ trong DotA không dùng trigger, mà là từ Demolish của hero Tinker.
 
ai chỉ em cách khi -ow cửa sẽ mở và lính xuất hiện và khi -cw đóng cửa lính sẽ không xuất hiện nữa

---------- Post added at 08:12 ---------- Previous post was at 07:50 ----------

với lại sao làm lính lever 2 xuất hiện và lính lever 1 sẽ không xuất hiện nữa
 
cho em hỏi link down làm map warcraft ở đâu vậy
 
Mình vào Hiveworkshop xem GUI spell thì thấy nhiều câu cm đại loại như : "Wait is bad", "Ko nên dùng Wait",....Vậy thì phải làm cách nào khi muốn "đợi 1 chút" mà ko dùng "Wait"?

P/s : Trong Dota OMG có system pick skill tùy ý, sau đó Hero learn như bình thường. Làm thế nào để cho skill vào phần "Learn" của Hero như thế nhỉ?
 
Chỉnh sửa cuối:
ai chỉ em cách khi -ow cửa sẽ mở và lính xuất hiện và khi -cw đóng cửa lính sẽ không xuất hiện nữa

---------- Post added at 08:12 ---------- Previous post was at 07:50 ----------

với lại sao làm lính lever 2 xuất hiện và lính lever 1 sẽ không xuất hiện nữa

Mã:
Event: Player - Player 1 (Red) types a chat message containing -ow as An exact match
Action: Destructible - Open [U]Gate[/U]
          Triggle - Turn on [U]triggle[/U]
Đối với -cw , bạn làm ngược lại và thay -ow = -cw

để làm lính lev 2 xuất hiện và không xuất hiện lev 1 nữa :
Mã:
Event : Time - Elapsed game time is 5.00 seconds ( có thể thay đổi = event khác )
Action : Triggle - Turn off [U]Linh lev 1[/U]
           Triggle - Turn on [U]Linh lev 2[/U]

có sai thì mình sorry nhé , nhớ sao viết zị :D
 
mà phần lính xuất hiện thì làm trigen thế nào
Và cửa sẽ mở theo số người chơi ấy

---------- Post added at 10:32 ---------- Previous post was at 10:19 ----------

cho luôn cái map demo thì cang tốt
 
@frostwyrm: Thực sự thì vấn đề này khá là rắc rối. Đòi hỏi cần phải "trigger" TẤT CẢ các spells. Như vậy mới phân biệt đc đâu là damage "attack", đâu là damage "spell". System cụ thể: Intuitive Damage Detection System
Toàn mấy dòng Jass, em chả hỉu gì cả (spell làm bằng Jass thì em chịu^:)^)
 
Status
Không mở trả lời sau này.
Back
Top