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

Status
Không mở trả lời sau này.
Đấy là do chưa remove hết leak :|
http://forum.gamevn.com/showthread.php?475215-Tutorial-Memory-Leaks-and-Custom-Script
Vào link trên xem đã làm đúng theo yêu cầu chưa ?
Còn nếu không thì do card màn hình quá "dỏm" :">
P/s: Lâu rồi không lên forum, không ngờ số lượng newbie tăng nhanh quá ( sung sướng quá :x )


ah bạn ơi bạn dow về http://www.mediafire.com/?d44maj465j1nmdb chơi thử cái , mình thấy giựt bởi cái góc camera hay sao ý , dow ve xem thử dùm nha cám ơn trước nhá :D
 
à bạn giải thích dùm mấy cái lệnh này dùm mình nha mò mẫm ko nổi

+1
function Trig_Follow_Move_Func001Func001C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(), 'ewsp')) >= 2 ) ) then
return false
endif
return true
endfunction

function Trig_Follow_Move_Func001A takes nothing returns nothing
if ( Trig_Follow_Move_Func001Func001C() ) then
call RemoveUnit( GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(), 'ewsp')) )
else
endif
endfunction

function Trig_Follow_Move_Func002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'H02D' )
endfunction

function Trig_Follow_Move_Func002Func001003001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction

function Trig_Follow_Move_Func002A takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "move", GroupPickRandomUnit(GetUnitsOfPlayerMatching(GetOwningPlayer(GetEnumUnit()), Condition(function Trig_Follow_Move_Func002Func001003001002))) )
endfunction

function Trig_Follow_Move_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_Follow_Move_Func001A )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Follow_Move_Func002001002)), function Trig_Follow_Move_Func002A )
endfunction

//===========================================================================
function InitTrig_Follow_Move takes nothing returns nothing
set gg_trg_Follow_Move = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Follow_Move, 1.00 )
call TriggerAddAction( gg_trg_Follow_Move, function Trig_Follow_Move_Actions )
endfunction

+2
function Trig_Enforce_Region_Func001Func001001001001001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction

function Trig_Enforce_Region_Func001Func001Func001Func001Func001002001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction

function Trig_Enforce_Region_Func001Func001Func001Func001A takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Enforce_Region_Func001Func001Func001Func001Func001002001001002)))) )
endfunction

function Trig_Enforce_Region_Func001Func001Func001C takes nothing returns boolean
if ( not ( RectContainsUnit(RectFromCenterSizeBJ(GetUnitLoc(GetEnumUnit()), 500.00, 500.00), GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetEnumPlayer(), 'ewsp'))) == true ) ) then
return false
endif
return true
endfunction

function Trig_Enforce_Region_Func001Func001A takes nothing returns nothing
if ( Trig_Enforce_Region_Func001Func001Func001C() ) then
call DoNothing( )
else
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetEnumPlayer(), 'ewsp'), function Trig_Enforce_Region_Func001Func001Func001Func001A )
endif
endfunction

function Trig_Enforce_Region_Func001A takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectAll(RectFromCenterSizeBJ(GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Enforce_Region_Func001Func001001001001001001002)))), 500.00, 500.00)), function Trig_Enforce_Region_Func001Func001A )
endfunction

function Trig_Enforce_Region_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_Enforce_Region_Func001A )
endfunction

//===========================================================================
function InitTrig_Enforce_Region takes nothing returns nothing
set gg_trg_Enforce_Region = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Enforce_Region, 3.00 )
call TriggerAddAction( gg_trg_Enforce_Region, function Trig_Enforce_Region_Actions )
endfunction

+3
function Trig_Pause_Orb_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetDyingUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction

function Trig_Pause_Orb_Func001A takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction

function Trig_Pause_Orb_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetDyingUnit()), 'ewsp'), function Trig_Pause_Orb_Func001A )
endfunction

