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

Status
Không mở trả lời sau này.
100% như trong hình rồi ạ, nhưng khi em vào game thì ko thấy chọn force đâu cả. Map gốc thì ko bị sao ạ.
error3p.jpg
 

cảm ơn bạn, mình làm theo bài viết bên đó nhưng nó chỉ giúp mình sử dụng nhiều loại nền thôi, mình muốn sử dụng được cả nhiều loại đất cơ, bạn có thể chỉ mình được không
 
Ai biết khi đánh vào một cái nhà thì số dmg của nó lên 1s là 1200 thì mình sẽ được 1200 Gold (Giống troll & Elves ý )
?????
 
cảm ơn bạn, mình làm theo bài viết bên đó nhưng nó chỉ giúp mình sử dụng nhiều loại nền thôi, mình muốn sử dụng được cả nhiều loại đất cơ, bạn có thể chỉ mình được không
nền ? đất có gì khác nhau ??
hay mún import thêm vào :-/
cho hỏi đoan code là là ntn vậy :D công dụng ntn
Mã:
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function IsUnitNearUnit takes unit u1,unit u2 returns boolean
local real x1=GetUnitX(u1)
local real y1=GetUnitY(u1)
local real x2=GetUnitX(u2)
local real y2=GetUnitY(u2)
local real distance=SquareRoot((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))
local real MaxDistance=1200.//____________ __________,
// __ _______ _______ _____ "______" ___ ____ _________ _____
    return distance<=MaxDistance
endfunction

function IsUnitInHome takes unit u returns boolean
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local real tx=LoadReal(udg_ah,GetHandleId(u),StringHash("HomeX"))
local real ty=LoadReal(udg_ah,GetHandleId(u),StringHash("HomeY"))
local real distance=SquareRoot((tx - x) * (tx - x) + (ty - y) * (ty - y))
local real MaxDistance=1200.//____________ __________,
// __ _______ _______ _____ "______" ___ __ ___ _____ ______ ______
    return distance<MaxDistance
endfunction

function GetAggreUnit takes unit u,unit target,group gn returns unit
local unit f
local group g=CreateGroup()
local real agre
local real agre2
call GroupAddGroup(gn,g)
loop 
    set f=FirstOfGroup(g)
exitwhen f==null
    set agre=LoadReal(udg_ah,GetHandleId(u),GetHandleId(f))
    set agre2=LoadReal(udg_ah,GetHandleId(u),GetHandleId(target))
if agre>agre2 and IsUnitVisible(f,Player(PLAYER_NEUTRAL_PASSIVE)) and IsUnitNearUnit(f,u) and not IsUnitType(f,UNIT_TYPE_DEAD) and GetUnitState(f,UNIT_STATE_LIFE)>0.405  then
    set target=f
endif
    call DisplayTextToForce( GetPlayersAll(), GetUnitName(f)+ " agre is "+R2S(agre))
    call GroupRemoveUnit(g,f)
endloop
    call DestroyGroup(g)
set g=null
set f=null
return target
endfunction

function Trig_AttackTaken_Conditions takes nothing returns boolean
    return GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_PASSIVE)
endfunction

function GoHome_Remove takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer id=GetHandleId(t)
local unit u=LoadUnitHandle(udg_ah,id,0)
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local real tx=LoadReal(udg_ah,GetHandleId(u),StringHash("HomeX"))
local real ty=LoadReal(udg_ah,GetHandleId(u),StringHash("HomeY"))
local real distance=SquareRoot((tx - x) * (tx - x) + (ty - y) * (ty - y))
local trigger trg=LoadTriggerHandle(udg_ah,GetHandleId(u),StringHash("DamageTakenTrigger"))
local real HomeDistance=100.//__________,_______ __ _______ _ ________ _______,_______
// _____ ______ ___ _ ________ ______
if distance<=HomeDistance then
    call EnableTrigger(trg)
    call PauseTimer(t)
    call DestroyTimer(t)
    call FlushChildHashtable(udg_ah,id)
endif
set u=null
set t=null
set trg=null
endfunction

