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

Status
Không mở trả lời sau này.
Cho hỏi khi dung lượng map wá lớn không thể chạy được chế độ hai người chơi trở lên thì phải sử lý thế nào?
nếu map 1.24e thì map tối đa chơi LAN là 8MB< còn map của 1.23 thì map tối đa dung lượng chơi LAN là 4MB< nếu map dung lượng lớn quá thì xóa bớt textures/Model

p.s: xóa bớt import
nếu map của bạn ít import mà lên đc vậy thì bó tay rồi =))
 
Last edited by a moderator:
Hỏi xem nén map chưa đã ... nén vô còn giảm đựoc tí chưa nén thì nén đi coi :)
 
Em làm trigger để khi unit xác định máu dưới 40% thì đc add thêm 1 skill
Mã:
    Events
        ...
    Conditions
        ((Triggering unit) has buff Fear) Equal to True
        (Percentage life of (Triggering unit)) less than or equal to 40.00
    Actions
        Unit-Add Fear(Buff) to (Triggering unit)
        Unit-Set level of Fear(Buff) for (Triggering unit) to (Level of  Fear of (Triggering unit))
Ai cho em hỏi event của trigger này nên đặt là gì
 
^
Thứ nhất là bạn nên làm 1 trigger khi học skill đó thì set biến cho trigger unit để khi trigger trên hoạt động thì nó còn biết ai mà add ( nếu đó chỉ dùng cho 1 unit , còn ứng dụng toàn map thì ko cần )
Thứ 2 là mình nghĩ event nên dùng là Every 1 seconds of gametime
THứ 3 là nếu nó dưới 40% và được add rồi , xong nó về nhà hồi máu lên 100% vẫn còn :-/
p/s : mấy cái loại này làm cho command aura nhấp nháy , ko biết bạn có bị ko :)
 
Chỉnh sửa cuối:
Mình có 1 trigger khi máu cao hơn 40% thì remove ability kia đi
mà cái Condition Learned HeroSkill Equal to ... ở đâu vậy sao mình không thấy

---------- Post added at 23:00 ---------- Previous post was at 22:53 ----------

Mình có 1 trigger khi máu cao hơn 40% thì remove ability kia đi
mà cái Condition Learned HeroSkill Equal to ... ở đâu vậy sao mình không thấy
À mình thấy rồi mode thông cảm del hộ 2 bài này nhé
cám ơn goldviper nhiều
 
ai cho tớ hỏi cái này tác dụng thật là gì thế :-s
[spoil]
Mã:
library LastOrder initializer Init requires AIDS
//******************************************************************************
//* BY: Rising_Dusk
//* 
//* This library has a lot of usefulness for when you want to interface with the
//* last order a unit was given. This can be useful for simulating spell errors
//* and where you'd want to give them back the order they had prior to the spell
//* cast (whereas without this library, they'd just forget their orders).
//* 
//* There are some handy interfacing options for your use here --
//*     function GetLastOrderId takes unit u returns integer
//*     function GetLastOrderString takes unit u returns string
//*     function GetLastOrderType takes unit u returns integer
//*     function GetLastOrderX takes unit u returns real
//*     function GetLastOrderY takes unit u returns real
//*     function GetLastOrderTarget takes unit u returns widget
//*     function AbortOrder takes unit u returns boolean
//*
//* There are also some order commands that can be useful --
//*     function IssueLastOrder takes unit u returns boolean
//*     function IssueSecondLastOrder takes unit u returns boolean
//*     function IsLastOrderFinished takes unit u returns boolean
//* 
//* You can access any information you'd like about the orders for your own
//* order handling needs.
//* 
globals
    //* Storage for last order
    private          integer array Order
    private          integer array Type
    private          widget  array Targ
    private          boolean array Flag
    private          real    array X
    private          real    array Y
    
    //* Storage for second last order
    private          integer array P_Order
    private          integer array P_Type
    private          widget  array P_Targ
    private          boolean array P_Flag
    private          real    array P_X
    private          real    array P_Y
    
    //* Order type variables
            constant integer       ORDER_TYPE_TARGET    = 1
            constant integer       ORDER_TYPE_POINT     = 2
            constant integer       ORDER_TYPE_IMMEDIATE = 3
    
    //* Trigger for the order catching
    private          trigger       OrderTrg             = CreateTrigger()
