• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Spell Book Ability disappears at random moment in game

Status
Not open for further replies.
Level 16
Joined
Jul 31, 2012
Messages
2,217
like the title says... we have a spell book ability (actually 2 with the same unit) but after a short delay... not specific... the passive spells spell book disappears like it didn't exist you can try it with the test map attached to the post
 

Attachments

  • DarkNaga.w3x
    160.3 KB · Views: 39
Last edited by a moderator:
Level 16
Joined
Jul 31, 2012
Messages
2,217
there is looking_for_help's DDS triggers...:
  • OnDamage
    • Events
      • Game - damageEventTrigger becomes Equal to 1.00
    • Conditions
    • Actions
      • -------- Dark Wave --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of source) Equal to Dummy
        • Then - Actions
          • Unit - Cause Hero[(Player number of (Owner of source))] to damage target, dealing (4.00 x (Real((Agility of Hero[(Player number of (Owner of source))] (Include bonuses))))) damage of attack type Spells and damage type Magic
        • Else - Actions
      • -------- Dark Wave --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • damageType Equal to PHYSICAL
        • Then - Actions
          • -------- Actions for PHYSICAL damage --------
          • -------- Disarm --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Disarm_ID for source) Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (target is A town-hall-type unit) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random real number between 0.00 and 100.00) Less than or equal to 7.00
                    • Then - Actions
                      • Set loc = (Position of target)
                      • Unit - Create 1 Dummy for (Owner of source) at loc facing Default building facing degrees
                      • Unit - Add Disarm_Dummy_ID to (Last created unit)
                      • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence loc
                      • Unit - Kill (Last created unit)
                      • Custom script: call RemoveLocation(udg_loc)
                    • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random real number between 0.00 and 100.00) Less than or equal to 50.00
                    • Then - Actions
                      • Set loc = (Position of target)
                      • Unit - Create 1 Dummy for (Owner of source) at loc facing Default building facing degrees
                      • Unit - Add Disarm_Dummy_ID to (Last created unit)
                      • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence loc
                      • Unit - Add a 0.10 second Generic expiration timer to (Last created unit)
                      • Custom script: call RemoveLocation(udg_loc)
                    • Else - Actions
            • Else - Actions
          • -------- Disarm --------
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • damageType Equal to SPELL
            • Then - Actions
              • -------- Actions for SPELL damage --------
            • Else - Actions
              • -------- Actions for CODE damage --------
              • -------- Code damage is damage dealt directly from this trigger --------
and some others:
  • Ability IDs
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Attack_ID = Attack
      • Set Stop_ID = Stop
      • Set Dummy = Dummy
      • Set DarkWave_ID = Dark Wave
      • Set DarkWave_Dummy_ID = Dark Wave - Dummy
      • Set Disarm_ID = Disarm
      • Set Disarm_Dummy_ID = Disarm - Dummy
  • Dark Wave
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dark Wave
    • Actions
      • Set loc = (Position of (Triggering unit))
      • Set loc1 = (Target point of ability being cast)
      • Unit - Create 1 Dummy for (Triggering player) at loc facing (Angle from loc to loc1) degrees
      • Unit - Add DarkWave_Dummy_ID to (Last created unit)
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm loc1
      • Unit - Kill (Last created unit)
      • Custom script: call RemoveLocation(udg_loc)
      • Custom script: call RemoveLocation(udg_loc1)
  • Attack
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Attack_ID
    • Actions
      • Set Unit = No unit
      • Set Unit = (Target unit of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Unit Equal to No unit
        • Then - Actions
          • Set loc = (Target point of ability being cast)
          • Unit - Order (Triggering unit) to Stop
          • Unit - Order (Triggering unit) to Attack-Move To loc
          • Custom script: call RemoveLocation(udg_loc)
        • Else - Actions
          • Unit - Order (Triggering unit) to Attack Unit
  • Stop
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Stop_ID
    • Actions
      • Unit - Order (Triggering unit) to Stop
JASS:
function Trig_Dummy_Removal_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Aloc' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Dummy_Removal_Actions takes nothing returns nothing
    local unit dummy = GetTriggerUnit()
    call TriggerSleepAction( 1.00 )
    call RemoveUnit( dummy )
endfunction

//===========================================================================
function InitTrig_Dummy_Removal takes nothing returns nothing
    set gg_trg_Dummy_Removal = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Dummy_Removal, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_Dummy_Removal, Condition( function Trig_Dummy_Removal_Conditions ) )
    call TriggerAddAction( gg_trg_Dummy_Removal, function Trig_Dummy_Removal_Actions )
endfunction

[TRIGGER]Hero Know
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Set Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
[/TRIGGER]
 
Status
Not open for further replies.
Top