//===========================================================================
function InitTrig_Pause_Orb takes nothing returns nothing
set gg_trg_Pause_Orb = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pause_Orb, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Pause_Orb, Condition( function Trig_Pause_Orb_Conditions ) )
call TriggerAddAction( gg_trg_Pause_Orb, function Trig_Pause_Orb_Actions )
endfunction

+4
function Trig_Unpause_Orb_Func001A takes nothing returns nothing
call PauseUnitBJ( false, GetEnumUnit() )
endfunction

function Trig_Unpause_Orb_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetRevivingUnit()), 'ewsp'), function Trig_Unpause_Orb_Func001A )
endfunction

//===========================================================================
function InitTrig_Unpause_Orb takes nothing returns nothing
set gg_trg_Unpause_Orb = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unpause_Orb, EVENT_PLAYER_HERO_REVIVE_FINISH )
call TriggerAddAction( gg_trg_Unpause_Orb, function Trig_Unpause_Orb_Actions )
endfunction

giải thích mấy cái dòng lệnh dùm nha cảm ơn trước hì :D
 
@soulofwinds
trong dạng hàm này
có vài từ sai
và mình xem kỹ như có 1 hàm là Random
1 hàm là check Item set untis death :|

Tình hình là trong Object Unit mình thấy có 3 kiểu
----Art - Tinting Color 1 (Red) : 255
----Art - Tinting Color 1 (Green) : 255
----Art - Tinting Color 1 (Blue) : 255
Cái này là để thay mày của model effect (mấy quả cầu chưởng), mình mới biết chuyển 1 màu là cho Blue về 0 thì được màu vàng . Vậy bây giờ muốn chuyển thành màu đen thì phải chỉnh làm sao ?
Bạn nào có số liệu màu của 3 cái Art này thì chỉ mình với ????

theo như vậy
thì trong cuộc sống của minh hay trong thế giới ảo
điều có 4 màu cơ bản
Đỏ Xanh Nam Trắng
thì nếu muốn màu đen thì mình cho nó là cảnh giới hok có màu tức là set 0 all color
còn màu trắng thì được kết hợp bởi 100% color Effect thì sẽ là 255 đợn vị tương tự :P
 
Chỉnh sửa cuối:
CHo mình xin một system để làm các spell như bắn tên của hổ dotA . Mình thấy pudge war với warlock 095 làm toàn skill như vậy ko bít làm sao ?
 
ai chỉ mình làm sao để khi đánh chết creep sẽ rớt item
lưu ý : ko phải creep đc đặt ra ngoài mà là creep xuất hiện sau giống dota ý
ai bik chỉ dùm thank nhiều :D
 
ai chỉ mình làm sao để khi đánh chết creep sẽ rớt item
lưu ý : ko phải creep đc đặt ra ngoài mà là creep xuất hiện sau giống dota ý
ai bik chỉ dùm thank nhiều :D
GUI
Mã:
Melee Initialization
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Dying unit)) Equal to Footman // loài của con untis
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 100) Equal to 1 // 1= tỷ lệ random dc chấp nhận
            Then - Actions
                Item - Create Tome of Experience at (Position of (Dying unit)) // tạo items  kế bên kẻ chết
            Else - Actions
                Do nothing