function Agre_Remove takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer id=GetHandleId(t)
local integer i1=LoadInteger(udg_ah,id,0)
local unit Attacker=LoadUnitHandle(udg_ah,id,1)
local real Damage=LoadReal(udg_ah,id,2)
local real DamageTaken=LoadReal(udg_ah,i1,GetHandleId(Attacker))-Damage
local group DamageGroup=LoadGroupHandle(udg_ah,i1,StringHash("DamagedNeutralGroup"))
if DamageTaken==0. then
    call GroupRemoveUnit(DamageGroup,Attacker)
    call SaveGroupHandle(udg_ah,i1,StringHash("DamagedNeutralGroup"),DamageGroup)
endif
    call SaveReal(udg_ah,i1,GetHandleId(Attacker),DamageTaken)
    call PauseTimer(t)
    call DestroyTimer(t)
    call FlushChildHashtable(udg_ah,id)
set DamageGroup=null
set t=null
set Attacker=null
endfunction

function Trig_DamageTaken_Conditions takes nothing returns boolean
local trigger DamageCheck=GetTriggeringTrigger()
local unit Damaged=LoadUnitHandle(udg_ah,GetHandleId(DamageCheck),0)
local integer DamagedId=GetHandleId(Damaged)
local unit Attacker=GetEventDamageSource()
local integer AttackerId=GetHandleId(Attacker)
local real Damage=GetEventDamage()
local group DamagedNeutralGroup=LoadGroupHandle(udg_ah,DamagedId,StringHash("DamagedNeutralGroup"))
local unit Target
local real DamageTaken=LoadReal(udg_ah,DamagedId,AttackerId)+Damage
local timer AgreRemoveTimer=CreateTimer()
local integer Timerid=GetHandleId(AgreRemoveTimer)
local timer GoHomeTimer
local integer GoHomeTimerId
local real AggreRemove=10.//_____,_____ _______ __________ ________ ____ _____ ___________
call SaveReal(udg_ah,DamagedId,AttackerId,DamageTaken)
call DisplayTextToForce( GetPlayersAll(), "Damage is taken by "+GetUnitName(Attacker)+" is "+R2S(Damage))
call SaveInteger(udg_ah,Timerid,0,DamagedId)
call SaveUnitHandle(udg_ah,Timerid,1,Attacker)
call SaveReal(udg_ah,Timerid,2,Damage)
call SaveReal(udg_ah,Timerid,3,0.)
call TimerStart(AgreRemoveTimer,AggreRemove,false,function Agre_Remove)
if GetUnitState(Damaged,UNIT_STATE_LIFE)<0.405 and IsUnitType(Damaged,UNIT_TYPE_DEAD) or Damage>GetUnitState(Damaged,UNIT_STATE_LIFE) then
    call TriggerClearConditions(DamageCheck)
    call DestroyTrigger(DamageCheck)
    call FlushChildHashtable(udg_ah,DamagedId)
    call FlushChildHashtable(udg_ah,GetHandleId(DamageCheck))
endif
    set Target=GetAggreUnit(Damaged,Attacker,DamagedNeutralGroup)
if IsUnitInHome(Damaged) then
if Target!=null then
    call IssueTargetOrder(Damaged,"attack",Target)
    call DisplayTextToForce( GetPlayersAll(), "Go to attack a "+GetUnitName(Target))
elseif Target==null then
    call IssuePointOrder(Damaged,"move",LoadReal(udg_ah,DamagedId,StringHash("HomeX")),LoadReal(udg_ah,DamagedId,StringHash("HomeY")))
    call DisplayTextToForce( GetPlayersAll(), "Go home ")
    call DisableTrigger(DamageCheck)
    set GoHomeTimer=CreateTimer()
    set GoHomeTimerId=GetHandleId(GoHomeTimer)
    call SaveUnitHandle(udg_ah,GoHomeTimerId,0,Damaged)
    call TimerStart(GoHomeTimer,0.5,true,function GoHome_Remove)
endif
elseif not IsUnitInHome(Damaged) then
    call IssuePointOrder(Damaged,"move",LoadReal(udg_ah,DamagedId,StringHash("HomeX")),LoadReal(udg_ah,DamagedId,StringHash("HomeY")))
    call DisplayTextToForce( GetPlayersAll(), "Go home ")
    call DisableTrigger(DamageCheck)
    set GoHomeTimer=CreateTimer()
    set GoHomeTimerId=GetHandleId(GoHomeTimer)
    call SaveUnitHandle(udg_ah,GoHomeTimerId,0,Damaged)
    call TimerStart(GoHomeTimer,0.5,true,function GoHome_Remove)
