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

Cho em hỏi cái trigger này của em bị làm sao mà vào game lúc nó hoạt động cứ văng ra ngoài vậy:

Mã:
Overload Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Level of Overload  for (Casting unit)) Greater than 0
    Actions
        Set Storm_Over_Caster = (Casting unit)
        Unit - Remove Overload Damage  from Storm_Over_Caster
        Unit - Add Overload Damage  to Storm_Over_Caster

Mã:
Overload Attack
    Events
        EGUI Unit - Any unit takes damage
    Conditions
        Or - Any (Conditions) are true
            Conditions
                ((Triggering unit) has buff Overload (Non-stacking)) Equal to True
                ((Triggering unit) has buff Overload (Stacking)) Equal to True
    Actions
        Set Storm_Over_Caster = (Damage source)
        Unit - Remove Overload Damage  from Storm_Over_Caster
        Set Storm_Over_Point = (Position of (Triggering unit))
        Set Storm_Over_Group = (Units within 250.00 of Storm_Over_Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Storm_Over_Caster)) Equal to True))))
        Special Effect - Create a special effect at Storm_Over_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Unit Group - Pick every unit in Storm_Over_Group and do (Actions)
            Loop - Actions
                Unit - Cause Storm_Over_Caster to damage (Picked unit), dealing (15.00 + (15.00 x (Real((Level of Overload  for Storm_Over_Caster))))) damage of attack type Spells and damage type Normal
                Unit - Create 1 Dummy for (Owner of Storm_Over_Caster) at Storm_Over_Point facing Default building facing degrees
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Unit - Add Overload Dummy  to (Last created unit)
                Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
        Custom script:   call RemoveLocation(udg_Storm_Over_Point)
        Custom script:   call DestroyGroup(udg_Storm_Over_Group)

Trong đó skill Overload Damage là Slow Poison. Các bác giúp em nhanh nhé
 
cho hỏi cách gộp 2 function trong 1 trigger Jass, như mỗi 1s tăng 2gold và 180s tăng 1 gỗ cho mọi player thì làm s ạ ???
 
Cho em hỏi cái trigger này của em bị làm sao mà vào game lúc nó hoạt động cứ văng ra ngoài vậy:

Mã:
Overload Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Level of Overload  for (Casting unit)) Greater than 0
    Actions
        Set Storm_Over_Caster = (Casting unit)
        Unit - Remove Overload Damage  from Storm_Over_Caster
        Unit - Add Overload Damage  to Storm_Over_Caster

Mã:
Overload Attack
    Events
        EGUI Unit - Any unit takes damage
    Conditions
        Or - Any (Conditions) are true
            Conditions
                ((Triggering unit) has buff Overload (Non-stacking)) Equal to True
                ((Triggering unit) has buff Overload (Stacking)) Equal to True
    Actions
        Set Storm_Over_Caster = (Damage source)
        Unit - Remove Overload Damage  from Storm_Over_Caster
        Set Storm_Over_Point = (Position of (Triggering unit))
        Set Storm_Over_Group = (Units within 250.00 of Storm_Over_Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Storm_Over_Caster)) Equal to True))))
        Special Effect - Create a special effect at Storm_Over_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Unit Group - Pick every unit in Storm_Over_Group and do (Actions)
            Loop - Actions
                Unit - Cause Storm_Over_Caster to damage (Picked unit), dealing (15.00 + (15.00 x (Real((Level of Overload  for Storm_Over_Caster))))) damage of attack type Spells and damage type Normal
                Unit - Create 1 Dummy for (Owner of Storm_Over_Caster) at Storm_Over_Point facing Default building facing degrees
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Unit - Add Overload Dummy  to (Last created unit)
                Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
        Custom script:   call RemoveLocation(udg_Storm_Over_Point)
        Custom script:   call DestroyGroup(udg_Storm_Over_Group)

Trong đó skill Overload Damage là Slow Poison. Các bác giúp em nhanh nhé
1. Trigger 1 : Cast ability là gì ?
2. Đầu trigger phải turn off trigger, cuối trigger phải turn on trigger. Nếu không thì khi unit đó tiếp tục bị takes dame từ Damage Sourge ( trong trigger ) mà thời gian thực hiện toàn bộ trigger này là rất nhỏ --> nhỏ hơn thời gian tồn tại của buff trên --> Trigger chạy liên tục --> Error
 