vậy thôi
Jass
Mã:
function Trig_Melee_Initialization_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetDyingUnit()) == 'hfoo' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Melee_Initialization_Func001C takes nothing returns boolean
    if ( not ( GetRandomInt(1, 100) == 1 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Melee_Initialization_Actions takes nothing returns nothing
    if ( Trig_Melee_Initialization_Func001C() ) then
        call CreateItemLoc( 'texp', GetUnitLoc(GetDyingUnit()) )
    else
        call DoNothing(  )
    endif
endfunction

//===========================================================================
function InitTrig_Melee_Initialization takes nothing returns nothing
    set gg_trg_Melee_Initialization = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Melee_Initialization, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_Melee_Initialization, Condition( function Trig_Melee_Initialization_Conditions ) )
    call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
endfunction


---------- Post added at 15:45 ---------- Previous post was at 15:41 ----------

Ai biết cách việt hóa 100% như map kt thì chỉ dùm với :D

muốn việt hóa máy cái
Quests (F10) à hay là
agility intelilgence gì đó hã
cái đó hok ai giúp đâu
từ từ bạn dịch đi
hok biết thêm tiếng việt vào thì đọc cái này http://forum.gamevn.com/showthread.php?652109-Lam-the-nao-de-thay-doi-font-chu-map-cua-ban

---------- Post added at 15:47 ---------- Previous post was at 15:45 ----------

ai chỉ dùm cái làm sao để ghi text nằm ở trên đầu unit ( không có sẵn trên bản đồ ) vậy demo nhá

cái đó thì hơi bó tay như là
mỗi 1 giây thì destroy + thêm Floating Text - Create floating text that reads Name Untis above Footman 0000 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
típ
xài hàmFloating Text rùi chọn untis là ok
Floating Text - Create floating text that reads Name Untis above Footman 0000 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency


---------- Post added at 15:49 ---------- Previous post was at 15:47 ----------

CHo mình xin một system để làm các spell như bắn tên của hổ dotA . Mình thấy pudge war với warlock 095 làm toàn skill như vậy ko bít làm sao ?

vào đây xem
http://world-editor-tutorials.thehelper.net/mapdownload.php?download=137
open map rùi vào trong xem cái skils pudge chắc có thể hiểu ấy !
 
cho em hỏi máy cái thứ tự của 323 gì đó là để làm sao
máy cái thứ tự ô ấy
như là
skils cuối là
32
skils 1 là 01 hay 22 gì đó ai cho em biết chính xác hơn không ?
 
@soulofwinds
trong dạng hàm này
có vài từ sai
và mình xem kỹ như có 1 hàm là Random
1 hàm là check Item set untis death :|



theo như vậy
thì trong cuộc sống của minh hay trong thế giới ảo
điều có 4 màu cơ bản
Đỏ Xanh Nam Trắng
thì nếu muốn màu đen thì mình cho nó là cảnh giới hok có màu tức là set 0 all color
còn màu trắng thì được kết hợp bởi 100% color Effect thì sẽ là 255 đợn vị tương tự :P

ah bạn dh-g cảm ơn bạn nhiều , thế mấy cái lệnh trên chuyển qua GUI được ko

---------- Post added at 18:57 ---------- Previous post was at 18:53 ----------

bạn dh-g vào cái map này xem giúp mình cái nha , vấn đề với cái camera hic http://www.mediafire.com/?d44maj465j1nmdb map này cũng nhẹ thôi
 
muốn cho 1 khu vực mưa rơi thì sao ạ :P

xài hàm Environment
Environment - Create at Region <gen> the weather effect Ashenvale Rain (Heavy)

chỉ vậy thôi :-??

ah bạn dh-g cảm ơn bạn nhiều , thế mấy cái lệnh trên chuyển qua GUI được ko

---------- Post added at 18:57 ---------- Previous post was at 18:53 ----------

bạn dh-g vào cái map này xem giúp mình cái nha , vấn đề với cái camera hic http://www.mediafire.com/?d44maj465j1nmdb map này cũng nhẹ thôi

xin lỗi mình không giúp dc!
 
cho tui hỏi có thể tự tạo skill riêng theo ý của mình không ??

các loại skils thì tùy loại
có loại là mặt định của nhà sản xuất tạo ra sẵn như là
loại
Storm Bolt v.v...
còn loại 2 là loại kết hợp
được xài các hàm mã tạo nên
nhân phải có loại skils mặt định để làm gốc của skils kết hợp
nếu bạn hỏi có tự tạo skill riêng theo ý của mình không
thì câu này không biết sao trả lời :-??
 
Status
Không mở trả lời sau này.
Back
Top