NusaReborn



Results 1 to 9 of 9

Thread: [Ask]Blade Mail Damage Return System


Share on Facebook Tweet on Twitter
  1. #1

    Flamework_Baron's Avatar
     
    Flamework_Baron is offline



    Mangaka
    Clan A!
    Shaman
    Joined NSR
    13/01/2009
    1,780
    Posts
    181
    Threads
    Thanked
    747 Times
    Thanking
    675 Times
    Rep Power
    36


     

    Default [Ask]Blade Mail Damage Return System

    Selama ini gw kepikiran kalau system Blade Mail itu secara garis besarny kyk gini:
    Spoiler:
    Code:
    function Trig_Return_Suram_Conditions takes nothing returns boolean
        if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B000') == true ) ) then
            return false
        endif
        if ( not ( IsUnitEnemy(GetEventDamageSource(), GetOwningPlayer(udg_ReturnSuramCaster)) == true ) ) then
            return false
        endif
        return true
    endfunction
    
    
    function Trig_Return_Suram_Actions takes nothing returns nothing
        set udg_DamageGiver = GetEventDamageSource()
        set udg_DamageReceived = GetEventDamage()
        call SetUnitLifeBJ( udg_DamageReceiver, udg_DamageReceiverHP )
        call UnitDamageTargetBJ( udg_DamageReceiverDummeh, udg_DamageGiver, udg_DamageReceived, ATTACK_TYPE_SPELL, DAMAGE_TYPE_MAGIC )
        call SetUnitLifeBJ( udg_DamageReceiverDummeh, ( GetUnitStateSwap(UNIT_STATE_LIFE, udg_DamageReceiverDummeh) - udg_DamageReceiverDummeh ) )
        call AddSpecialEffectTargetUnitBJ( "origin", udg_DamageGiver, "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl" )
        call ConditionalTriggerExecute( gg_trg_SFX_Cleaner )
    endfunction
    
    
    //===========================================================================
    function InitTrig_Return_Suram takes nothing returns nothing
        set gg_trg_Return_Suram = CreateTrigger(  )
        call DisableTrigger( gg_trg_Return_Suram )
        call TriggerRegisterUnitEvent( gg_trg_Return_Suram, udg_DamageReceiver, EVENT_UNIT_DAMAGED )
        call TriggerAddCondition( gg_trg_Return_Suram, Condition( function Trig_Return_Suram_Conditions ) )
        call TriggerAddAction( gg_trg_Return_Suram, function Trig_Return_Suram_Actions )
    endfunction


    Namun ternyata gw salah. TheWizard tadi pagi ngasih tahu gw kalau cara kerjanya bukan seperti itu. Nah, disini gw mau sekalian ngebahas triggernya sama-sama (karena gw udah mentok tok tok tok tok tok orz).

    Dan sekiranya mungkin ada yang lebih tahu disini?

    Pokoknya, mohon bantuannya


    Btw trigger diatas damage returnnya kagak jalan loh.

    ---------------------------------------------------------------------------------------

    FAQ For This Thread.

    Q: Why JASS?
    A: Gw lupa backup versi GUInya lol. Sori banget...

    Q: Kk saya nggak ngerti. Gimana dong?
    A: Uh, I supposed you must leave by now? Jangan umbar aib sendiri atuh, nanyanya di profile ane aja.

       


  2. #2

    AngelicWingzZ's Avatar
     
    AngelicWingzZ is offline
    The One Winged Angel

    I want to try dancing as a pair for a change! You can be my partner! Just watch what I do and follow

    "Valkyrie Crusade"
    Clan NA7E
    Shaman
    Joined NSR
    05/07/2009
    835
    Posts
    89
    Threads
    Thanked
    562 Times
    Thanking
    528 Times
    Rep Power
    120


    Awards Showcase


     

    Default Re: [Ask]Blade Mail Damage Return System

    Very simple damage return made by GUI , ga pake item cmn gw udh set ngehit musuh itu pasti return dmg mau spell mau hit biasa , http://www.mediafire.com/download/tw...Dmg_Return.w3x

    Gw ga seberapa paham buat JASS , cmn gw bs baca sedikit maksud itu Trigger .


    call SetUnitLifeBJ( udg_DamageReceiverDummeh, ( GetUnitStateSwap(UNIT_STATE_LIFE, udg_DamageReceiverDummeh) - udg_DamageReceiverDummeh ) )

    feel gw salah di situ deh . CMIIW .
     

  3. The Following 2 Users Say Thank You to AngelicWingzZ For This Useful Post:

    Flamework_Baron (June 26th, 2013), TheWizard (June 26th, 2013)

  4. #3

     
    DigiTAL^BANKE is offline


    troller

    "SEA and Australian serve"
    Clan Manda
    Shaman
    Joined NSR
    07/07/2010
    774
    Posts
    106
    Threads
    Thanked
    436 Times
    Thanking
    404 Times
    Rep Power
    0


     

    Default Re: [Ask]Blade Mail Damage Return System

    Damage return (A15W)
    Based on Fan of Knives (dummy).

    When Blade Mail is activated, then create a new trigger to be called when the unit that activated Blade Mail is dealt damage, or 3.5 seconds later. Then show the special effect (SpikeBarrier) on the caster's chest.

    When the trigger is called and it wasn't because the unit was dealt damage (aka it was because the 3.5 sec. timer), then destroy the special effect and destroy this trigger.
    If it was called because the unit was damaged, then if the damage is between 2 and 3000, the damage source is non-allied and non-structure and "BladeMail|GlobalFlag" is false, then if the source is a hero or a non-dummy unit, do (1), else do (2).

    (1) Disable this trigger and set "BladeMail|GlobalFlag" to true. Make the Blade Mail wielder damage the attacker for the EventDamage with Attack Type Hero, Damage Type Magic. Then enable this trigger again and set "BladeMail|GlobalFlag" to false.

    (2) Disable this trigger and set "BladeMail|GlobalFlag" to true. Make the Blade Mail wielder damage the hero of the dummy unit's owner for the EventDamage with Attack Type Hero, Damage Type Magic. Then enable this trigger again and set "BladeMail|GlobalFlag" to false.

    Notes: The trigger works with the recieved damage, hence damage after all reductions of the Blade Mail Wielder is returned. In case of a triggered heal, the ammount of damage returned is the original damage, because in fact you recieve the damage and then it is healed immediately. So if Void Backtracks an attack, the damage is normally returned.
    Function (2) is used for dummy unit damage sources, such as Zeus' Lightning Bolt or his ultimate (the damage will be returned to Zeus in this case).
    The trigger gets disabled when dealing damage to prevent gamecrashing infinite loop, when two heroes with active blademails fight each other (fixed in 6.60b). As of 6.65, Blademail doesn't return damage from another Blademail (realized by "BladeMail|GlobalFlag" variable).

    errr moar like this ?
    .................................................. ..

    source playdota
       

  5. The Following 3 Users Say Thank You to DigiTAL^BANKE For This Useful Post:

    ary89 (June 27th, 2013), Flamework_Baron (June 26th, 2013), TheWizard (June 26th, 2013)

  6. #4

    TheWizard's Avatar
     
    TheWizard is offline





    "Kota Semarang"
    Clan CRIM
    Shaman
    Joined NSR
    17/01/2009
    1,045
    Posts
    35
    Threads
    Thanked
    126 Times
    Thanking
    727 Times
    Rep Power
    30


     

    Default Re: [Ask]Blade Mail Damage Return System

    ^
    ^
    ^
    Nahnah nah

    sekarang executable triggernya mudeng

    Tapi, seumpama ular rhasta nyerang kunka pake BM

    HP rhasta yang ngurang, bukan ularnya

    oke, ini point penting juga
       

  7. #5

    [D]olsupeR^'s Avatar
     
    [D]olsupeR^ is offline



    Tukang Curi Jemuran Tetangga

    "Warez"
    Clan NA7E
    Grunt
    Joined NSR
    12/10/2010
    5,972
    Posts
    495
    Threads
    Thanked
    2,620 Times
    Thanking
    1,273 Times
    Rep Power
    155


    Awards Showcase


     

    Default Re: [Ask]Blade Mail Damage Return System

    ^
    ^
    ^
    kalo ga salah untuk map yg lama gitu... tapi buat map baru kyknya gw pancing gitu kemaren ngga kena damage rhastanya...
       

  8. #6

    Flamework_Baron's Avatar
     
    Flamework_Baron is offline



    Mangaka
    Clan A!
    Shaman
    Joined NSR
    13/01/2009
    1,780
    Posts
    181
    Threads
    Thanked
    747 Times
    Thanking
    675 Times
    Rep Power
    36


     

    Default Re: [Ask]Blade Mail Damage Return System

    Thanks. Any help would be appreciated.

    Eeto, kalau line yang
    Code:
    call SetUnitLifeBJ( udg_DamageReceiverDummeh, ( GetUnitStateSwap(UNIT_STATE_LIFE, udg_DamageReceiverDummeh) - udg_DamageReceiverDummeh ) )
    Itu buat minus hp dummy. So it won't do anything that affecting the damage return...

    Nggak jalan itu di bagian damage return. Karena hp si attacked unit masih berkurang seperti biasa (dengan kata lain, memang triggernya nggak jalan blas)

    Gw blom dapet gambarannya dr yg dikasih Dyaz (probably because I feel dizzy), but I'm sure I'll get it later.

    Kalau soal kenapa cuma hero yg dapet, I think that's because if/then/elsenya itu diatur supaya jadi masuknya ke Hero. Jadi semacam:
    If ((Owner of(Attacking Unit)) Equal to (Enemy Of(Owner of(Damage_Receiver)))
    Then
    Pick Every Units within (PlayableMapArea matching (matchingunit... *males gw terusin lol*
    Intinya yang dipick itu Hero from the Player whose owned that Attacking Unit.

    Sampe sini ngerti kan? Nah, abis itu picked unit tersebut dikasi damage sesuai damage yang masuk. Kira-kira begitulah. Atau setidaknya, begitu yg gw pikir.

    Still trying to download that link from AngelicWingzz. Seems my connection is broken. Can't download it for now <_<

       

  9. #7

    AngelicWingzZ's Avatar
     
    AngelicWingzZ is offline
    The One Winged Angel

    I want to try dancing as a pair for a change! You can be my partner! Just watch what I do and follow

    "Valkyrie Crusade"
    Clan NA7E
    Shaman
    Joined NSR
    05/07/2009
    835
    Posts
    89
    Threads
    Thanked
    562 Times
    Thanking
    528 Times
    Rep Power
    120


    Awards Showcase


     

    Default Re: [Ask]Blade Mail Damage Return System

    Logikanya buat blade mail benernya sih simple cmn yg ribet buat bagian if2 nya , unit mana yg boleh kena , siapa aja yg ga boleh kena , kalau sama 2 punya 2aktif blademail

    The trigger gets disabled when dealing damage to prevent gamecrashing infinite loop, when two heroes with active blademails fight each other
    Bisa buat infinite loop , buat GUI sih gw cmn bingung kalau di pake MUI (*maklum udh lama ga mapping*) , as far basic system Pualing Simple di map yg di atas gw upload , btw link download jalan kq , inet lu suram kali ya wkkwkw
     

  10. #8

    Flamework_Baron's Avatar
     
    Flamework_Baron is offline



    Mangaka
    Clan A!
    Shaman
    Joined NSR
    13/01/2009
    1,780
    Posts
    181
    Threads
    Thanked
    747 Times
    Thanking
    675 Times
    Rep Power
    36


     

    Default Re: [Ask]Blade Mail Damage Return System

    Hiya, today I was looking to your map and...

    I've tested that one and seems that one doesn't have any capability to take variable into the event. Coba deh, itu cuman bisa ngasih efek ke unit yang udah ada (kecuali kalau dirubah jadi MUI, bisa diotak-atik kembali yang tentunya kurang lebih jadi sama kyk yang gw post diatas, not working o_o)

    But hey, that's the last resort in case anything goes south. So, thanks.

    Okay, yesterday I don't get anything about what Dyaz post but today I can figure it out how it works. I'm gonna test it.

       


  11. #9

    Flamework_Baron's Avatar
     
    Flamework_Baron is offline



    Mangaka
    Clan A!
    Shaman
    Joined NSR
    13/01/2009
    1,780
    Posts
    181
    Threads
    Thanked
    747 Times
    Thanking
    675 Times
    Rep Power
    36


     

    Default Re: [Ask]Blade Mail Damage Return System

    Found the solution.

    Close this thread plz. Thanks for helping ;)

       




Tags for this Thread

Posting Permissions

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