cho hỏi cách gộp 2 function trong 1 trigger Jass, như mỗi 1s tăng 2gold và 180s tăng 1 gỗ cho mọi player thì làm s ạ ???

dùng integer,mỗi giây tăng 2 gold và + vào biến đó 1 đơn vị,khi integer đủ 180s thì cho tăng 1 gỗ rồi lại set về 0
 
Ai cho mình xin cái spell "Critical Attack" mà đánh trụ cũng dc x dam, dam màu đỏ đỏ ý :D.

Cái spell Demolish đánh trụ dc x dam, nhưng nó k hiện ra @@.

Ai làm dùm mình phát.
 
Ai cho mình xin cái spell "Critical Attack" mà đánh trụ cũng dc x dam, dam màu đỏ đỏ ý :D.

Cái spell Demolish đánh trụ dc x dam, nhưng nó k hiện ra @@.

Ai làm dùm mình phát.

Vào ability Critlcal Strike ở mục Target Allowed chọn thêm Structure(hình như) là xong
 
Ko hiểu ý bạn nói gì ? Ý bạn là thế này ?

Mã:
Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
    Loop - Actions

vâng ..... nếu làm như v. khi convert wa Jass thì nó sẽ xài lệnh ForForce( *force* , function *action* )
bây h e mún hỏi là có cách nào để pick force mà k fải sang function khác để thực hiện action k :D
như cái kiểu bác từng chỉ e pick group ý :
Mã:
    call GroupEnumUnitsInRect(ug,GetPlayableMapRect(),function CheckHulk)
        loop
            set u = FirstOfGroup(ug)
            exitwhen u == null
            call GroupRemoveUnit(ug,u)
            set u = null
        endloop

có cách nào k ạ :D
 
Mã:
      loop
         if IsPlayerInForce(whichPlayer,whichForce) then
         
         endif
         set i=i+1
         exitwhen i==bj_MAX_PLAYER_SLOTS
      endloop
 
^
tính theo đường thẳng hay vòng tròn trước mặt?
hay tính theo 1 "gốc tam giác" trước mặt?

- - - Updated - - -

à tiện thể cho hỏi trong Jass, phần show text có real x, real y
cách sử dụng của nó là thế nào :-?
 
Chỉnh sửa cuối:
^
tính theo đường thẳng hay vòng tròn trước mặt?
hay tính theo 1 "gốc tam giác" trước mặt?

- - - Updated - - -

à tiện thể cho hỏi trong Jass, phần show text có real x, real y
cách sử dụng của nó là thế nào :-?

X và Y = location,nói chính xác x và y là tọa độ của location đó,dùng real X,Y này thì ko leak và ko cần remove leak như location (ko thể set null hay remove real được thì đúng hơn :D)
 
^ text là text trên màn hình, đâu phải floating text đâu mà x,y của bản đồ với location ._.
cụ thể: native DisplayTextToPlayer takes player toPlayer, real x, real y, string message returns nothing
 
Ai chỉ mình vài vấn đề sau dc ko :
-1 spell passive khi đánh nó cứ lướt lướt xdamge
-Làm sao để bik spell cua mình co leak ko và cách xóa leak
-1 combat của spell vd Skilll 1 gây 300 damge,khi biến skill 2 nó tăng thêm damge cho skill 1
Ai giúp mình nha có thêm demo mình cảm ơn cả đời lun ~~
1. Lướt xdame là gì ? critical strike chăng?
2. Dg-g đã trả lời
3. Dùng upgrade

p/s: Cậu hỏi rõ ràng tí đi. Dùng toàn "từ mới" nghe không hiểu.
 
Ai cho mình xin cái spell "Critical Attack" mà đánh trụ cũng dc x dam, dam màu đỏ đỏ ý :D.

Cái spell Demolish đánh trụ dc x dam, nhưng nó k hiện ra @@.

Ai làm dùm mình phát.

Update cái, ai bik chỉ mình cái :). Mình có tạo thử cái float text thử r, nhưng trông nó điêu điêu kiểu gì ấy, k đc tự nhiên như spell gốc :)
 
Back
Top