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

Status
Không mở trả lời sau này.
Đây :
Mã:
Untitled Trigger 001
    Events
        Unit - A unit Spawns a summoned unit
    Conditions
        (Unit-type of (Summoned unit)) Equal to Water Elemental (Level 1)
    Actions
        Set i = (i + 1)
        Set u[i] = (Summoned unit)
        For each (Integer A) from 1 to i, do (Actions)
            Loop - Actions
                Unit - Kill u[((Integer A) - 3)]

i = integer
u = unit
 
unit đầu tiên -> 1 unit thôi -> dùng loop làm gì thế?
 
Thì cứ gọi quá 3 con là kill, ko thì lúc gọi đến lần thứ 5 thì thế nào.
 
YAN[asian];18500877 nói:
Quên mất, ý mình là bằng GUI, mình mù Jass >_<!

Bằng GUI thì cũng phải dùng bằng EGUI mới làm dễ,còn nếu không thì tạo từng cái Item Tăng damg ý!EGUI thì làm gần như ví dụ trên vậy!
 
Sao mình add font rồi mà vẫn không gõ được tiếng việt nhỉ
font theo hình thì đã add được
Mình dùng font Palatino Linotype của windown
Dùng unikey 4.0 bộ gõ TCVN3 (ABC) kiểu gõ Telex
 

Attachments

  • font.JPG
    font.JPG
    130.4 KB · Đọc: 11
Add font còn edit font trong Advance nữa!Bạn biết mà!
Cái thứ hai là font Palatino Linotype hình như đâu phải TCVN3 (ABC),cái đó là Unicode mà?
 
Advance mình chỉnh rồi thì mới hiện ra ở trong game mà @@
Còn font Palatino là Unicode nhưng mình thử cả 2 đều k được ( cả 2 kiểu gõ Unicode và TCVN3 đều k được cả )
Tức h phải tìm font TCVN3 ???
Mình tìm nhưng chả biết tìm ở đâu cái nào có tiếng Việt cả, lên mạng google toàn thiếu chữ cái tiếng việt thôi :(
Bạn có cho mình 1 font với
 
Bằng GUI thì cũng phải dùng bằng EGUI mới làm dễ,còn nếu không thì tạo từng cái Item Tăng damg ý!EGUI thì làm gần như ví dụ trên vậy!

Thôi vậy ai còn demo map ulti ursa trong Dota thì share mình chứ mấy lệnh trong đấy mình ko nhớ rõ lắm.
 
ví dụ như thế
Mã:
Respawn
    Events
        Time - Every 15.00 seconds of game time
    Conditions
    Actions
        Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
đây là trigger Respawn còn về turn off thì cái này.
Mã:
TurnOff Respawn
    Events
        Unit - Barracks 0000 <gen> Dies
    Conditions
    Actions
        Trigger - Turn off Respawn <gen>

@DylandKyo
Mã:
(Line: 10) (Word: 3) Location Leak
Set Points[16] = ((Position of Caster[16]) offset by 200.00 towards ((Real((Integer A))) x 36.00) degrees)
Set Points[16] = ^Leak

(Line: 10) (Word: 6) Location Leak
Set Points[16] = ((Position of Caster[16]) offset by 200.00 towards ((Real((Integer A))) x 36.00) degrees)
Set Points[16] = ((Position of Caster[16]) ^Leak

Scan Complete
Location leaks: 2
Special Effect leaks: 0
Lightning leaks: 0
Unit Group leaks: 0
Player Group leaks: 0

Variables
UnitGroups[16] : (Line: 12) Unit Group - Removed: Yes

Summary
Total Leaks: 2
Unremoved Variables: 0
Scan duration: 0 seconds
Total Lines Scanned: 17
Total Words Scanned: 159
tổng số check ra là như thế :|


UMSWE lỗi chẳng bằng EGUi đâu anh rex à =))




mình ví dụ như thế nhé :D
Mã:
Move
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Storm Bolt
    Actions
        Set Tmp_Cast = (Triggering unit)
        Set Tmp_Vitm = (Target unit of ability being cast)
        Unit - Order Tmp_Cast to Attack Tmp_Vitm
        Wait until ((Distance between (Position of Tmp_Cast) and (Position of Tmp_Vitm)) Less than or equal to 200.00), checking every 0.10 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
            Then - Actions
                Unit - Cause Tmp_Cast to damage Tmp_Vitm, dealing 500.00 damage of attack type Spells and damage type Normal
            Else - Actions

thanks bạn nhiều lắm tiện thể bạn cho mình luôn cái trigger làm cho tree regrow và tiền của tất cả player tăng theo time giống như trong dota nhé
 
Tree ReGrow :
Mã:
function Trig_Tree_Recreation_Func002002 takes nothing returns nothing
 call DestructableRestoreLife( GetEnumDestructable(), GetDestructableMaxLife(GetEnumDestructable()), false )
endfunction
function Trig_Tree_Recreation_Actions takes nothing returns nothing
 call TriggerSleepAction( 30.00 )
 call EnumDestructablesInRectAll( GetEntireMapRect(), function Trig_Tree_Recreation_Func002002 )
