[Q] Có lỗi với chế độ random (khi xài exitwhen)

  • Thread starter Thread starter btvinh
  • Ngày gửi Ngày gửi

btvinh

Donkey Kong
Tham gia ngày
15/1/11
Bài viết
343
Reaction score
6
Mình k hiểu tại sao khi mình check lệnh exitwhen với 10 unit, unit nào có slot k full thì move... Nhưng k hiểu sao lần nào cũng move có 1 unit 1.... phải chăng random đã lỗi. Ai biết xin chỉ giáo với. Yh của mình nè: [email protected]

---------- Post added at 07:14 ---------- Previous post was at 07:12 ----------

Sao khi chuyển wa bên unit - pick every thì vẫn k khả quan các bạn xem đoạn code dùm
PHP:
Unit Group - Pick every unit in InventoryGroup[(Player number of (Triggering player))] and do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of items carried by (Picked unit)) Equal to 6
            Then - Actions
                Do nothing
                Set TempLoc = (Center of Shop Hidden <gen>)
                Set TempUnit = (Picked unit)
                Unit - Move TempUnit instantly to TempLoc
                Custom script:   call RemoveLocation(udg_TempLoc)
            Else - Actions
                Set TempUnit = (Picked unit)
                Set TempLoc = (Center of Shop <gen>)
                Unit - Move TempUnit instantly to TempLoc
                Custom script:   call RemoveLocation(udg_TempLoc)
                Skip remaining actions
 
Mình k hiểu tại sao khi mình check lệnh exitwhen với 10 unit, unit nào có slot k full thì move... Nhưng k hiểu sao lần nào cũng move có 1 unit 1.... phải chăng random đã lỗi. Ai biết xin chỉ giáo với. Yh của mình nè: [email protected]

---------- Post added at 07:14 ---------- Previous post was at 07:12 ----------

Sao khi chuyển wa bên unit - pick every thì vẫn k khả quan các bạn xem đoạn code dùm
PHP:
Unit Group - Pick every unit in InventoryGroup[(Player number of (Triggering player))] and do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of items carried by (Picked unit)) Equal to 6
            Then - Actions
                Do nothing
                Set TempLoc = (Center of Shop Hidden <gen>)
                Set TempUnit = (Picked unit)
                Unit - Move TempUnit instantly to TempLoc
                Custom script:   call RemoveLocation(udg_TempLoc)
            Else - Actions
                Set TempUnit = (Picked unit)
                Set TempLoc = (Center of Shop <gen>)
                Unit - Move TempUnit instantly to TempLoc
                Custom script:   call RemoveLocation(udg_TempLoc)
                Skip remaining actions

Bạn vui lòng nói rõ tí 10 unit của 1 player hay mỗi unit của một player đã.
Nếu mỗi unit của một player thì có lỗi đó, InventoryGroup(Player number of (Triggering Player)) thì chỉ cho player đó thôi, player khác sẽ không ảnh hưởng gì.
 
Back
Top