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

Sao ko ai giup em zay :((
1. khi hero team 1 chết sẽ hồi sinh tại vị trí bên này (region) còn hero ở team 2 chết sẽ hôi sinh tại vị trí bên kia (region)
2. Khi chọn hero, hero đó sẽ tự có 1 skill mà ko cần phải tăng, nó hiện thị ở ô bên cạnh Attribute Bonus

1. Sau khi hồi sinh hero thì dùng lệnh Unit - Move
2. Thêm skill vào chỗ Abilities - Normal
 
Cho em hỏi là muốn mặc chiếc áo cho hero thì làm thế nào. Em nhập chest thì cái áo nó che cả mặt còn ở phần bụng thì ko mặc. Em muốn nó mặc áo cho nó thì phải làm thế nào.
 
vlcejm

Đây là lỗi mình gặp phải khi cài các system có phần auto như thế
Mã:
//      How to implement?
//     ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
//          Simply create a new trigger object called AIDS, go to 'Edit -> Convert
//          to Custom Text', and replace everything that's there with this script.
//
//          Save the map, close it, reopen it, and then delete the "!" from the
//          FAR left side of the next lines (so "external" will line up with this line):
//!         external ObjectMerger w3a Adef AIDS anam "State Detection" ansf "(AIDS)" aart "" arac 0
//
//          At the top of the script, there is a 'UnitIndexingFilter' constant
//          function. If the function returns true for the unit, then that unit
//          will be automatically indexed. Setting this to true will automatically
//          index all units. Setting it to false will disable automatic indexing.
//
 

code thì toàn handle nhiều mà leak chắc là không có
1 GetFilterUnit() = handle, nhiều = leak nhẹ và có thể
local unit u = GetFilterUnit()
set u =null hoặc xài global var


Mà cái đó trong đoạn condition xài return, đặt biến rồi null kiểu gì vậy bạn ? Như này chăng ?

Mã:
function condHelper takes integer unitId returns boolean
    local unit u = GetFilterUnit() 
    return GetUnitTypeId(u) == unitId and GetWidgetLife(u) > 0.405 and not  IsUnitType(u, UNIT_TYPE_SUMMONED)
    set u =null
endfunction

Mình test nó báo lỗi mà.
 
vlcejm

Đây là lỗi mình gặp phải khi cài các system có phần auto như thế
Mã:
//      How to implement?
//     ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
//          Simply create a new trigger object called AIDS, go to 'Edit -> Convert
//          to Custom Text', and replace everything that's there with this script.
//
//          Save the map, close it, reopen it, and then delete the "!" from the
//          FAR left side of the next lines (so "external" will line up with this line):
//!         external ObjectMerger w3a Adef AIDS anam "State Detection" ansf "(AIDS)" aart "" arac 0
//
//          At the top of the script, there is a 'UnitIndexingFilter' constant
//          function. If the function returns true for the unit, then that unit
//          will be automatically indexed. Setting this to true will automatically
//          index all units. Setting it to false will disable automatic indexing.
//

cái này tại warcraft của bạn MPQ đã bị mã hóa, chứ thật ra đa số war3 là không có khóa MPQ cả nên xài vụ external dc. còn bị khóa thì xài vụ này sẽ báo lỗi vì không thể mở war3 tìm số liệu SLK
Mà cái đó trong đoạn condition xài return, đặt biến rồi null kiểu gì vậy bạn ? Như này chăng ?

Mã:
function condHelper takes integer unitId returns boolean
    local unit u = GetFilterUnit() 
    return GetUnitTypeId(u) == unitId and GetWidgetLife(u) > 0.405 and not  IsUnitType(u, UNIT_TYPE_SUMMONED)
    set u =null
endfunction

Mình test nó báo lỗi mà.

bạn có thể làm theo thế mà ?

local unit u = GetFilterUnit()
local boolean b = false
if GetUnitTypeId(u) == unitId and GetWidgetLife(u) > 0.405 and not IsUnitType(u, UNIT_TYPE_SUMMONED) then
set b = true
endif
set u = null
return b
endfucntion
 
cái này tại warcraft của bạn MPQ đã bị mã hóa, chứ thật ra đa số war3 là không có khóa MPQ cả nên xài vụ external dc. còn bị khóa thì xài vụ này sẽ báo lỗi vì không thể mở war3 tìm số liệu SLK
[/b]
Vậy bạn có biện pháp nào giúp mình ko?
 
Vậy bạn có biện pháp nào giúp mình ko?

cài laị war:|. và hy vọng war đó file MPQ không bị khóa!. có thể test bằng xài modelWar3Editor open file MPQ nếu ra toàn là số (folder,hoặc trống) thì MPQ bị khóa!

Lạy trời lạy đất, ai giúp với :((. oa oa! đang gấp mà hổng ai giúp :((

câu trả lời là. đây chỉ là war3 :-j
 
Chỉnh sửa cuối:
cài laị war:|. và hy vọng war đó file MPQ không bị khóa!. có thể test bằng xài modelWar3Editor open file MPQ nếu ra toàn là số (folder,hoặc trống) thì MPQ bị khóa!



câu trả lời là. đây chỉ là war3 :-j
'

World Editor mµ sao l¹i War3 ? :|, anh co biêt 2 trigger kia ko, biet thì chỉ dùm em với
 
vậy chỉ cần cho nó 1 skill metamphosis rồi cho nó biến thành 1 hero khác có sẵn bộ skill khác thôi hả bạn

ví dụ mình muốn khi hero đó có 1 item thì chạy vào 1 reigon sẽ biến thành hero khác (skill thì mất nhưng item vẫn con) thì làm sao?
 
cho mình hỏi cách làm 1 spell gây 2 lần damage AoE cho đối phương ai biết cách làm thì hướng dẫn mình với nhé thank
 
Mấy bác cho e hỏi cái Upgrade dùng để nâng cấp damgage cho Unit, cái quy tắt + - x / thế nào, bữa giờ test mà k rõ quy tắt nó như sao @@
 
ví dụ mình muốn khi hero đó có 1 item thì chạy vào 1 reigon sẽ biến thành hero khác (skill thì mất nhưng item vẫn con) thì làm sao?

Thấy lâu rồi, cứ tưởng sẽ có người trả lời nên ko trả lời, dù sao thì mình cũng ít đụng tới, mình chỉ "nghiên cứu" vớ vẩn, linh tinh vớ cái WE này thôi.

Mình chỉ làm được vầy thôi:
EnterChange
    Events
        Unit - A unit enters <Region>
    Conditions
        ((Triggering unit) is A Hero) Equal to True
        (Unit-type of (Triggering unit)) Not equal to <ReplacedUnit>
    Actions
        Unit - Replace (Triggering unit) with a <ReplacedUnit> using The old unit's relative life and mana
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Hero - Give (Item carried by (Triggering unit) in slot (Integer A)) to (Last replaced unit)
 
uhm,thanks vậy mà mình ko nghĩ ra....(đã từng nghĩ tới cái raplace nhưng ko bik cái vụ item nên ko làm@@)
 
Chào mọi người :)

Mình có đoạn code này cần Anti-BJs, đoạn này mình không biết làm sao để loại bỏ BJs nên hy vọng ai đó giúp mình, mình cảm ơn nhiều:

Đoạn màu đỏ chính là BJs

Mã:
function conditionMatchingSpawn takes nothing returns boolean
    return (GetWidgetLife(GetFilterUnit()) > 0.405 and (not (IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE))) and (not (IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO))) and (not (IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON))) and (not (IsUnitType(GetFilterUnit(), UNIT_TYPE_SUMMONED))) and (not (IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL))) and (not (IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT))))