endif
set GoHomeTimer=null
set AgreRemoveTimer=null
set Damaged=null
set Attacker=null
set DamagedNeutralGroup=null
set DamageCheck=null
return true
endfunction

function Trig_AttackTaken_Actions takes nothing returns nothing
local unit Damaged=GetTriggerUnit()
local integer DamagedId=GetHandleId(Damaged)
local unit Attacker=GetAttacker()
local group DamagedNeutralGroup=LoadGroupHandle(udg_ah,DamagedId,StringHash("DamagedNeutralGroup"))
local trigger DamageCheck
local real DamagedX=GetUnitX(Damaged)
local real DamagedY=GetUnitY(Damaged)
local real PeriodicAttack=1.//______,_____ _______ _______ _____ ________
// ____ ___ _____,_____ ___ _______,_____ _______ ________ ____
if HaveSavedHandle(udg_ah,DamagedId,StringHash("DamagedNeutralGroup")) and not IsUnitInGroup(Attacker,DamagedNeutralGroup) then
    call GroupAddUnit(DamagedNeutralGroup,Attacker)
    call SaveGroupHandle(udg_ah,DamagedId,StringHash("DamagedNeutralGroup"),DamagedNeutralGroup)
elseif not HaveSavedHandle(udg_ah,DamagedId,StringHash("DamagedNeutralGroup")) then
    set DamagedNeutralGroup=CreateGroup()
    call GroupAddUnit(DamagedNeutralGroup,Attacker)
    call SaveGroupHandle(udg_ah,DamagedId,StringHash("DamagedNeutralGroup"),DamagedNeutralGroup)
    call DisplayTextToForce( GetPlayersAll(), "DamageGroup Is Create") 
if not HaveSavedHandle(udg_ah,DamagedId,StringHash("DamageTakenTrigger")) then
    set DamageCheck=CreateTrigger()
    call TriggerRegisterUnitEvent( DamageCheck, Damaged, EVENT_UNIT_DAMAGED )
    call TriggerRegisterTimerEvent(DamageCheck, PeriodicAttack, true)
    call TriggerAddCondition( DamageCheck, Condition( function Trig_DamageTaken_Conditions ) )
    call SaveTriggerHandle(udg_ah,DamagedId,StringHash("DamageTakenTrigger"),DamageCheck)
    call SaveUnitHandle(udg_ah,GetHandleId(DamageCheck),0,Damaged)
endif
    call SaveReal(udg_ah,DamagedId,StringHash("HomeX"),DamagedX)
    call SaveReal(udg_ah,DamagedId,StringHash("HomeY"),DamagedY)
endif
set Damaged=null
set Attacker=null
set DamagedNeutralGroup=null
set DamageCheck=null
endfunction

//===========================================================================
function InitTrig_AttackTaken takes nothing returns nothing
    set gg_trg_AttackTaken = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_AttackTaken, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddCondition( gg_trg_AttackTaken, Condition( function Trig_AttackTaken_Conditions ) )
    call TriggerAddAction( gg_trg_AttackTaken, function Trig_AttackTaken_Actions )