endglobals

//**********************************************************
function GetLastOrderId takes unit u returns integer
    return Order[GetUnitId(u)]
endfunction
function GetLastOrderString takes unit u returns string
    return OrderId2String(Order[GetUnitId(u)])
endfunction
function GetLastOrderType takes unit u returns integer
    return Type[GetUnitId(u)]
endfunction
function GetLastOrderX takes unit u returns real
    return X[GetUnitId(u)]
endfunction
function GetLastOrderY takes unit u returns real
    return Y[GetUnitId(u)]
endfunction
function GetLastOrderTarget takes unit u returns widget
    return Targ[GetUnitId(u)]
endfunction
//**********************************************************
private function OrderExclusions takes unit u, integer id returns boolean
    //* Excludes specific orders or unit types from registering with the system
    //* 
    //* 851972: stop
    //*         Stop is excluded from the system, but you can change it by
    //*         adding a check for it below. id == 851972
    //* 
    //* 851971: smart
    //* 851986: move
    //* 851983: attack
    //* 851984: attackground
    //* 851990: patrol
    //* 851993: holdposition
    //*         These are the UI orders that are passed to the system.
    //* 
    //* >= 852055, <= 852762
    //*         These are all spell IDs from defend to incineratearrowoff with
    //*         a bit of leeway at the ends for orders with no strings.
    //* 
    return id == 851971 or id == 851986 or id == 851983 or id == 851984 or id == 851990 or id == 851993 or (id >= 852055 and id <= 852762)
endfunction
private function LastOrderFilter takes unit u returns boolean
    //* Some criteria for whether or not a unit's last order should be given
    //* 
    //* INSTANT type orders are excluded because generally, reissuing an instant
    //* order doesn't make sense. You can remove that check below if you'd like,
    //* though.
    //* 
    //* The Type check is really just to ensure that no spell recursion can
    //* occur with IssueLastOrder. The problem with intercepting the spell cast
    //* event is that it happens after the order is 'caught' and registered to
    //* this system. Therefore, to just IssueLastOrder tells it to recast the
    //* spell! That's a problem, so we need a method to eliminate it.
    //* 
    local integer id = GetUnitId(u)
    return u != null and GetWidgetLife(u) > 0.405 and Type[id] != ORDER_TYPE_IMMEDIATE
endfunction
private function SecondLastOrderFilter takes unit u returns boolean
    //* Same as above but with regard to the second last order issued
    local integer id = GetUnitId(u)
    return u != null and GetWidgetLife(u) > 0.405 and P_Type[id] != ORDER_TYPE_IMMEDIATE and P_Order[id] != Order[id]
endfunction
//**********************************************************

function IsLastOrderFinished takes unit u returns boolean
    return (GetUnitCurrentOrder(u) == 0 and Order[GetUnitId(u)] != 851972) or Flag[GetUnitId(u)]
endfunction

function IssueLastOrder takes unit u returns boolean
    local integer id = GetUnitId(u)
    local boolean b  = false
    if LastOrderFilter(u) and Order[id] != 0 and not Flag[id] then
        if Type[id] == ORDER_TYPE_TARGET then
            set b = IssueTargetOrderById(u, Order[id], Targ[id])
        elseif Type[id] == ORDER_TYPE_POINT then
            set b = IssuePointOrderById(u, Order[id], X[id], Y[id])
        elseif Type[id] == ORDER_TYPE_IMMEDIATE then
            set b = IssueImmediateOrderById(u, Order[id])
        endif
    endif
    return b
endfunction

function IssueSecondLastOrder takes unit u returns boolean
    //* This function has to exist because of spell recursion
    local integer id = GetUnitId(u)
    local boolean b  = false
    if SecondLastOrderFilter(u) and P_Order[id] != 0 and not P_Flag[id] then
        if P_Type[id] == ORDER_TYPE_TARGET then
            set b = IssueTargetOrderById(u, P_Order[id], P_Targ[id])
        elseif P_Type[id] == ORDER_TYPE_POINT then
            set b = IssuePointOrderById(u, P_Order[id], P_X[id], P_Y[id])
        elseif P_Type[id] == ORDER_TYPE_IMMEDIATE then
            set b = IssueImmediateOrderById(u, P_Order[id])
        endif
    endif
    return b
endfunction

function AbortOrder takes unit u returns boolean
    local boolean b = true
    if IsUnitPaused(u) then
        set b = false
    else
        call PauseUnit(u, true)
        call IssueImmediateOrder(u, "stop")
        call PauseUnit(u, false)
    endif
    return b
endfunction
//**********************************************************

private function Conditions takes nothing returns boolean
    return OrderExclusions(GetTriggerUnit(), GetIssuedOrderId())
endfunction

private function Actions takes nothing returns nothing
    local unit    u  = GetTriggerUnit()
    local integer id = GetUnitId(u)
    
    //* Store second to last order to eliminate spell recursion
    set P_Order[id]  = Order[id]
    set P_Targ[id]   = Targ[id]
    set P_Type[id]   = Type[id]
    set P_Flag[id]   = Flag[id]
    set P_X[id]      = X[id]
    set P_Y[id]      = Y[id]
    
    set Flag[id]     = false
    set Order[id]    = GetIssuedOrderId()
    if GetTriggerEventId() == EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER then
        set Targ[id] = GetOrderTarget()
        set Type[id] = ORDER_TYPE_TARGET
        set X[id]    = GetWidgetX(GetOrderTarget())
        set Y[id]    = GetWidgetY(GetOrderTarget())
    elseif GetTriggerEventId() == EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER then
        set Targ[id] = null
        set Type[id] = ORDER_TYPE_POINT
        set X[id]    = GetOrderPointX()
        set Y[id]    = GetOrderPointY()
    elseif GetTriggerEventId() == EVENT_PLAYER_UNIT_ISSUED_ORDER then
        set Targ[id] = null
        set Type[id] = ORDER_TYPE_IMMEDIATE
        set X[id]    = GetUnitX(u)
        set Y[id]    = GetUnitY(u)
    debug else
        debug call BJDebugMsg(SCOPE_PREFIX+" Error: Order Doesn't Exist")
    endif
    
    set u = null
endfunction
//**********************************************************

private function SpellActions takes nothing returns nothing
    set Flag[GetUnitId(GetTriggerUnit())] = true
endfunction
//**********************************************************

