Page 6 of 16 FirstFirst ... 2345678910 ... LastLast
Results 76 to 90 of 233
http://idgs.in/13940
  1. #76
    rizzuh's Avatar
    Join Date
    Oct 2006
    Location
    Bandung, Indonesia, Indonesia
    Posts
    671
    Points
    1,308.90
    Thanks: 2 / 14 / 10

    Default

    uits ... maap2x gw baru isi pulsa sekarang eheu ::

    Kl ngisi trigger
    Code:
    // dari inisasi trigger maka ( lihat bagian trigger add action ) maka fungsi ini akan di-execute
    function Trig_Phantom_Pain_Actions takes nothing returns nothing
        local trigger t
    	set t = CreateTrigger()
    	call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
    	call TriggerAddCondition(t,Condition(function secondcond))
    	call TriggerAddAction(t,function secondact)
            set t = null
    endfunction
    
    //==========================================================================
    
    // Ini adalah bagian untuk menginisasi trigger, kalau kamu liat di GUI itu ada Event, Condition, dan Actions
    // dalam JASS setelah diconvert menjadi seperti ini
    function InitTrig_Phantom_Pain takes nothing returns nothing
        set gg_trg_Phantom_Pain = CreateTrigger(  )
        call TriggerRegisterAnyUnitEventBJ(gg_trg_Phantom_Pain,EVENT_PLAYER_UNIT_ATTACKED) //-----> meruoakan inisiasi untuk event    
        call TriggerAddCondition(gg_trg_Phantom_Pain,Condition(function customcondition)) //-----> merupakan inisasi untuk condition
        call TriggerAddAction(gg_trg_Phantom_Pain,function Trig_Phantom_Pain_Actions )  //----> merupakan inisiasi untuk actions
    endfunction
    dalam mengisi function

    a. harus diawali dengan function dan diakhiri dengan endfunction

    contoh awalan sebuah fungsi :
    function <NAMAFUNGSI> takes <ARGUMEN1> <VARIABELARGUMEN1>, <ARGUMEN2> <VARIABELARGUMEN2> returns <TIPEVALUEYANGDIRETURN>

    contoh akhiran fungsi :

    endfunction

    b. local dalam fungsi harus dideklarasikan di awal fungsi

    sistematika penulisannya local <TIPE> <NAMALOKAL>

    contoh

    -salah- deklarasi tidak diawal
    Code:
    function abcde takes nothing returns nothing
       call DisplayTextToPlayer(Player(0), 0, 0, "waa"
       local string b = "cuy"
    endfunction
    -benar- deklarasi diawal
    Code:
    function abcde takes nothing returns nothing
       local string b = "cuy"
       call DisplayTextToPlayer(Player(0), 0, 0, "adubocapede"
    endfunction
    en ... dari pertanyaannya ... bikinnya ditengah function dan endfunction ( diantara dua benda itu )

  2. Hot Ad
  3. #77
    valkemiere's Avatar
    Join Date
    Oct 2006
    Location
    In my Rainbow Castle
    Posts
    1,874
    Points
    5,111.21
    Thanks: 65 / 32 / 31

    Default

    o0o getu y, eh kk bkin box code : yg isi trigernya itu yg kk post ke sini pake apa? di copy paste? trus bisa di geser kiri kanan atas bwh , soalnya di skripsi mo bkin kek gitu klo mo nunjukin proporsal :P , kadang juga aku mo tny trigernya mo nunjukin kesini triger sy bener apa nga

  4. #78
    rizzuh's Avatar
    Join Date
    Oct 2006
    Location
    Bandung, Indonesia, Indonesia
    Posts
    671
    Points
    1,308.90
    Thanks: 2 / 14 / 10

    Default

    itu pake BBCode yang [code] [ /code]

    nunjukinnya soft copy ya ?

  5. #79
    DoOs_101's Avatar
    Join Date
    Oct 2006
    Location
    Jakarta
    Posts
    2,371
    Points
    3,181.21
    Thanks: 0 / 9 / 8

    Default

    Prinsip nya sama kyk smua programming.

    Initialization: Deklarasi variable dan parameter.
    Constructor: Setting value-value field variables.
    Methods: Obyek-obyek di program tersebut yang membentuk kepribadian fungsi program tersebut.
    Quotes of the week:
    "He vanishes only to return as a tyrant."


  6. #80
    valkemiere's Avatar
    Join Date
    Oct 2006
    Location
    In my Rainbow Castle
    Posts
    1,874
    Points
    5,111.21
    Thanks: 65 / 32 / 31

    Default

    hue2 getu y, gw sms lo msi ga bales2, ywd wa tny lgi , tujuan pmbuatan map maker ini apa?

  7. #81
    rizzuh's Avatar
    Join Date
    Oct 2006
    Location
    Bandung, Indonesia, Indonesia
    Posts
    671
    Points
    1,308.90
    Thanks: 2 / 14 / 10

    Default

    SMS ... dari kemarin yang masuk ke gw cuman dari nomer 999

    untuk referensi gw SMS temen gw aja nyampenya baru 2 hari kemudian .... 2 tell the truth gw belum terima SMS dari lu dan ga ada sms yang masuk selain dari 999 .... ( tanyakan pada esia yang lemot itu ....::thumbdown:: )

    btw ... knp ngga PM ?

  8. #82
    Section's Avatar
    Join Date
    Nov 2006
    Location
    about.me/SECTION
    Posts
    2,095
    Points
    11,041.04
    Thanks: 45 / 112 / 98

    Exclamation

    KK....... Soal Strength Aura... Itu kalo pake event periodic 0.5 seconds bisa bikin lag kalo udah main bangsa 1 jam an. Apalagi aku juga bikin skill semacam gitu (pake periodic). Bisa makin lag... Gimana donk.. Ada cara lain gak?

    Ngomong2 kk rizzuh bisa checkin map aku gak? kalo ada yang salah gitu kek... Nanti aku attach map aku (masi belum selesai). Hari ini aku lupa bawa map aku... Maklum di rumah kagak ada internet..::

  9. #83
    rizzuh's Avatar
    Join Date
    Oct 2006
    Location
    Bandung, Indonesia, Indonesia
    Posts
    671
    Points
    1,308.90
    Thanks: 2 / 14 / 10

    Default

    Tergantung, tapi gw bikin triggernya ngga ngambil banyak memori, leaknya jg udah gw atasi

    Periodic ngga masalah kok sebenernya, meskipun lebih bagus pake timer ....

    yang bikin lag dan berat itu biasanya kl ada memory leak ...

    btw ge lupa ... tambahin ini

    Code:
    function Trig_strength_aura_Actions takes nothing returns nothing
        local group g = CreateGroup()
        local group n
        local unit u
        local boolexpr b = Condition(function unit_filter )
        local rect r = GetPlayableMapRect()
        
        call GroupEnumUnitsInRect(g, r, b)
        set n = US_copy_group(g)
        loop
            set u = FirstOfGroup(n)
            exitwhen u == null
            
            if UnitHasBuffBJ(u, buffcode1()) == true or UnitHasBuffBJ(u, buffcode2()) == true or UnitHasBuffBJ(u, buffcode3()) == true or UnitHasBuffBJ(u, buffcode4()) == true and GetUnitAbilityLevel(u, secabilcode()) < 1 then
                call UnitAddAbility(u, secabilcode())
                if UnitHasBuffBJ(u, buffcode1()) == true then
                    call SetUnitAbilityLevel(u, secabilcode(), 1)
                elseif UnitHasBuffBJ(u, buffcode2()) == true then
                    call SetUnitAbilityLevel(u, secabilcode(), 2)
                elseif UnitHasBuffBJ(u, buffcode3()) == true then
                    call SetUnitAbilityLevel(u, secabilcode(), 3)
                else 
                    call SetUnitAbilityLevel(u, secabilcode(), 4)
                endif      
            elseif UnitHasBuffBJ(u, buffcode1()) == true or UnitHasBuffBJ(u, buffcode2()) == true or UnitHasBuffBJ(u, buffcode3()) == true or UnitHasBuffBJ(u, buffcode4()) == true and GetUnitAbilityLevel(u, secabilcode()) >= 1 then
                if UnitHasBuffBJ(u, buffcode1()) == true and GetUnitAbilityLevel(u, secabilcode()) != 1  then
                    call SetUnitAbilityLevel(u, secabilcode(), 1)
                elseif UnitHasBuffBJ(u, buffcode2()) == true and GetUnitAbilityLevel(u, secabilcode()) != 2 then
                    call UnitRemoveAbility(u, buffcode1())
                    call SetUnitAbilityLevel(u, secabilcode(), 2)
                elseif UnitHasBuffBJ(u, buffcode3()) == true and GetUnitAbilityLevel(u, secabilcode()) != 3 then
                    call UnitRemoveAbility(u, buffcode2())
                    call SetUnitAbilityLevel(u, secabilcode(), 3)
                elseif UnitHasBuffBJ(u, buffcode4()) == true and GetUnitAbilityLevel(u, secabilcode()) != 4 then
                    call UnitRemoveAbility(u, buffcode3())
                    call SetUnitAbilityLevel(u, secabilcode(), 4)
                endif
            else
                call UnitRemoveAbility(u, secabilcode())
            endif
            
            call GroupRemoveUnit(n, u)
        endloop
        
        //remove mem leaks
        call DestroyGroup(g)
        call DestroyGroup(n)
        call DestroyBoolExpr(b)
        call RemoveRect(r)
        set r = null
        set g = null
        set b = null
        set u = null 
    endfunction
    gw rada2x lupa kl bagian itu leak apa ngga ... tapi pake aja biar aman

  10. #84
    DJTuing's Avatar
    Join Date
    Oct 2006
    Location
    Jakarta
    Posts
    701
    Points
    911.34
    Thanks: 0 / 0 / 0

    Default

    zuh... lo punya progam yang buat nge cilin ukuran sebuah Map ga? kalo ada Upload di sini dung? please? tq yo
    I AM WOW LOVER
    Zhirne : Shaman Lvl 80
    Chirne : Druid Lvl 80
    Mikelewis : Warrior Lvl 80

  11. #85
    aVaTaR_EnGiNE's Avatar
    Join Date
    Jan 2007
    Location
    Database Error
    Posts
    170
    Points
    191.90
    Thanks: 0 / 0 / 0

    Default

    buat ngecilin map?ada tuh di resource filenya kk rizzuh...Vex's Map Opt -__-"

  12. #86
    valkemiere's Avatar
    Join Date
    Oct 2006
    Location
    In my Rainbow Castle
    Posts
    1,874
    Points
    5,111.21
    Thanks: 65 / 32 / 31

    Default

    kk rizzuh , mo tny nih, klo ada skill di pake 12 orang bersamaan , itu gmn misalnya pake GUI ,
    kan uda wa buat for loop integer A, 1 - 12
    bla2 bla2,

    masi bug

  13. #87
    aVaTaR_EnGiNE's Avatar
    Join Date
    Jan 2007
    Location
    Database Error
    Posts
    170
    Points
    191.90
    Thanks: 0 / 0 / 0

    Default

    er..sebelumnya sory gw bukan rizuh... :P
    hmm..skillnya gimana dlu...
    eh...eh..loopnya buat apa tuh..masa yang cast satu tapi pake loop.. -__-"
    klo mo buat multi instance able pake GUI, pake array aja variablenya dibuat sesuai player number of owner of casting unit...

  14. #88
    rizzuh's Avatar
    Join Date
    Oct 2006
    Location
    Bandung, Indonesia, Indonesia
    Posts
    671
    Points
    1,308.90
    Thanks: 2 / 14 / 10

    Default

    Ya seperti kata avatar bisa pake global variable ( variable editor )

    Tapi ini cuma Multi-player-instanceable ... tapi ngga Multi-unit-Instanceable

    jadi kl ada player make bersamaan bisa, tapi kl banyak unit yang make biasanya ngga bisa

    btw triggernya ky apa dulu, atau paling mgga skillnya efeknya apa ? kok pake loop

  15. #89
    valkemiere's Avatar
    Join Date
    Oct 2006
    Location
    In my Rainbow Castle
    Posts
    1,874
    Points
    5,111.21
    Thanks: 65 / 32 / 31

    Default

    wew , anggap sj yg casting 12 orang serempak

    jadi set dlo kan?
    for loop integer A 1-12
    Set Caster[integer A]= castingunit
    (anggap saja skillnnya ngesot) turn on triger ngesot

    di triger ngesotnya

    every 0.01

    actionnya
    move caster[integerA] into positionya offset 10 dst

    itu ga semuanya jalan

    klo cara bodohnya bkin satu2 sih bisa.
    maksud ku cara praktisnya

  16. #90
    aVaTaR_EnGiNE's Avatar
    Join Date
    Jan 2007
    Location
    Database Error
    Posts
    170
    Points
    191.90
    Thanks: 0 / 0 / 0

    Default

    wew...ga usah loop lah...ntu yang bikin ngebug...
    buat aja
    set caster[player number of owner of casting unit] = casting unit
    jangan pake loop buat ntu... -__-"

Page 6 of 16 FirstFirst ... 2345678910 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •