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

Status
Không mở trả lời sau này.
Cho em hỏi tại sao sau khi set life/mana thì UNIT đó không còn mana regen nữa, có cách nào khắc phục không.....

??? :-?
 
Ai chỉ em phần mua Herro với . Em có cái nhà pasvive để mua hero nhưng làm sao để player 1 mua thì wa 1 chổ nào đó , player 2 thì ra chổ #:P
 
cho em hỏi làm sao đánh nó hiện số lượng mất máu bao nhiêu sao thế

Vì event "unit take damage" không có với "generic unit" nên phải add với specific unit.
cần 3 triggers:

Mã:
UnitTakeDamage Init
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Set UnitsEnterMap = (Units in (Playable map area))
        Unit Group - Pick every unit in UnitsEnterMap and do (Actions)
            Loop - Actions
                Set TempUnit = (Picked unit)
                Trigger - Add to UnitTakeDamage <gen> the event (Unit - (Picked unit) Takes damage)
trigger này có tác dụng với các unit có sẵn trên bản đồ, add event "unit take damage" vào trigger UnitTakeDamage

Mã:
UnitTakeDamage EnterMap
    Events
        Unit - A unit enters (Entire map)
    Conditions
        ((Triggering unit) is in UnitsEnterMap) Equal to False
    Actions
        Set TempUnit = (Triggering unit)
        Unit Group - Add TempUnit to UnitsEnterMap
        Trigger - Add to UnitTakeDamage <gen> the event (Unit - TempUnit Takes damage)
trigger này chạy khi một unit "enter map", được create, train, summon,... và cũng add event "unit take damage" cho trigger UnitTakeDamage

Mã:
UnitTakeDamage
    Events
    Conditions
    Actions
        Trigger - Turn off (This trigger)
        -------- ---------------- --------
        Set TempUnit = (Triggering unit)
        Set TempUnit2 = (Damage source)
        Set TempReal = (Damage taken)
        -------- ---------------- --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                TempReal Greater than or equal to 1.00
            Then - Actions
                Set TempTextLoc = (Position of TempUnit)
                Floating Text - Create floating text that reads (String((Integer(TempReal)))) at TempTextLoc with Z offset 0.00, using font size 10.00, color (50.00%, 100.00%, 100.00%), and 0.00% transparency
                Set TempText = (Last created floating text)
                Floating Text - Set the velocity of TempText to 128.00 towards 90.00 degrees
                Floating Text - Change TempText: Disable permanence
                Floating Text - Change the lifespan of TempText to 2.00 seconds
                Floating Text - Change the fading age of TempText to 1.00 seconds
                Trigger - Run HideFloatingText <gen> (ignoring conditions)
            Else - Actions
        -------- ---------------- --------
        Trigger - Turn on (This trigger)
trigger này chạy khi một unit take damage, event được add nhờ 2 trigger trên
ở đây kiểm tra số damage nhận có >1 không, nếu hơn thì hiện số damage sử dụng floating text

trigger HideFloatingText sau đó được chạy để hiển thị/dấu floating text với các player có thể thấy/không thể thấy vị trí tạo floating text

demo map down ở đây:
http://forum.gamevn.com/showthread.php?396341-Topic-hoi-dap-cho-anh-em-Ve-cach-lam-map-&p=9490802#post9490802

Ai chỉ em phần mua Herro với . Em có cái nhà pasvive để mua hero nhưng làm sao để player 1 mua thì wa 1 chổ nào đó , player 2 thì ra chổ #:P

mua hero ở các "Tavern"

để di chuyển thì:

nên có 2 region, <region của player 1> và <region của player 2>

rồi dùng trigger:
Mã:
BuyHero
    Events
        Unit - A unit Sells a unit
    Conditions
        ((Sold unit) is A Hero) Equal to True
    Actions
        Set TempUnit = (Sold unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of TempUnit) Equal to Player 1 (Red)
            Then - Actions
                Set TempPoint = (Center of <Region của Player1>)
                Unit - Move TempUnit instantly to (Center of (Playable map area))
                Custom script:   call RemoveLocation( udg_TempPoint )
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of TempUnit) Equal to Player 2 (Blue)
            Then - Actions
                Set TempPoint = (Center of <Region của Player2>)
                Unit - Move TempUnit instantly to (Center of (Playable map area))
                Custom script:   call RemoveLocation( udg_TempPoint )
            Else - Actions
