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

Status
Không mở trả lời sau này.
Mình muốn làm một map Arena ,nhưng khổ nỗi không biết cách tạo Bảng Tên Kill Death ,và mình cũng không biết tạo trigger thế nào để khi có một team Kill được team Khác 100 mạng thì win ,đồng thời team nào Death 100 mạng thì Lose ^^ Bạn nào mà biết giúp mình nha Thank trước !!!!
 
Mã:
    Events
        Unit - A unit Dies
    Conditions
    Actions
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) belongs to an ally of Player 1 (Red)) Equal to (==) True
            Then - Actions
                Set Team[1] = (Team[1] + 1)
            Else - Actions
                Set Team[2] = (Team[2] + 1)
Mã:
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Team[1] Equal to (==) 100
            Then - Actions
                Game - Victory Player 1 (Red) (Show dialogs, Show scores)
                Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
            Else - Actions
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Team[2] Equal to (==) 100
            Then - Actions
                Game - Victory Player 3 (Teal) (Show dialogs, Show scores)
                Game - Victory Player 4 (Purple) (Show dialogs, Show scores)
            Else - Actions
Trong trigger team 1 là player 1 và 2, team 2 là player 3 và 4. À quên, trigger đầu nhớ thêm condition check hero nữa nhé
Còn đây là LeaderboardMutiboard
 
Cho hỏi thay đổi mấy cái Icon trong inventory như thế nào?
Cái system mua ability từ shop của GameWar, giờ muốn giới hạn chỉ mua đc 4 skill thôi, mua đủ 4 skill rồi thì ko mua đc nữa thì làm ntn?
 
YAN[asian];16546349 nói:
Cho hỏi thay đổi mấy cái Icon trong inventory như thế nào?
Cái system mua ability từ shop của GameWar, giờ muốn giới hạn chỉ mua đc 4 skill thôi, mua đủ 4 skill rồi thì ko mua đc nữa thì làm ntn?

Vào game interface -> image -> kiếm cái inventory rồi thay = image khác
 
Mình cũng nghĩ vậy và vào xong kiếm thì chẳng thấy cái nào là Icon - Inventory hay đại loại thế cả :).
 
Mã:
scope Spell initializer JassSpell
function Spell_Conditions takes nothing returns boolean
    if GetSpellAbilityId() == 'A000' then
       return true
    endif
       return false
endfunction

struct spell
   unit caster
   unit target
   string ma
   integer i
endstruct

function Action takes nothing returns nothing
   call GetTimerData(t)
   if s.i > 3 then
   call spell.destroy()
   call ReleaseTimer(t)
      else
      set s.i = s.i + 1
      call FireProjectile( s.caster, s.target, 0, 400, 0.15, true, s.ma)
      call UnitDamageTargetEX( s.caster, s.target, 25, true, true)
   endif
endfunction

function Spell_Actions takes nothing returns nothing
   local spell
   set s = spell.create()
   set s.caster = GetSpellAbilityUnit()
   set s.target = GetSpellTargetUnit()
   set s.ma = "Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl"
   local timer t = GetExpiredTimer()
   set t = NewTimer()
   call SetTimerData (t, 1)
   set s.i = 0
endfunction

//===========================================================================
function JassSpell takes nothing returns nothing
    local trigger g = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( g, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( g, Condition( function Spell_Conditions ) )
    call TriggerAddAction( g, function Spell_Actions )
endfunction
endscope
Ai rành xem giúp mình tìm chổ sai, vì khi save nó báo "s (biến struct) is not type allow . syntax". Cụ thể mình muốn làm spell mỗi 1s bắn đạn vào target, bắn 3 lần.
 
local spell s
set s = spell.create()
.......
hoặc local spell s = spell.create() luôn
 
có ai bik làm skill theo dạng luyện skill ko
thay vì mỗi cấp ta tăng vào skill
nhưng ở đây là khi đánh quái hoặc giết hero sẽ tăng skill ai bik chỉ dùm nha :D
 
Mã:
Event - Unit dies
Condition - Dying unit not equal to allies of killing unit
Action - Increase level of [B]ability[/B] for killing unit
Đại loại là vậy, bạn tự làm thêm nhé ( thêm condition hay action gì đó cho nó có tính sáng tạo hơn :D)
 
tui bị lỗi khi hồi sinh hero cái time nó không biến mất nè như cái hình này
9.png
 
Thế còn cái này ?

Cái system mua ability từ shop của GameWar, giờ muốn giới hạn chỉ mua đc 4 skill thôi, mua đủ 4 skill rồi thì ko mua đc nữa thì làm ntn?
 
ai chỉ dùm làm cái bảng mới vào cho play đỏ chọn -ud trong map kiếm thế
như chọn 1 mở 1 trigger chọn 2 lại mở trigger khác
 
Cho em hỏi để thay đổi Skin của hero(ingame) có dùng Trigger đc ko ???
 
Em làm được cái hiện cây kiếm nhưng nhỏ quá, có cách nào làm nó lớn hơn không?
 
Cho em hỏi để thay đổi Skin của hero(ingame) có dùng Trigger đc ko ???

Theo mình biết thì không thể :|
__________________________
112 page rồi anh Tom ơi, lập Tập 7 đêêêêêêêê \m/
 
Code:

scope Spell initializer JassSpell
function Spell_Conditions takes nothing returns boolean
if GetSpellAbilityId() == 'A000' then
return true
endif
return false
endfunction

struct spell
unit caster
unit target
string ma
integer i
endstruct

function Action takes nothing returns nothing
call GetTimerData(t)
if s.i > 3 then
call spell.destroy()
call ReleaseTimer(t)
else
set s.i = s.i + 1
call FireProjectile( s.caster, s.target, 0, 400, 0.15, true, s.ma)
call UnitDamageTargetEX( s.caster, s.target, 25, true, true)
endif
endfunction

function Spell_Actions takes nothing returns nothing
local spell
set s = spell.create()
set s.caster = GetSpellAbilityUnit()
set s.target = GetSpellTargetUnit()
set s.ma = "Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl"
local timer t = GetExpiredTimer()
set t = NewTimer()
call SetTimerData (t, 1)
set s.i = 0
endfunction

//===========================================================================
function JassSpell takes nothing returns nothing
local trigger g = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( g, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( g, Condition( function Spell_Conditions ) )
call TriggerAddAction( g, function Spell_Actions )
endfunction
endscope

Ai rành xem giúp mình tìm chổ sai, vì khi save nó báo "s (biến struct) is not type allow . syntax". Cụ thể mình muốn làm spell mỗi 1s bắn đạn vào target, bắn 3 lần.
ai trả lời giúp câu này, 2 ngày rồi :(
 
^
Bác không thấy à, mấy ngày nay có mấy mem đâu, toàn mem hỏi, không ai trả lời, dạo này topic vắng như chùa bà đanh
 
YAN[asian];16555213 nói:
Thế còn cái này ?

Khi học 1 loại abi,kiểm tra xem đó là ability đã học chưa,nếu chưa thì + biến đếm thêm 1 ( có thể là biến int array kiểu 1 là player 1,hoặc là biến int gắn với hashtable),nếu biến đếm < = 4 thì add và ngược lại .

---------- Post added at 21:21 ---------- Previous post was at 21:19 ----------

ai trả lời giúp câu này, 2 ngày rồi :(

local spell - > local spell s ( thử xem )
 
Status
Không mở trả lời sau này.
Back
Top