endfunction
NeutralAttackAI
Help :((
 
Mọi người cho hỏi, cái abilities Volcano của con Firelord, lúc ra skill thì có nguyên quả núi lửa, không biết có cách nào làm mất quả núi lửa này đc ko ?
 
mấy anh ơi!!! có ai biết làm cho 1 skill trông mờ đi k0. lam unit mờ di thì em biết nhưng làm skill mờ đi thì em chịu. skill mờ di tức là trông nó trong suốt ấy. vẫn ra skill nhưng có thể nhìn qua được ấy.
 
Mọi người cho hỏi, cái abilities Volcano của con Firelord, lúc ra skill thì có nguyên quả núi lửa, không biết có cách nào làm mất quả núi lửa này đc ko ?
làm thử rồi.. không có cách nào :D
mấy anh ơi!!! có ai biết làm cho 1 skill trông mờ đi k0. lam unit mờ di thì em biết nhưng làm skill mờ đi thì em chịu. skill mờ di tức là trông nó trong suốt ấy. vẫn ra skill nhưng có thể nhìn qua được ấy.

cái này thì sử dụng lập = Timer thôi.
Tạo 1 Trigger
Event - Every 0.1 s ...
Action - là Chance Animation cho con Unit đó mờ 20% hoặc bao nhiu tùy thích..

1 Trigger khác tạo ra để bắt Spell..
Có nhiều cách để làm nhưng mình sẽ giới thiệu sơ qua cho bạn một cách.

Đây là Trigger 1 Dùng để bắt Spell..
Khi Unit học Skill Passive này thì sẽ thiết lập những thứ cần thiết để khi qua bên Trigger kia có cái mà dùng
Mã:
Hide
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to [Demon Hunter] Evasion 
    Actions
        Set EvasionUnit[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
        Set Evasion[(Player number of (Owner of (Triggering unit)))] = True
        Set EvasionInt[(Player number of (Owner of (Triggering unit)))] = (Level of [Demon Hunter] Evasion  for (Triggering unit))
        Trigger - Run Hide effect <gen> (checking conditions)
        Trigger - Turn on Hide effect <gen>

Đây là Trigger thứ 2.
Dùng vòng lập như vậy và các biến sử dụng Array là để MUI Skill + với nếu Unit đó chết đi thì khi hồi sinh lại thì mình lại thấy được nó vẫn mờ.

Mã:
Hide effect
    Events
        Time - Every 0.20 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Evasion[(Integer A)] Equal to True
                    Then - Actions
                        Animation - Change EvasionUnit[(Integer A)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with (9.00 x (Real(EvasionInt[(Integer A)])))% transparency
                    Else - Actions
                        Do nothing

Đây là một Skill trong Maps Footman Frenzy - Fountain Of Power mà mình đang thực hiẹn. Thử làm nhé. :)
 
? : Làm sao mà khi vào game có bản tùy chọn tên là Chọn Hero xuất hiện : Chiến Binh,Phù Thủy,Lính Ngự Lâm,Trinh Sát,Ví dụ chọn Chiến Binh thì sẽ tạo ra 1 heros tên chiến binh cửa play đó ở 1 vùng nào đó.Dịch ra giùm cái phần trigger ấy luôn giùm mình nhá

Chiến Binh,Phù Thủy,Lính Ngự Lâm,Trinh Sát là những dòng chọn

---------- Post added at 22:26 ---------- Previous post was at 21:58 ----------

cho hỏi thêm cái này nữa : cho mình cái maps demon về trigger trên và 1 trigger về phần 1 heros lên 1 lv thì được skills, VD : hero chiến binh lên lv 2 có chiêu vật ngã
 
Chỉnh sửa cuối:
Ai biết khi đánh vào một cái nhà thì số dmg của nó lên 1s là 1200 thì mình sẽ được 1200 Gold (Giống troll & Elves ý )
?????

Đây là 2 Trigger mà bạn cần để thực hiện việc trên..
PHP:
UnitTakeDamageEvent
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A structure) Equal to True)) and do (Actions)
            Loop - Actions
                Unit Group - Add (Picked unit) to TakeDamGroup
                Trigger - Add to Action <gen> the event (Unit - (Picked unit) Takes damage)

tạo biến Real tên DamageSource

PHP:
Action
    Events
    Conditions
    Actions
        Set DamageSource = (Damage taken)
        Game - Display to (All players) the text: (String(DamageSource))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                DamageSource Greater than or equal to 1200.00
            Then - Actions
                Player - Add (Integer(DamageSource)) to (Owner of (Damage source)) Current gold
            Else - Actions

Nếu lượng Damage mà cái nhà nhận được nhỏ hơn 1200 (đã trừ Armor) thì nó sẽ ko cho thêm tiền.. nếu đánh mạnh hơn thì có tiền = cái lượng damage lớn hơn 1200...
Trên kia chỉ là ví dụ.. bạn thay đổi sao tùy bạn.
 