endfunction

function spawnHelper takes integer unitId returns nothing
    local unit p = GetEnumUnit()
    local real x = GetUnitX(p)
    local real y = GetUnitY(p)
    local unit s
    if ([B][COLOR="#FF0000"]CountUnitsInGroup[/COLOR][/B]([B][COLOR="#FF0000"]GetUnitsOfPlayerMatching[/COLOR][/B](GetOwningPlayer(p), Condition(function conditionMatchingSpawn))) <10) then
    set s = CreateUnit( GetOwningPlayer(p), unitId, x, y, bj_UNIT_FACING)
    endif
    set s = null
    set p = null
endfunction
 
Chào mọi người :)

Mình có đoạn code này cần Anti-BJs, đoạn này mình không biết làm sao để loại bỏ BJs nên hy vọng ai đó giúp mình, mình cảm ơn nhiều:

Đoạn màu đỏ chính là BJs

Mã:
function conditionMatchingSpawn takes nothing returns boolean
    return (GetWidgetLife(GetFilterUnit()) > 0.405 and (not (IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE))) and (not (IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO))) and (not (IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON))) and (not (IsUnitType(GetFilterUnit(), UNIT_TYPE_SUMMONED))) and (not (IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL))) and (not (IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT))))
endfunction

function spawnHelper takes integer unitId returns nothing
    local unit p = GetEnumUnit()
    local real x = GetUnitX(p)
    local real y = GetUnitY(p)
    local unit s
    if ([B][COLOR="#FF0000"]CountUnitsInGroup[/COLOR][/B]([B][COLOR="#FF0000"]GetUnitsOfPlayerMatching[/COLOR][/B](GetOwningPlayer(p), Condition(function conditionMatchingSpawn))) <10) then
    set s = CreateUnit( GetOwningPlayer(p), unitId, x, y, bj_UNIT_FACING)
    endif
    set s = null
    set p = null
endfunction

Ví dụ:

Mã:
    local group g=CreateGroup()
    local unit u
    local integer i=0
    call GroupEnumUnitsOfPlayer(g,Player(1),null)
    loop
       set u=FirstOfGroup(g)
       exitwhen u==null
       if GetUnitTypeId(u)==MatchingSpawn then
          set i=i+1
       endif
       call GroupRemoveUnit(g,u)
    endloop
    if i<10 then
       set s=CreateUnit( GetOwningPlayer(p),unitId,x,y,bj_UNIT_FACING)
    endif
 
^ Thật ra mình thấy hình như cách của bạn có leak thì phải, mà là leak nhiều lắm ý =.=

Tiện đây ai cho mình xin spell như thế này được không ? Ngày xưa mình từng có mà quên mất tên mà lại format ổ cứng từ rất lâu rồi:

Hero khi cast tạo ra một quả meteor của Demon Hunter lúc hóa Chaos tiến thẳng về phía trước, gặp unit nào thì đẩy unit đó đi theo cùng quả meteor và gây damage, không phải đẩy kiểu knockback, mà là như kiểu bị quả meteor nó đẩy ra sau thôi ấy, dính vào meteor luôn.
Nếu là Jass thì càng tốt nhé :)

Thank, mình không biết xin ở topic này đúng hay không, nếu sai thì mình xin lỗi.
 
Back
Top