TempUnit là biến unit
TempPoint là biến point

trigger kia chạy khi mua một hero và "owner" của sold unit (unit được mua - hero) là Player 1 thì di chuyển unit vừa mua ra <region của player 1>, tương tự với player 2
 
bạn lấy cái Files Đính kèm dưới + thêm photoshop hay là phần mền tô màu cho nó màu cam
rùi sử dụng ButtonEditor gép vào *.blp + Bm_TBN.blp này là ok

đâu phải hình
mà là cái sýtem đồ cam đó :|

---------- Post added at 18:09 ---------- Previous post was at 18:04 ----------

bạn lấy cái Files Đính kèm dưới + thêm photoshop hay là phần mền tô màu cho nó màu cam
rùi sử dụng ButtonEditor gép vào *.blp + Bm_TBN.blp này là ok

đâu phải hình
mà là cái sýtem đồ cam đó :|
 
đâu phải hình
mà là cái sýtem đồ cam đó :|

---------- Post added at 18:09 ---------- Previous post was at 18:04 ----------



đâu phải hình
mà là cái sýtem đồ cam đó :|

sorry mình hiểu nhầm ý của bạn ^^


______________________________________________________
Anti Hack Map v1.0

mình vừa làm xong 1 cái anti hack map giành cho tân thủ ( mới tập làm WE)

Mã:
function Trig_Anti_MapHack_Jass_Func002Func001C takes nothing returns boolean
    if ( not ( IsUnitVisible(udg_The_AMH, ConvertedPlayer(GetForLoopIndexA())) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_Anti_MapHack_Jass_Actions takes nothing returns nothing
    set udg_The_AMH = gg_unit_h000_0000
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 10
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        if ( Trig_Anti_MapHack_Jass_Func002Func001C() ) then
            call DisplayTimedTextToForce( GetPlayersAll(), 1.00, ( GetPlayerName(ConvertedPlayer(GetForLoopIndexA())) + "have been kick by security system." ) )
            call CustomVictoryBJ( ConvertedPlayer(GetForLoopIndexA()), false, false )
        else
            call DoNothing(  )
        endif
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Anti_MapHack_Jass takes nothing returns nothing
    set gg_trg_Anti_MapHack_Jass = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Anti_MapHack_Jass, 1.00 )
    call TriggerAddAction( gg_trg_Anti_MapHack_Jass, function Trig_Anti_MapHack_Jass_Actions )
endfunction

hy vọng mã này có thế giúp ít cho người muốn làm anti hack map

mình đã đính kèm file trong AMHS v1.0.rar

trong đây đã có jass + GUI
 

Attachments

đánh nó cũng đâu có hiện máu đâu coi map demo thấy nó hiện máu sao đó
có thể hiện máu như map rex em thấy đẹp đấy được không anh Tom_Kazansky

---------- Post added at 18:50 ---------- Previous post was at 18:41 ----------

được rồi mà nó chỉ hiện máu 1 lần rồi mất ah
 
hy vọng mã này có thế giúp ít cho người muốn làm anti hack map

mình đã đính kèm file trong AMHS v1.0.rar

trong đây đã có jass + GUI
tốt mà ko ổn cho lắm
dummy phát sáng thì bị kik
giả sử mình muốn map làm sáng toàn bộ thì Anti này hết tác dụng rùi
có thể làm các anti map loại khác dc ko :|
 
Object Editor có skill nào tăng % máu hay mana không buff cho mình và đồng đội hay tự động tăng cho mình thôi
 
cho em hỏi skill Spiked Carapace của con bộ xít làm sao khi tăng nó + điểm thẳng vào def luôn
 
Status
Không mở trả lời sau này.
Back
Top