nền ? đất có gì khác nhau ??
hay mún import thêm vào :-/
Help :((


không, ý mình là cái loại đất khi dùng increase one nâng nó lên á, thường thì world editor chỉ cho chọn 1 cái, 1 cái có 2 loại trong đó, nếu bạn biết map element TD thì nó giống như vậy, sử dụng cùng lúc 8 loại đất, ai chỉ mình đi
 
Cho mình hỏi làm sao để khi học skill Spiked Carapace của Crypt Lord nó ko còn mọc ra mấy cái gai nữa , mình đã thử để trống phần buff và thử thay bằng buff khác nhưng ko được.
hỏi lại , mình đã thử cách của bạn gì gì ở trên cũng ko được :(
hỏi thêm Sound set của con Grand Magus trong DotA là của unit nào vậy , hơn nữa mình thấy lạ là ko chọn được Sound của Medivh.
 
không, ý mình là cái loại đất khi dùng increase one nâng nó lên á, thường thì world editor chỉ cho chọn 1 cái, 1 cái có 2 loại trong đó, nếu bạn biết map element TD thì nó giống như vậy, sử dụng cùng lúc 8 loại đất, ai chỉ mình đi

Có thể họ dùng thủ thuật thôi... làm theo Link mà mình đã đưa đi...
 
Cần giúp đỡ có ai giúp kiểm tra dùm mình đoạn code này với.. không hiểu sao nó không hoạt động chút nào.. Ai rành Jass giúp mình nha.

Đầu tiên lệnh câu lệnh call GroupEnumUnitsInRangeOfLoc(g,p,512,null) làm ngưng lại toàn bộ các dòng code bên dưới
vì p của bạn chưa set location như trigger bên dưới nên nó là null=> dừng trigger lại luôn

Sau đó bạn có chắc là có computer user trong map ko?
Nếu mình ko nhầm thì nếu ko dùng trigger thiết lập player là computer hay lúc chọn map ko chỉnh user là computer hay ko có sẵn player nào được chỉnh sẵn là computer thì code trên ko có tác dụng

Cuối cùng là sửa đoạn code
PHP:
set temp = FirstOfGroup(g)
set hpHero = GetUnitLifePercent(x)
loop
    exitwhen temp == null
        set hpTarget= GetUnitLifePercent(temp)
            if hpTarget < 50 then
                call IssueTargetOrderBJ(x,"attack",temp)
                
                call GroupRemoveUnit(g,temp)
                set temp = FirstOfGroup(g)
            endif

        call GroupRemoveUnit(g,temp)
        set temp = FirstOfGroup(g)
endloop
=> thành
PHP:
    loop
        set temp = FirstOfGroup(g)
        exitwhen temp == null
            set hpTarget= GetUnitLifePercent(temp)
                if hpTarget < 50 then
                    call IssueTargetOrderBJ(x,"attack",temp)
                    exitwhen true
                endif
        call GroupRemoveUnit(g,temp)
    endloop
    call GroupClear(g)
set hpHero = GetUnitLifePercent(x)
không, ý mình là cái loại đất khi dùng increase one nâng nó lên á, thường thì world editor chỉ cho chọn 1 cái, 1 cái có 2 loại trong đó, nếu bạn biết map element TD thì nó giống như vậy, sử dụng cùng lúc 8 loại đất, ai chỉ mình đi

Cứ nâng lên thành núi trước rồi tô lại terrain ko được à :-?
 
Chỉnh sửa cuối:
Đây là đoạn code sau khi mình sửa lại.. tuy nhiên nó vẫn không Hoạt động.
Ý tưởng của mình là làm cho các Hero (mấy con này đã được lưu biến HERO[1->12]) đang chơi và được điều khiển bởi Computer có khả năng tấng công vào mục tiêu lúc mà nó đánh nhau.. đồng thời tự đồng đi qua Start Location khi nó mạnh cũng như tự rút về khi hết máu... bên Trigger thì mình làm được nhưng bên vJASS thì khi làm ra đoạn code đó thì nó lại không hoạt động.. không biết có chỗ nào sai nữa không ..


PHP:
scope AttackAuto initializer Auto


private function Actions takes nothing returns nothing
local integer A =1

local real hpTarget
local real hpHero

local unit x 
local unit temp

local location p 
local location p2

local player h
local player r

local force f

local group g = CreateGroup()


loop 
   exitwhen A>12
                            
                            // Vong lap dau tien dung de kiem tra xem xung quanh Hero co Unit nao co mau duoi 50% thi se xong vao danh con do
    set x = udg_HERO[A]
    set p2 = GetUnitLoc(x)
    
    if (GetPlayerController(GetOwningPlayer(x)) == MAP_CONTROL_COMPUTER ) then
// Dieu kien kiem tra xem Player do co phai do Computer dieu khien hay khong.. neu dung thi moi cho phep RUN o duoi.

                            call GroupEnumUnitsInRangeOfLoc(g,p2,512,null)
                         
                           
                                    loop
                                        set temp = FirstOfGroup(g)
                                        exitwhen temp == null
                                            set hpTarget= GetUnitLifePercent(temp)
                                                if hpTarget < 50 then
                                                    call IssueTargetOrderBJ(x,"attack",temp)
                                    
                                                   exitwhen true 
                                                endif
                                
                                            call GroupRemoveUnit(g,temp)
                                           
                                    endloop
                                    call GroupClear(g) 
                            set hpHero = GetUnitLifePercent(x)
// Ket thuc vong lap cua Group g
// bat dau kiem tra Hp Hero.. neu duoi 20 % thi lenh cho no chay ve
                                  
                                    
                                    
                                if hpHero < 20 then
                                    set p =  GetPlayerStartLocationLoc(GetOwningPlayer(x))
                                   call IssuePointOrderLoc(x,"move",p)
                                   call RemoveLocation(p)
                                   set p = null
                                
                                   else
                                        if hpHero <7 then
                                            set p =  GetPlayerStartLocationLoc(GetOwningPlayer(x))
                                            call IssuePointOrderLoc(x,"patrol",p)
                                            call RemoveLocation(p)
                                            set p = null
                                                else
                                                    set h =GetOwningPlayer(x)
                                                    set f = GetPlayersEnemies(h)
                                                    set r = ForcePickRandomPlayer(f)
                                                        if  (GetPlayerSlotState(r) == PLAYER_SLOT_STATE_PLAYING ) then
                                                        
                                                            set p =  GetPlayerStartLocationLoc(r)
                                                            call IssuePointOrderLoc(x,"attack",p)
                                                            call RemoveLocation(p)
                                                            set p = null
                                                        endif
                                            endif
                        
                                endif
   endif
                        
        set A = A+1
  
        set p2 = null
        set x = null
        set temp = null
        set r = null
        set h = null
        set g = null
        set f = null
        call DestroyGroup(g)
        call DestroyForce(f)
        call RemoveLocation(p)
        call RemoveLocation(p2)

endloop
set p2 = null
  set x = null
  set temp = null
  set r = null
  set h = null
  set g = null
  set f = null
call DestroyGroup(g)
call DestroyForce(f)
call RemoveLocation(p)
call RemoveLocation(p2)
endfunction

//===========================================================================
private function Auto takes nothing returns nothing
local trigger t = CreateTrigger(  )

    call TriggerRegisterTimerEventPeriodic( t, 2.00 )
    call TriggerAddAction( t, function Actions )
    
set t = null
endfunction

endscope


không biết với điều kiện bên dưới này nó có hoạt động đúng hay không .. mình convert từ GUI qua thì nó đặt điều kiện này qua 1 function khác, còn mình đem luôn điều kiện đó vào If.. không biết If có thực hiện khi điều kiện đó đúng hay không nữa.

Tương tự mấy cái điều kiện bên dưới cũng vậy
Mã:
   if (GetPlayerController(GetOwningPlayer(x)) == MAP_CONTROL_COMPUTER ) then


Mã:
   if  (GetPlayerSlotState(r) == PLAYER_SLOT_STATE_PLAYING ) then

Mình sợ lại điều kiện ghi như vậy nó không biết nhận diện nên mấy phần ở dưới nó không hoạt động.
Mình sửa như bạn rồi nhưng test lại mấy cái computer không động đậy gì hết.. Bật Trigger GUI thì nó lại chạy được. :(

---
Cho mình hỏi thêm khi dùng call DisableTrigger(TriggerNAME) thì khi muốn bật Trigger đó lên mình có dùng lệnh Turn On Trigger trong GUI để bật được không ..
Với cách đặt tên Trigger Scope giống mình đặt như trên kia.
 
Chỉnh sửa cuối:
Mọi ng` cho hỏi cái model doodad có sẵn của war 3 mà có dạng "đá rớt từ trên cao xuống. có 1 đám bụi mù mịt bay ra", không biết nó tên gì ? kiếm cả buổi trong doodadl model ko ra
P.S: Cái model mà khi con Shadowsong bị Illidan dụ vào trong cái hầm gì có con mắt xanh, xong cái phải chạy ra ngược lại ấy, ai chơi campain chắc biết
 
? : Làm sao mà khi vào game có bản tùy chọn tên là Chọn Hero xuất hiện : Chiến Binh,Phù Thủy,Lính Ngự Lâm,Trinh Sát,Ví dụ chọn Chiến Binh thì sẽ tạo ra 1 heros tên chiến binh cửa play đó ở 1 vùng nào đó.Dịch ra giùm cái phần trigger ấy luôn giùm mình nhá

Chiến Binh,Phù Thủy,Lính Ngự Lâm,Trinh Sát là những dòng chọn

---------- Post added at 22:26 ---------- Previous post was at 21:58 ----------

cho hỏi thêm cái này nữa : cho mình cái maps demon về trigger trên và 1 trigger về phần 1 heros lên 1 lv thì được skills, VD : hero chiến binh lên lv 2 có chiêu vật ngã

Khó quá hay sao mà không ai giúp thế?

Sẵn thêm cái này luôm : Làm sao tính thời gian 1 unit vào 1 vùng khoảng 30 giây sau thì unit đó được 1 Item
 
Mọi ng` cho hỏi cái model doodad có sẵn của war 3 mà có dạng "đá rớt từ trên cao xuống. có 1 đám bụi mù mịt bay ra", không biết nó tên gì ? kiếm cả buổi trong doodadl model ko ra
P.S: Cái model mà khi con Shadowsong bị Illidan dụ vào trong cái hầm gì có con mắt xanh, xong cái phải chạy ra ngược lại ấy, ai chơi campain chắc biết
Doodads\Cinematic\EyeOfSargeras\EyeOfSargeras.mdl
Cái này không biết phải con mắt xanh của bạn hay không ... Xem thử nhé

Doodads\Cinematic\CavernDust\CavernDust.mdl
Cái này là Dust từ trên rớt xuống nè...

---------- Post added at 12:05 ---------- Previous post was at 11:57 ----------

Khó quá hay sao mà không ai giúp thế?

Sẵn thêm cái này luôm : Làm sao tính thời gian 1 unit vào 1 vùng khoảng 30 giây sau thì unit đó được 1 Item

Để làm cái này buộc lòng bạn phải nghiên cứu Dialog ... bạn có thể Tham khảo ở đây trước ... sau đó thì tiếp tục làm những yêu cầu trên theo ý mình.
Tham khảo Link dưới đây
http://world-editor-tutorials.thehelper.net/dialogs.php

Đây là khái niệm Dialog căn bản để bạn biết cách bắt lệnh của nó.. Xem rồi Test và Hiểu...

cho hỏi thêm cái này nữa : cho mình cái maps demon về trigger trên và 1 trigger về phần 1 heros lên 1 lv thì được skills, VD : hero chiến binh lên lv 2 có chiêu vật ngã

Nếu bạn đang cần học căn bản Trigger có thể tham khảo ở đây. [http://forum.gamevn.com/showthread.php?103123-Mot-so-bai-viet-dang-chu-y-cua-box-/page3]

Bạn muốn bắt lệnh khi 1 Unit Lên LV.. ta dùng lệnh bên dưới đây
Event Unit -> Unit - Generic Unit Event

Chọn A unit Gains a level
Mã:
    Events
        Unit - A unit Gains a level
    Conditions
    Actions
        Unit - Add [COLOR="#FF0000"]Ability [/COLOR]to (Leveling Hero)
 
hỏi lại , mình đã thử cách của bạn gì gì ở trên cũng ko được :(
hỏi thêm Sound set của con Grand Magus trong DotA là của unit nào vậy , hơn nữa mình thấy lạ là ko chọn được Sound của Medivh.

Sao lại không được.. mình làm được đấy thôi.
hay là bạn thử đổi Buff mấy cái Gai thành 1 cái Buff khác mà khó nhận biết ý.. sẽ mất cái gai đi ngay thôi
Xem hình Attach nhé

View attachment 143507
 
hỏi thêm Sound set của con Grand Magus trong DotA là của unit nào vậy , hơn nữa mình thấy lạ là ko chọn được Sound của Medivh.

Là Druid of the Talon bạn ạ '.'
 
Status
Không mở trả lời sau này.
Back
Top