endfunction
function InitTrig_Tree takes nothing returns nothing
 set gg_trg_Tree = CreateTrigger( )
 call TriggerRegisterTimerEventPeriodic( gg_trg_Tree, 300.00 )
 call TriggerAddAction( gg_trg_Tree, function Trig_Tree_Recreation_Actions )
endfunction

Gold everytime:
Mã:
Event: Every 1 second game time
Condition:
Action: Player Group - Pick Every Player In (Play map able) and action
 Loop - Action:
Give (Picked Player) 1 gold

P/s: trigger tiền mình k nhớ rõ do k có WE nhưng cũng như trên bạn tự tìm lệnh nha (chỉ sai lệnh chút thui ^^)
 
thanks bạn nhiều lắm tiện thể bạn cho mình luôn cái trigger làm cho tree regrow và tiền của tất cả player tăng theo time giống như trong dota nhé

Mã:
EverySec
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set Int_sec = (Int_sec + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 1 (Red) Food used) Equal to 59
            Then - Actions
                Set Int_sec = 0
                Set Int_min = (Int_min + 1)
            Else - Actions
        For each (Integer [B]B[/B]) from 1 to 12, do (Actions)
            Loop - Actions
                Player - Set (Player((Integer [B]B[/B]))) Food used to Int_sec
                Player - Add 1 to (Player((Integer [B]B[/B]))) Current gold
                Player - Set (Player((Integer [B]B[/B]))) Current lumber to Int_min

Player 1 chỉ là mang tính cách check thôi ko thì chọn Int_sec Equal to 59
tạo 2 cái Int_sec và Int_min set là integer
 

Attachments

Chỉnh sửa cuối:
Tree ReGrow :
Mã:
function Trig_Tree_Recreation_Func002002 takes nothing returns nothing
 call DestructableRestoreLife( GetEnumDestructable(), GetDestructableMaxLife(GetEnumDestructable()), false )
endfunction
function Trig_Tree_Recreation_Actions takes nothing returns nothing
 call TriggerSleepAction( 30.00 )
 call EnumDestructablesInRectAll( GetEntireMapRect(), function Trig_Tree_Recreation_Func002002 )
endfunction
function InitTrig_Tree takes nothing returns nothing
 set gg_trg_Tree = CreateTrigger( )
 call TriggerRegisterTimerEventPeriodic( gg_trg_Tree, 300.00 )
 call TriggerAddAction( gg_trg_Tree, function Trig_Tree_Recreation_Actions )
endfunction

Gold everytime:
Mã:
Event: Every 1 second game time
Condition:
Action: Player Group - Pick Every Player In (Play map able) and action
 Loop - Action:
Give (Picked Player) 1 gold

P/s: trigger tiền mình k nhớ rõ do k có WE nhưng cũng như trên bạn tự tìm lệnh nha (chỉ sai lệnh chút thui ^^)

híc sao cái tree regrow nhìn khó hiểu thể hả bạn, cái gold thì mình làm dc rồi
 
Cực giản đơn,bạn chỉ cần làm thể này:
Mã:
Custom script: local unit c=GetTriggerUnit()
Custom script: local unit t=GetSpellTargetUnit()
Wait 0.50 seconds
custom script: call SetUnitPathing(t,false)
Unit - Move c to (Unit Position of (t)) facing (Facing of (t)) degree
Unit - Move t to (Unit Position of (c)) facing (Facing of (c)) degree
custom script: call SetUnitPathing(t,true)
Cần có percent thành công thì thêm biến i=50 rồi kiểm tra theo hàm: if i>GetRandomInt(1,100) then hành động như trên!
 
ai chỉ dùm cách khi ta tấn công Unit sẽ hiện lên số máu vừa mất của Unit đó với
tôi đã thử dùng Mui Của map khác cho vào nhưng khi 1 lúc nhiều Unit attack nhau là Chỉ số hiện máu đó nhấp nháy trong 0,3s
ai chỉ dùm với
 
thế còn tỷ lệ đối phương khi đánh mình bị miss thì làm như thế nào?
P/s: chỗ skill sao bjn dùng thì mjnh chỉ di chuyển tới chỗ nó, còn nó chã đổi chổ cho mình @@
 
Chỉnh sửa cuối:
Ý chết,quên mất,phải có hàm này:
Mã:
local location p = GetUnitLoc(c)
rồi sửa hàm move t thành:Unit - Move t to (p) facing (Facing of (c)) degree
RemoveLeak: call RemoveLocation(p)
Còn tỉ lệ miss thì làm từ chiêu Faeriefire bạn nhé!
 
skill dạng passive ák sky, còn chiu Fae.. mình bik rùi, khi un it tấn công mình có 15% miss ák
 
Evasion ,chiêu thức của Night Eft!Điều đơn giản nhất mà?:|
Còn mình bị miss thì cho Critical Strike!
 
Status
Không mở trả lời sau này.
Back
Top