Mã: function Game_Camera takes nothing returns nothing call CameraSetupApplyForPlayer( true , gg_cam_Game_Camera , Player(0) ,0) endfunction //Elapse Time function Trig_Elapse_Time_Actions takes nothing returns nothing //Trigger Setting function Game_Setting takes nothing returns nothing local trigger t set t = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( t , 00.01 ) call TriggerAddAction( t, function Game_Camera ) endfunction //Trigger Event function InitTrig_Game_Trigger takes nothing returns nothing set gg_trg_Game_Trigger = CreateTrigger( ) call TriggerRegisterTimerEventSingle( gg_trg_Game_Trigger, 0.0 ) call TriggerAddAction( gg_trg_Game_Trigger, function Game_Setting ) endfunction Cho hỏi, với code trên, giả sử không cần trigger t nữa thì tắt/xóa nó như thế nào?
^ Với code trên do tất cả chỉ chạy 1 lần, vậy thì phải xóa 2 trigger nếu muốn xóa triệt để. PHP: function Game_Camera takes nothing returns nothing call CameraSetupApplyForPlayer( true , gg_cam_Game_Camera , Player(0) ,0) call DestroyTrigger(GetTriggeringTrigger())endfunction //Trigger Settingfunction Game_Setting takes nothing returns nothing local trigger t set t = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( t , 00.01 ) call TriggerAddAction( t, function Game_Camera ) set t=null call DestroyTrigger(GetTriggeringTrigger())endfunction //Trigger Eventfunction InitTrig_Game_Trigger takes nothing returns nothing set gg_trg_Game_Trigger = CreateTrigger( ) call TriggerRegisterTimerEventSingle( gg_trg_Game_Trigger, 0.0 ) call TriggerAddAction( gg_trg_Game_Trigger, function Game_Setting )endfunction
Các bác cho mình hỏi thêm 1 câu là làm cách nào để thay đổi hình dạng 1 model khác vào hình dạng metamorphosis khi mình dùng chưởng cuối này vậy ??? mình thay target các kiểu thì cái model kia cũng chỉ hiện lên 1-2s là lại thành hình cũ , cảm ơn nhiều !!!!!!!!!!
Ai cho mình xin cái demo tạo effect hình Heart với Sẵn tiện ai giúp minh luôn cái skill này: chấm đỏ là caster, chấm xanh là target, khi cast sẽ slide caster từ từ theo đường hồng Mình vẽ ko chuẩn nhưng move theo ziczac...
Làm thế nào để ability Channel dạng Point không chọn được target bản thân?(khi cầm spell ra target click vào Portail)
Ai làm giúp em cái tentacle dạng cây thương đi ạ , giống cái chain impale của anh Judash nhưng nó là tentacle
Ngồi mò jass, có vài cái không hiểu ai giải thích hộ với: - struct? - library? - scope? - static? - method? Ai giảng giùm mấy cái trên
có Ai Biết Cách Làm Bảng Tính Điểm :Trên Bảng Hiển Thị Rõ Tên NGười Chơi Gold +Lumber + Kill +... Nói Chung Là Giống Máp D&F Hay Dota Đó. MÌnh Thanks Trước
Có mình đây Struct,cái này phải đọc bài này của anh Tom đã:http://forums.gamevn.com/showthread.php?515441-Tutorial-Basics-of-Structs library,dịch sang tiếng việt là thư viện,với library thì để gọi một số hàm từ các library khác thì bạn phải requires các library đó scope cũng giống như library,có điều nó không cần phải requires gì cả,theo kinh nghiệm của mình là vậy,và mình chỉ dùng library thôi static,cái này mình ko rõ nhưng một điều mình biết rằng,nếu một method không phải static thì ở các lệnh khác bạn không thể gọi nó ra được,và một biến static trong struct là static thì không cần phải đặt giá trị tối đa cho nó (kiểu kiểu như thế,mình ko biết giải thích cái này thế nào @@) method,nó giống hệt như function,nhưng nó chỉ nằm trong struct,ko thể tạo một method ngoài struct như function được,ví dụ ở một function khác để gọi một method thì phải gọi tên của struct trước rồi đến tên của method (method phải là static),một method bình thường thì có thể gọi trong struct đó như function vậy. Mã: struct ABC static method Start takes nothing returns nothing endmethod endstruct function XYZ takes nothing returns nothing call ABC.Start() endmethod Có thể mình giải thích lủng củng nhưng cơ bản là vậy,và có lẽ bạn nên bái mấy cao thủ trong box làm sư phụ mà học dần đi là vừa,tự mò khổ lắm
^ Tiếc là cái link lần nào vào cũng "Error 404". Tình hình là chỉ mới biết thêm được method Cậu rảnh không, làm giúp tôi 1 sys, sys cũng đơn giản thôi, ví dụ dùng 1 trigger khác gọi Mã: call StunUnit( unitX , durationY ) thì stun UnitX trong durationY giây. Tôi nghĩ cũng không quá khó, có điều tôi không biết làm thế nào để "nhận" unitX, durationY
Em có skill tạo 2 thằng đệ chạy theo mình, nhưng 2 thằng đệ nó cứ như dính liền với nhau đấy. Bác nào biết làm cho 2 thằng chạy 2 bên thì chỉ cho em nhé (hoặc nó tách nhau ra là được). Đây là skill: Mã: The Sentinel Learn Events Unit - A unit Learns a skill Conditions (Learned Hero Skill) Equal to The Sentinel Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Level of The Sentinel for (Triggering unit)) Equal to 1 Then - Actions Set The_Sentinel_Hero = (Triggering unit) Set The_Sentinel_Point = (Position of The_Sentinel_Hero) For each (Integer A) from 1 to 2, do (Actions) Loop - Actions Unit - Create 1 Captain for (Owner of The_Sentinel_Hero) at The_Sentinel_Point facing (Facing of The_Sentinel_Hero) degrees Unit Group - Add (Last created unit) to The_Sentinel_Unit Custom script: call RemoveLocation(udg_The_Sentinel_Point) Else - Actions Unit Group - Pick every unit in The_Sentinel_Unit and do (Actions) Loop - Actions Unit - Set level of Damage Dummy for (Picked unit) to (Level of The Sentinel for The_Sentinel_Hero) Mã: The Sentinel Move Events Time - Every 0.80 seconds of game time Conditions Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (The_Sentinel_Hero is alive) Equal to True Then - Actions Set The_Sentinel_Point = (Position of The_Sentinel_Hero) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Number of units in The_Sentinel_Unit) Equal to 0 Then - Actions For each (Integer A) from 1 to 2, do (Actions) Loop - Actions Unit - Create 1 Captain for (Owner of The_Sentinel_Hero) at The_Sentinel_Point facing (Facing of The_Sentinel_Hero) degrees Unit Group - Add (Last created unit) to The_Sentinel_Unit Else - Actions Unit Group - Pick every unit in The_Sentinel_Unit and do (Actions) Loop - Actions Unit - Order (Picked unit) to Attack-Move To The_Sentinel_Point Custom script: call RemoveLocation(udg_The_Sentinel_Point) Else - Actions Mã: The Sentinel Dead Events Unit - A unit Dies Conditions (Dying unit) Equal to The_Sentinel_Hero Actions Unit Group - Pick every unit in The_Sentinel_Unit and do (Actions) Loop - Actions Unit - Kill (Picked unit) Unit Group - Remove all units from The_Sentinel_Unit
cái đó thì đơn giản như bên dưới thôi,giờ bạn tạo một ability base từ thunderbolt với 20 level,duration từ 1~20 giây (tối đa 20 giây chắc là đủ rồi nhỉ),dùng lệnh StunTarget(unit,duration) Mã: library StunSystem initializer init globals private integer StunDummy ='sTUN' private integer StunAbi ='STUN' endglobals public function StunTarget takes unit target,real duration returns nothing local unit dummy=CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE),GetUnitX(target),GetUnitY(target),0) call UnitAddAbility(dummy,StunAbi) call SetUnitAbilityLevel(dummy,StunAbi,R2I(duration)) call IssueTargetOrder(dummy,"thunderbolt",target) call UnitApplyTimedLife(dummy,'BTLF',0.1) set dummy=null endfunction private function init takes nothing returns nothing local unit dummy=CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE),GetUnitX(target),GetUnitY(target),0) //Preload Ability call UnitAddAbility(dummy,StunAbi) call RemoveUnit(dummy) set dummy=null endfunction endlibrary
không hiểu, là spell dạng Point rồi làm sao target bản thân? và là "Point" mà click vào portrait thì sẽ cast ở chân của unit.
Ca này của tớ khó đẻ quá ah??? sao k ai giúp hết vậy?!!!! .... ae cho hỏi thêm là add thêm tứong mình tạo vào bản đồ siege chống cửa kiểu gì vậy ??? mình cảm ơn !!!!!