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

Status
Không mở trả lời sau này.
Mã:
globals
    unit UNITP=null
endglobals

scope [B]A[/B] initializer IntCreate_unit
function Create_Actions takes nothing returns nothing
    [B]set UNITP = CreateUnit(Player(2), 'hfoo', 0,0, bj_UNIT_FACING )[/B]
endfunction
function IntCreate_unit takes nothing returns nothing
    [B]local trigger Create = CreateTrigger(  )[/B]
    call TriggerRegisterTimerEventPeriodic( Create, 5.00 )
    call TriggerAddAction( Create, function Create_Actions )
endfunction
endscope

//===========================================================================

scope [B]B[/B] initializer IntKill_unit1
function Kill_unit1_Conditions takes nothing returns boolean
    [B]return GetDyingUnit() == UNITP[/B]
endfunction

function Kill_unit1_Actions takes nothing returns nothing
    call DisplayTextToForce( GetPlayersAll(), "nod..." )
endfunction

function IntKill_unit1 takes nothing returns nothing
    [B]local trigger Kill_unit1 = CreateTrigger(  )[/B]
    call TriggerRegisterAnyUnitEventBJ( Kill_unit1, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( Kill_unit1, Condition( function Kill_unit1_Conditions ) )
    call TriggerAddAction( Kill_unit1, function Kill_unit1_Actions )
endfunction
endscope

Không bik có phải kingwar muốn làm như thế, Kan fix lại rùi kingwar có thể so sánh
 
Chỉnh sửa cuối:
sai chỗ nào thế :|
pro jass có khác :((
chã hỉu nỗi, đúng là gà jass :(
 
Chỉnh sửa cuối:
ax donwnload cai chuong trinh ay neu ko co thi cho cai hinh chi lam jass nhe tks

Lên google mà search web. Còn muốn học jass thì thehelper, mà web tiếng anh không đó.
Ai giúp mình làm cái Spell Ultimate của Nevermore trong Dota cái nào. Mình đã từng làm 1 lần rồi nhưng lag quá
Mô tả skill đi bạn
________________________________________

Mấy bác pro jass quá nhỉ, mình chả biết gì, nhất là mấy cái lệnh jass đó, khó nhớ kinh khủng...
 
...vậy giờ nhìn lại code của kingwar

+ unit UNITP là được rồi hông cần phải set null (có cũng chả sao)
+ tên scope có lẽ nên gọn lại, đủ để hiểu
+ phần tạo unit, thay vì kingwar tạo 1 con unit rùi mới lưu vào biến UNITP, thì ta dùng cách này vừa gọn, vừa đẹp mắt và đồng thời lưu nó vào biến UNITP luôn (JASS là vậy mà, càng gọn càng tốt)
Mã:
set UNITP = CreateUnit(Player(2), 'hfoo', 0,0, bj_UNIT_FACING )
+ set Create = CreateTrigger( ) biến Create trong đây type gì, và ở đâu ra, ta chưa khởi tạo mà
1) là local trigger Create sau đó set Create = CreateTrigger()
2) là local trigger Create = CreateTrigger() (gọn)
+ phần điều kiện, kingwar muốn dk là unit chết đó là UNITP thì làm như trên, trường hợp trên chỉ có 1 điều kiện nếu như muốn kết hơp nhiều thì
Mã:
function a takes nothing returns boolean
    local boolean a = ....
    local boolean b = ....
    local booelan c = ....
    
    return a and b and c
endfunction

hi vọng kingwar hiểu được những gì tớ nói :D
 
đã hỉu rõ :D + rep . tk nhìu
 
ai đó làm dùm cái trigger khi
có 1 con footman play 1 giết chết footman đó thì sẽ mở ra 1 trigger khác ( mấy play khác chưa giết thì trigger của mấy play khác chưa mở )
 
Cho mình hỏi cách làm đen 1 vùng trên bản đồ, giống như các map campaign vậy, đi tới đâu mới sáng tới đó, còn bình thường là tối thui không nhìn được gì hết.
 
Scenario \ Map Options bỏ đánh dấu Masked areas are partially visible

chỗ nào bị "masked" (black mask) sẽ tối thui
 
Vậy muốn làm sáng 1 vùng thì sao hả anh Tom?
 
cai đó thì ko có
chĩ có làm nguyen bản đồ tối rùi mỡ vùng sáng thui
 
cai đó thì ko có
chĩ có làm nguyen bản đồ tối rùi mỡ vùng sáng thui

Vậy chắc xài skill far sight của orc

---------- Post added at 13:35 ---------- Previous post was at 13:01 ----------

Làm sao để creep đi vòng vòng được vậy? Giống như mấy con cừu đó, lâu lâu nó lại di chuyển, vậy phải làm sao???
 
Vậy muốn làm sáng 1 vùng thì sao hả anh Tom?
Bạn làm thế này:
Mã:
Untitled Trigger 001
    Events
        Map initialization
    Conditions
    Actions
        Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across Light <gen>
Muốn làm player nào sáng thì gán player đó vào!

---------- Post added at 13:43 ---------- Previous post was at 13:36 ----------

Sau vài ngày tìm kiếm thì cuối cùng đã tìm ra được cái map mà camera luôn quay theo mình. Anh nào là "vọc sĩ" vui lòng tìm giúp trigger đó, post lên đây, chứ em chịu thua rồi.:((
Download tại đây
 
Sau vài ngày tìm kiếm thì cuối cùng đã tìm ra được cái map mà camera luôn quay theo mình. Anh nào là "vọc sĩ" vui lòng tìm giúp trigger đó, post lên đây, chứ em chịu thua rồi.:((
Download tại đây
Làm cho camera đi theo thằng hero hả, vậy thì : Camera - Lock camera orientation for Player to (Unit), offset by (0.00, 0.00)
_________________________________________
Làm sao để creep đi vòng vòng được vậy? Giống như mấy con cừu đó, lâu lâu nó lại di chuyển, vậy phải làm sao???
Ai giúp em :(
 
Làm cho camera đi theo thằng hero hả, vậy thì : Camera - Lock camera orientation for Player to (Unit), offset by (0.00, 0.00)
(
Không phải thế, làm camera sao cho mình quay sang phải thì nó sang phải, mình quay sang trái thì nó sang trái! Hôm trước mình có hỏi mà có bạn trả lời là không biết nên cung cấp thêm để mấy bạn chỉ mình.
 
Vậy chắc xài skill far sight của orc

---------- Post added at 13:35 ---------- Previous post was at 13:01 ----------

Làm sao để creep đi vòng vòng được vậy? Giống như mấy con cừu đó, lâu lâu nó lại di chuyển, vậy phải làm sao???

thì add spell "Wander" [Awan] như nói như thế thì con creep sẽ đi ra ngoài khi vực cũa mình :|
 
thì add spell "Wander" [Awan] như nói như thế thì con creep sẽ đi ra ngoài khi vực cũa mình :|

Creep ra ngoài thì leave unit = creep = kill. Thank Kinh War.

---------- Post added at 15:40 ---------- Previous post was at 15:14 ----------

Cho mình hỏi patch 1.24 có gì mới hơn 1.23 không??
 
Mã:
scope c initializer IntMap
function a takes nothing returns boolean
local  boolean az = ( GetPlayerName(GetTriggerPlayer()) == "kingwar2010" )
local  boolean by = ( GetPlayerName(GetTriggerPlayer()) == "heroking_no1 )
return az or by
endfunction

function b takes nothing returns nothing
    if ( ) then
        call DisplayTextToForce( GetPlayersAll(), "yes" )
    else
        call DisplayTextToForce( GetPlayersAll(), "no" )
    endif
endfunction

function IntMap takes nothing returns nothing
local trigger map = CreateTrigger(  )
call TriggerRegisterPlayerChatEvent( map, Player(0), "test", false )
call TriggerAddAction( map, function by )
call TriggerAddCondition( map, function az )
endfunction
endscope
vài lỗi nhõ ai fix dùm :| tk
 
Chỉnh sửa cuối:
tên biến trùng tên function huh? =))
 
Cho mình hỏi patch 1.24 có gì mới hơn 1.23 không??
thêm vài cái lệnh :| và size map to 8mb
--------------------------------------------------------------------------
WARCRAFT III: THE FROZEN THRONE VERSION HISTORY
--------------------------------------------------------------------------

--------------------------------------------------------------------------
Patch 1.24e
--------------------------------------------------------------------------

FIXES

- Fixed an exploit rendering buildings non-interactable ("tower hack").
- Fixed an exploit allowing a player to bypass a summon ability's
cooldown ("summon/cooldown hack").
- Fixed a client crash related to workers failing to build in an
unintended way ("new crash hack").
- Fixed an exploit allowing the Blood Mages's Phoenix to be resurrected
instantly ("phoenix hack").
- Fixed a bug allowing players to select an invalid matchmaking race
resulting in all the player's units and buildings becoming sheep
("sheep hack").

--------------------------------------------------------------------------
Patch 1.24d
--------------------------------------------------------------------------

FIXES

- Fixed a client crash related to queuing too many invalid build commands
("crash hack").

--------------------------------------------------------------------------
Patch 1.24c
--------------------------------------------------------------------------

FIXES

- Fixed a problem with the "Chapter Six: The Culling" human campaign map
that was preventing it from loading.
- Fixed an issue that allowed JASS functions to return incorrect values
under certain conditions.
- Fixed an issue that caused the TriggerEvaluate native to return
incorrect values under certain conditions.
- Fixed a minor memory leak when using GroupEnum natives.
- Fixed a crash when using the CreateImage native on PPC Mac.
- Updated Mac World Editor to work with recent JASS changes.

--------------------------------------------------------------------------
Patch 1.24b
--------------------------------------------------------------------------

PC WORLD EDITOR CHANGES

- Increased max map file size from 4 MB to 8 MB.
- Added the ability to store hashtable handles in a hashtable.
- Added GetSpellTargetX and GetSpellTargetY natives.
- Added a new base handle type “Agent” of which many types now extend from.
- Added a SaveAgentHandle native which can be used for saving most handle types.
- Added a JASS optimization dealing with global variable change events.

FIXES

- Fixed a few false positives caused by the "return bug" fix.
- Fixed a crash related to hashtable reference counting.
- “Shadowing” global variables with local variables no longer is possible.
- Fixed a type conversion dealing with operators (i.e. adding a handle with an integer).

--------------------------------------------------------------------------
Patch 1.24
--------------------------------------------------------------------------

PC WORLD EDITOR CHANGES

- Added new JASS hash table functions to replace the lost functionality from
fixing unsafe type casting.
- Hash Table - Save Item Handle
- Hash Table - Save Unit Handle
- ...
- Hash Table - Load Item Handle
- Hash Table - Load Unit Handle
- ...
- Hash Table - Get Handle ID

FIXES

- Fixed an exploit related to unsafe type casting that allowed users to
execute arbitrary code in maps.
- Fixed the JASS unsafe type casting exploit ("return bug").
- Fixed several World Editor crashes.
 
JNG lúc mình mới down về nó kiu chỉnh đường dẫn đến WE
Giờ up lên 1.24 có cần phải chỉnh đường dẫn lại không?? hay là nó up cái WE lên 1.24 luôn rồi
 
Status
Không mở trả lời sau này.
Back
Top