private function Init takes nothing returns nothing
    local trigger trg = CreateTrigger()
    call TriggerAddAction(OrderTrg, function Actions)
    call TriggerAddCondition(OrderTrg, Condition(function Conditions))
    call TriggerRegisterAnyUnitEventBJ(OrderTrg, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
    call TriggerRegisterAnyUnitEventBJ(OrderTrg, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
    call TriggerRegisterAnyUnitEventBJ(OrderTrg, EVENT_PLAYER_UNIT_ISSUED_ORDER)
    
    call TriggerAddAction(trg, function SpellActions)
    call TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    
    set trg = null
endfunction
endlibrary
[/spoil]
 
cho hỏi cái này với: mình thấy map kiếm thế của anh Rex ý. anh tô đen cái phần không cần dùng đến nó đen xì luôn. kéo vào vùng đó chả nhìn thấy gì hết. vậy mình tô map của mình nhưng khi kéo chuột vào vẫn thấy sáng như kiểu mình chựa chạy vào để mở phần đất đó ra vậy. nhưng chỉ không chạy vào được thôi.ai bày mình cách tô đen như map KT đi. cảm ơn trước :D

---------- Post added at 07:41 ---------- Previous post was at 07:38 ----------

ủa mà bài hôm qua của em đâu rồi anh Tom. em cũng hỏi 1 bài như vậy nè. mà vào thấy mất tiêu. lại phải hỏi lại. mà sao hôm qua sever hay bảo trì thế. vào trang wow8 xong về máy xi ke thế nào ý. post bài ghi bằng vietkey hok đc. Tàu có khác:(

---------- Post added at 07:43 ---------- Previous post was at 07:41 ----------

ủa mà bài hôm qua của em đâu rồi anh Tom. em cũng hỏi 1 bài như vậy nè. mà vào thấy mất tiêu. lại phải hỏi lại. mà sao hôm qua sever hay bảo trì thế. vào trang wow8 xong về máy xi ke thế nào ý. post bài ghi bằng vietkey hok đc. Tàu có khác:(
 
Tình hình là mình cũng giống "zzchaolegionzz" luôn, hôm qua có post 2 bài, có người trả lời 1 bài hẳn hoi mà hôm nay tự nhiên chả thấy đâu (cũng chỉ ở trang 29 này thôi) ?????
 
ah ra là vậy hả. hix mình còn mới tập làm map. topic cũng đọc rồi. mà nhiều quá nên không nhớ nó ở topic nào. nên là lên hỏi. mất 4 ngày để đọc hết các topic :D. mà cái map unknowterrain đó là map che đen như trong KT hả anh Azu.
 
ừm! Cậu chỉ cần tạo một Doodad và cho model đó, chỗ nào cần đen thì đặt nó vào là xong!:) - Nhớ chỉnh sửa kích thước cho hợp lệ!
 
Cho hỏi có cách nào để xóa cái hiệu ứng hiện số máu mất trong skill Manaburn và Shadow Strike không :(
 
làm được rồi. thanh Azu nha. mà cho hỏi 1 câu nha. NB mà. hj. skill trong map của mình toàn là skill tự chế của blizzảd. giờ mình len hive down mấy cái spell trên đó về. giờ mính muốn. cho skill vào map thì có phải thêm mấy variable không. mà các bước để đưa skill vào map chỉ giúp mình được không. hix. toàn đạo skill của người ta nên sai chả biêt chỗ sửa :D.
 
Tất nhiên phải làm tất cả theo hướng dẫn chứ! Từ loại skill người ta làm như thế nào cho đến variables :D! Tất nhiên trigger sao chép sang là điều không thể thiếu rồi!Phải thì làm y như vậy ý bạn! Còn không thì ta cứ thỏa thích sửa theo những gì đã cho phép!:-"
 
tiện thể hỏi luôn 1 câu nữa:D mình thấy map KT của anh Rex model nhiều vậy mà chỉ có 8mb vậy mà map của mình mới co mười mấy cái model mà đã 6mb chưa kể LoadingScreen. vậy mình nén dung lượng map thì cỡ giảm được bao nhiêu nhỉ ?. mà map KT model nhiều vậy nếu lúc chưa nén map thì chắc 9 10 mb ấy nhỉ :D

---------- Post added at 16:44 ---------- Previous post was at 16:40 ----------

thế mình down cái spell về chỉ có mỗi một file spellv01.w3x thì phải làm sao tiếp hả bạn :D giúp với nha. không thì cho xin cái yh có gì pm đỡ phải len topic hỏi vớ vẩn thế này :D
 
Mở nó ra, rồi xem trigger, spell của nó!
Nếu kĩ càng bạn làm theo từng bước trigger, còn sơ sơ thì cứ Export trigger ra rồi dùng!:-"
Map KT thì ảnh nén thôi - Nếu model ít thì còn cả dung lượng của Trigger nữa bạn à!
 
ơ thế mình Import tringger vào thì nó có thay tringger cũ đi không. như kiểu mình import Ability hay unit á. :D
 
Chắc không đâu - Sao so sánh nhau như vậy được!:| (Cũng chưa thử bao giờ:D)
Cậu thử xem
 
mình biết rồi. vào tringger xem có variable nào thì ghi lại. rồi sang Ability copy cái skill về. copy cái Jass nữa. thế là xong :D có phải thế không. tối về làm thử. dù gì cũng thank nhiều nha. mà cái map AdventureLegend cậu làm bao lâu vậy. map mình giờ mới gần xong terrain. con tringger với. skill chưa làm. her. mà cho xin cái yahoo được. không. có gì hỏi cho lẹ.:D gửi qua tin nhắn. oke. see you (ngày mai) tomorrow

---------- Post added at 17:29 ---------- Previous post was at 17:26 ----------

cái tringger mình import vào map nó cũng thay tringger cũ mà. vừa thư xong :D
 
Status
Không mở trả lời sau này.
Back
Top