• 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.

Respawn for bosses

Status
Not open for further replies.
Level 11
Joined
Dec 16, 2017
Messages
418
Hi guys, i've tried a better respawn type for bosses in my map, as the old one lacked some positions and effects +texts etc, and now it seems that if i kill 2+ bosses in a row one, before one revives, no one will revive after dying..only the text appears as "has revived and is stronger then before" but no name, and no boss respawn, why could that be? The wait can interfere with the others? I will post a few triggers in

  • Locations Overall Bosses
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet Map_Boss[1] = |cffFF0000Bug Lord|r 40
      • Set VariableSet Map_Boss[2] = |cffFF0000Gar'thok|r 45
      • Set VariableSet Map_Boss[3] = |cffFF0000Eddga|r 50
      • Set VariableSet Map_Boss[4] = |cffFF0000Tigon|r 55
      • Set VariableSet Map_Boss[5] = |cffFF0000Maya|r 60
      • Set VariableSet Map_Boss[6] = |cffFF0000Fire Lord|r 65
      • Set VariableSet Map_Boss[7] = |cffFF0000Orc Lord|r 70
      • Set VariableSet Map_Boss[8] = |cffFF0000Goblin Chieftain|r 75
      • Set VariableSet Map_BossRevive[1] = (Center of BossBugLord <gen>)
      • Set VariableSet Map_BossRevive[2] = (Center of BossGarthok <gen>)
      • Set VariableSet Map_BossRevive[3] = (Center of BossEddga <gen>)
      • Set VariableSet Map_BossRevive[4] = (Center of BossTigon <gen>)
      • Set VariableSet Map_BossRevive[5] = (Center of BossMaya <gen>)
      • Set VariableSet Map_BossRevive[6] = (Center of BossFireLord <gen>)
      • Set VariableSet Map_BossRevive[7] = (Center of BossOrcLord <gen>)
      • Set VariableSet Map_BossRevive[8] = (Center of BossGoblinChieftain <gen>)
      • Set VariableSet Map_BossRevive[9] = (Center of BossSeaKing <gen>)
      • Set VariableSet Map_BossRevive[10] = (Center of BossCorruptedPronteraKing <gen>)
      • Set VariableSet Map_BossRevive[11] = (Center of BossDrake <gen>)
      • Set VariableSet Map_BossRevive[12] = (Center of BossSkeletonLord <gen>)
      • Set VariableSet Map_BossRevive[13] = (Center of BossDarkLord <gen>)
      • Set VariableSet Map_BossRevive[14] = (Center of BossVampireLord <gen>)
      • Set VariableSet Map_BossRevive[15] = (Center of BossBansheeQueen <gen>)
      • Set VariableSet Map_BossRevive[16] = (Center of BossBaphomet <gen>)
      • Set VariableSet Map_BossRevive[17] = (Center of BossUltimaDragon <gen>)
      • Set VariableSet Map_BossRevive[18] = (Center of BossGameMaster <gen>)
      • Set VariableSet Map_BossRevive[18] = (Center of BossGameMaster <gen>)
      • Set VariableSet Map_BossRevive[19] = (Center of BossTreant <gen>)
      • Set VariableSet Map_BossRevive[20] = (Center of BossCorruptedProtector <gen>)
  • BugLord
    • Events
      • Unit - |cffFF0000Bug Lord|r 40 0246 <gen> Dies
    • Conditions
    • Actions
      • Set VariableSet TempPoint = (Position of (Dying unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than (5 x Map_ItemsHeroDropRate)
        • Then - Actions
          • Item - Create |c000070ddWeapon : Red Guillotine at TempPoint
          • Special Effect - Create a special effect at TempPoint using Item_GoldCoins.mdx
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint using UI\Feedback\GoldCredit\GoldCredit.mdl
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Last created item)) + ( |cff008080has been dropped from |r + (Name of (Dying unit))))
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Wait 300.00 seconds
      • Quest - Create Campaign Quest Icon on (Dying unit) using Boss style
      • Hero - Instantly revive |cffFF0000Bug Lord|r 40 0246 <gen> at Map_BossRevive[1], Hide revival graphics
      • Special Effect - Create a special effect attached to the origin of (Dying unit) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Hero - Set (Dying unit) Hero-level to ((Hero level of (Dying unit)) + 2), Hide level-up graphics
      • Hero - Create Manual of Health and give it to (Dying unit)
      • Hero - Modify Strength of (Dying unit): Add (2 x (Strength of (Dying unit) (Exclude bonuses))).
      • Hero - Modify Agility of (Dying unit): Add (2 x (Agility of (Dying unit) (Exclude bonuses))).
      • Hero - Modify Intelligence of (Dying unit): Add (2 x (Intelligence of (Dying unit) (Exclude bonuses))).
      • Game - Display to (All players) for 30.00 seconds the text: ((Name of (Dying unit)) + has revived and is stronger then he was before!)
  • Garthok
    • Events
      • Unit - |cffFF0000Gar'thok|r 45 0233 <gen> Dies
    • Conditions
    • Actions
      • Set VariableSet TempPoint = (Position of (Dying unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than (5 x Map_ItemsHeroDropRate)
        • Then - Actions
          • Item - Create |c000070ddAccesories : Faithful Ring at Map_BossRevive[2]
          • Special Effect - Create a special effect at TempPoint using Item_GoldCoins.mdx
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint using UI\Feedback\GoldCredit\GoldCredit.mdl
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Last created item)) + ( |cff008080has been dropped from |r + (Name of (Dying unit))))
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Wait 400.00 seconds
      • Quest - Create Campaign Quest Icon on (Dying unit) using Boss style
      • Hero - Instantly revive |cffFF0000Gar'thok|r 45 0233 <gen> at Map_BossRevive[2], Hide revival graphics
      • Special Effect - Create a special effect attached to the origin of (Dying unit) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Hero - Set (Dying unit) Hero-level to ((Hero level of (Dying unit)) + 2), Hide level-up graphics
      • Hero - Create Manual of Health and give it to (Dying unit)
      • Hero - Modify Strength of (Dying unit): Add (2 x (Strength of (Dying unit) (Exclude bonuses))).
      • Hero - Modify Agility of (Dying unit): Add (2 x (Agility of (Dying unit) (Exclude bonuses))).
      • Hero - Modify Intelligence of (Dying unit): Add (2 x (Intelligence of (Dying unit) (Exclude bonuses))).
      • Game - Display to (All players) for 30.00 seconds the text: ((Name of (Dying unit)) + has revived and is stronger then he was before!)
  • Eddga
    • Events
      • Unit - |cffFF0000Eddga|r 50 0171 <gen> Dies
    • Conditions
    • Actions
      • Set VariableSet TempPoint = (Position of (Dying unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than (5 x Map_ItemsHeroDropRate)
        • Then - Actions
          • Item - Create |c000070ddWeapon : Claws of Eddga at Map_BossRevive[3]
          • Special Effect - Create a special effect at TempPoint using Item_GoldCoins.mdx
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint using UI\Feedback\GoldCredit\GoldCredit.mdl
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Last created item)) + ( |cff008080has been dropped from |r + (Name of (Dying unit))))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than (4 x Map_ItemsHeroDropRate)
        • Then - Actions
          • Item - Create |c000070ddAccesories : Talisman of Evasion at Map_BossRevive[3]
          • Special Effect - Create a special effect at TempPoint using Item_GoldCoins.mdx
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint using UI\Feedback\GoldCredit\GoldCredit.mdl
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Last created item)) + ( |cff008080has been dropped from |r + (Name of (Dying unit))))
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Wait 500.00 seconds
      • Quest - Create Campaign Quest Icon on (Dying unit) using Boss style
      • Hero - Instantly revive |cffFF0000Eddga|r 50 0171 <gen> at Map_BossRevive[3], Hide revival graphics
      • Special Effect - Create a special effect attached to the origin of (Dying unit) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Hero - Set (Dying unit) Hero-level to ((Hero level of (Dying unit)) + 2), Hide level-up graphics
      • Hero - Learn skill for (Dying unit): |r Berserk Eddga
      • Hero - Create Manual of Health and give it to (Dying unit)
      • Hero - Modify Strength of (Dying unit): Add (2 x (Strength of (Dying unit) (Exclude bonuses))).
      • Hero - Modify Agility of (Dying unit): Add (2 x (Agility of (Dying unit) (Exclude bonuses))).
      • Hero - Modify Intelligence of (Dying unit): Add (2 x (Intelligence of (Dying unit) (Exclude bonuses))).
      • Game - Display to (All players) for 30.00 seconds the text: ((Name of (Dying unit)) + has revived and is stronger then he was before!)
 
Level 24
Joined
Feb 27, 2019
Messages
833
I havnt encountered this problem before so this is just what I figured out right now. It appears that only 7 heroes per player can be dead and respawn at a time. If additional heroes die then the firsts ones to die are at some point removed from the game. Could that be the problem youre experiencing?
 
Last edited:
Level 11
Joined
Aug 11, 2009
Messages
605
I meant it as a solution to the revive limit to heroes :) if you instantly revive them there is no way they can stack up to being more than 7 of them dead at the same time. The hiding just make it seem like they are dead, then you unhide them when you want them "revived".
 
Level 11
Joined
Dec 16, 2017
Messages
418
So, this is how i saved their stats levels items etc and in boss init there are the locations for respawn, the unit type and respawn timer, would this work in a one trigger with IFTE? Or it would bug out..and one more thing, how would you do it cleaner then this? I have like 20 bosses with numbers growing and i have to do this for each of them...
  • Bosses Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet Map_BossTimer[1] = 10.00
      • Set VariableSet Map_BossTimer[2] = 11.00
      • Set VariableSet Map_BossTimer[3] = 12.00
      • Set VariableSet Map_BossTimer[4] = 13.00
      • Set VariableSet Map_BossTimer[5] = 14.00
      • Set VariableSet Map_BossTimer[6] = 15.00
      • Set VariableSet Map_BossTimer[7] = 16.00
      • Set VariableSet Map_BossTimer[8] = 17.00
      • Set VariableSet Map_BossTimer[9] = 18.00
      • Set VariableSet Map_BossTimer[10] = 19.00
      • Set VariableSet Map_Boss[1] = |cffFF0000Bug Lord|r 40
      • Set VariableSet Map_Boss[2] = |cffFF0000Gar'thok|r 45
      • Set VariableSet Map_Boss[3] = |cffFF0000Eddga|r 50
      • Set VariableSet Map_Boss[4] = |cffFF0000Tigon|r 55
      • Set VariableSet Map_Boss[5] = |cffFF0000Maya|r 60
      • Set VariableSet Map_Boss[6] = |cffFF0000Fire Lord|r 65
      • Set VariableSet Map_Boss[7] = |cffFF0000Orc Lord|r 70
      • Set VariableSet Map_Boss[8] = |cffFF0000Goblin Chieftain|r 75
      • Set VariableSet Map_Boss[9] = |cffFF0000Sea King|r 80
      • Set VariableSet Map_Boss[10] = |cffFF0000Corrupted King of Prontera|r 85
      • Set VariableSet Map_Boss[11] = |cffFF0000Drake|r 90
      • Set VariableSet Map_Boss[12] = |cffFF0000Skeleton Lord|r 95
      • Set VariableSet Map_Boss[13] = |cffFF0000Dark Lord|r 100
      • Set VariableSet Map_Boss[14] = |cffFF0000Vampire Lord|r 105
      • Set VariableSet Map_Boss[15] = |cffFF0000Banshee Queen|r 110
      • Set VariableSet Map_Boss[16] = |cffFF0000Baphomet|r 115
      • Set VariableSet Map_Boss[17] = |cffFF0000Ultima Dragon|r 120
      • Set VariableSet Map_Boss[18] = |cffFF0000Game Master|r
      • Set VariableSet Map_BossRevive[1] = (Center of BossBugLord <gen>)
      • Set VariableSet Map_BossRevive[2] = (Center of BossGarthok <gen>)
      • Set VariableSet Map_BossRevive[3] = (Center of BossEddga <gen>)
      • Set VariableSet Map_BossRevive[4] = (Center of BossTigon <gen>)
      • Set VariableSet Map_BossRevive[5] = (Center of BossMaya <gen>)
      • Set VariableSet Map_BossRevive[6] = (Center of BossFireLord <gen>)
      • Set VariableSet Map_BossRevive[7] = (Center of BossOrcLord <gen>)
      • Set VariableSet Map_BossRevive[8] = (Center of BossGoblinChieftain <gen>)
      • Set VariableSet Map_BossRevive[9] = (Center of BossSeaKing <gen>)
      • Set VariableSet Map_BossRevive[10] = (Center of BossCorruptedPronteraKing <gen>)
      • Set VariableSet Map_BossRevive[11] = (Center of BossDrake <gen>)
      • Set VariableSet Map_BossRevive[12] = (Center of BossSkeletonLord <gen>)
      • Set VariableSet Map_BossRevive[13] = (Center of BossDarkLord <gen>)
      • Set VariableSet Map_BossRevive[14] = (Center of BossVampireLord <gen>)
      • Set VariableSet Map_BossRevive[15] = (Center of BossBansheeQueen <gen>)
      • Set VariableSet Map_BossRevive[16] = (Center of BossBaphomet <gen>)
      • Set VariableSet Map_BossRevive[17] = (Center of BossUltimaDragon <gen>)
      • Set VariableSet Map_BossRevive[18] = (Center of BossGameMaster <gen>)
  • BugLord
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to |cffFF0000Bug Lord|r 40
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Set VariableSet Map_BossLevel[1] = (Hero level of (Triggering unit))
      • Set VariableSet Map_BossStr[1] = (Strength of (Triggering unit) (Exclude bonuses))
      • Set VariableSet Map_BossAgi[1] = (Agility of (Triggering unit) (Exclude bonuses))
      • Set VariableSet Map_BossInt[1] = (Intelligence of (Triggering unit) (Exclude bonuses))
      • Set VariableSet Map_BossItem1[1] = (Item carried by (Triggering unit) in slot 1)
      • Set VariableSet Map_BossItem2[1] = (Item carried by (Triggering unit) in slot 2)
      • Set VariableSet Map_BossItem3[1] = (Item carried by (Triggering unit) in slot 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than (5 x Map_ItemsHeroDropRate)
        • Then - Actions
          • Item - Create |c000070ddWeapon : Red Guillotine at TempPoint
          • Special Effect - Create a special effect at TempPoint using Item_GoldCoins.mdx
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint using UI\Feedback\GoldCredit\GoldCredit.mdl
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Last created item)) + ( |cff008080has been dropped from |r + (Name of (Triggering unit))))
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Wait Map_BossTimer[1] seconds
      • Unit - Create 1 Map_Boss[1] for Neutral Hostile at Map_BossRevive[1] facing Default building facing degrees
      • Quest - Create Campaign Quest Icon on (Last created unit) using Boss style
      • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Hero - Set (Last created unit) Hero-level to (Map_BossLevel[1] + 2), Hide level-up graphics
      • Hero - Learn skill for (Last created unit): |r Impale Bug Lord
      • Hero - Learn skill for (Last created unit): |r Locust Swarm Bug Lord
      • Hero - Learn skill for (Last created unit): |r Spiked Carapace Bug Lord
      • Hero - Give Map_BossItem1[1] to (Last created unit)
      • Hero - Give Map_BossItem2[1] to (Last created unit)
      • Hero - Give Map_BossItem3[1] to (Last created unit)
      • Hero - Modify Strength of (Last created unit): Add (2 x Map_BossStr[1]).
      • Hero - Modify Agility of (Last created unit): Add (2 x Map_BossAgi[1]).
      • Hero - Modify Intelligence of (Last created unit): Add (2 x Map_BossInt[1]).
      • Game - Display to (All players) for 30.00 seconds the text: ((Name of (Last created unit)) + has revived and is stronger then he was before!)
BTW, for some reason, the items don't get saved in the variable so they are not stored after "revive", why it does it that way?
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
You should store the Item-Type, not the actual Item. Also. making a single trigger that handles every boss would be pretty convenient. That's a good part of the reason why you would even have these Arrays in the first place.

Here's a new Boss Dies trigger that could be setup to handle every single kind of boss:
  • Boss Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Boss (Classification)) for (Triggering unit)) Greater than or Equal to 1
    • Actions
      • Custom script: local integer udg_Boss_Id
      • Set Variable Boss_Id = Level of Boss (Classification) for (Triggering unit)
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Set VariableSet Map_BossLevel[Boss_Id] = (Hero level of (Triggering unit))
      • Set VariableSet Map_BossStr[Boss_Id] = (Strength of (Triggering unit) (Exclude bonuses))
      • Set VariableSet Map_BossAgi[Boss_Id] = (Agility of (Triggering unit) (Exclude bonuses))
      • Set VariableSet Map_BossInt[Boss_Id] = (Intelligence of (Triggering unit) (Exclude bonuses))
      • Set VariableSet Map_BossItem1[Boss_Id] = (Item-type of (Item carried by (Triggering unit) in slot 1))
      • Set VariableSet Map_BossItem2[Boss_Id] = (Item-type of (Item carried by (Triggering unit) in slot 2))
      • Set VariableSet Map_BossItem3[Boss_Id] = (Item-type of (Item carried by (Triggering unit) in slot 3))
      • Trigger - Run Boss_Trigger[Boss_Id] (ignoring conditions)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than (5 x Map_ItemsHeroDropRate)
        • Then - Actions
          • Item - Create |c000070ddWeapon : Red Guillotine at TempPoint
          • Special Effect - Create a special effect at TempPoint using Item_GoldCoins.mdx
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint using UI\Feedback\GoldCredit\GoldCredit.mdl
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
          • Special Effect - Set Scale of (Last created special effect) to 3.00
          • Special Effect - Destroy (Last created special effect)
          • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Last created item)) + ( |cff008080has been dropped from |r + (Name of (Triggering unit))))
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Wait Map_BossTimer[Boss_Id] seconds
      • Unit - Create 1 Map_Boss[Boss_Id] for Neutral Hostile at Map_BossRevive[Boss_Id] facing Default building facing degrees
      • Set Variable Boss = (Last created unit)
      • Quest - Create Campaign Quest Icon on Boss using Boss style
      • Special Effect - Create a special effect attached to the origin of Boss using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Hero - Set Boss Hero-level to (Map_BossLevel[1] + 2), Hide level-up graphics
      • Hero - Learn skill for Boss: Boss_Skill_1[Boss_Id]
      • Hero - Learn skill for Boss: Boss_Skill_2[Boss_Id]
      • Hero - Learn skill for Boss: Boss_Skill_3[Boss_Id]
      • Hero - Create Map_BossItem1[Boss_Id] for Boss
      • Hero - Create Map_BossItem2[Boss_Id] for Boss
      • Hero - Create Map_BossItem3[Boss_Id] for Boss
      • Hero - Modify Strength of Boss: Add (2 x Map_BossStr[1]).
      • Hero - Modify Agility of Boss: Add (2 x Map_BossAgi[1]).
      • Hero - Modify Intelligence of Boss: Add (2 x Map_BossInt[1]).
      • Game - Display to (All players) for 30.00 seconds the text: ((Name of Boss) + has revived and is stronger then he was before!)
I added some new variables, Boss (unit), Boss_Id (integer), Boss_Trigger (trigger array), Boss_Skill_1/2/3 (skill array). I also use a technique called Shadowing to treat a global variable like a local variable variable (see Boss_Id). This way we can reference the Boss_Id after the Wait without any issues. Boss (Classification) is a new ability that can be given to each boss unit in the Object Editor. I'm using it's Level to represent the Array index. This is just one example of how you can have some kind of data attached to a Boss that represents it's [index] in the different Boss array variables. A lot of Levels is a pretty ugly solution, I would rely on a different data field or use a Hashtable and map the Unit-Type id to to the Array [index].
 
Last edited:
Level 11
Joined
Dec 16, 2017
Messages
418
It looks awesome, to be 1 trigger instead of 20:))

But how do I solve the item drop?
Some bosses drop 1 item, some 2, some 6..etc
Shall I store the items in boss init?
There are bosses that wear 3 items that I have to give to them after the revive but drops only 1 of them for example.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
Here's an example map that uses a Hashtable.

Here's the main trigger for configuring everything:
  • BRS Configure
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Configure this and set it to an unused Item-Type: --------
      • Set VariableSet BRS__Null_Item_Type = Wirt's Leg
      • -------- --------
      • -------- Make sure these Bonus Triggers are set to BRS Do Nothing <gen> --------
      • Set VariableSet BRS__Bonus_Trigger_Before = BRS Do Nothing <gen>
      • Set VariableSet BRS__Bonus_Trigger_After = BRS Do Nothing <gen>
      • -------- --------
      • -------- You don't have to change this: --------
      • For each (Integer BRS_Index) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set VariableSet BRS__Carry_Item_Type[BRS_Index] = BRS__Null_Item_Type
          • Set VariableSet BRS__Drop_Item_Type[BRS_Index] = BRS__Null_Item_Type
      • -------- --------
      • -------- Configure First Boss: --------
      • Set VariableSet BRS__Unit_Type = Paladin
      • Set VariableSet BRS__Revive_Point = ((Center of (Playable map area)) offset by (-500.00, 0.00))
      • Set VariableSet BRS__Revive_Delay = 3.00
      • Trigger - Run BRS Register Boss <gen> (ignoring conditions)
      • -------- --------
      • -------- Configure Second Boss: --------
      • Set VariableSet BRS__Unit_Type = Archmage
      • Set VariableSet BRS__Revive_Point = ((Center of (Playable map area)) offset by (500.00, 0.00))
      • Set VariableSet BRS__Revive_Delay = 5.00
      • Set VariableSet BRS__Carry_Item_Type[1] = Crown of Kings +5
      • Set VariableSet BRS__Drop_Item_Type[1] = Mana Stone
      • Set VariableSet BRS__Bonus_Trigger_After = Archmage Revived <gen>
      • Trigger - Run BRS Register Boss <gen> (ignoring conditions)
Follow the instructions in the comments. Any BRS variable with two __ is a configurable variable. Unit_Type, Revive_Point, and Revive_Delay are the only required variables, the rest are optional. Only Set variables that you actually want to use, the system is smart and will handle the rest.

BRS__Bonus_Trigger_Before is used to run a Trigger when a Boss dies (BEFORE they revive).
BRS__Bonus_Trigger_After is used to run a Trigger when a Boss dies (AFTER they've revived).
I think the rest of the variables are self-explanatory.

The BRS Boss Dies trigger is where the system revives the dead boss. You'll see it may need to be adjusted to work with your map but most things should be good to go. I think it covers everything besides learning the hero skills but you could add those to the system or rely on the Bonus triggers to do it. Another solution would be to rely on Normal abilities so you don't have to relearn anything. The item stuff needs to be adjusted as well, particularly the Random roll chance for spawning item drops.
 

Attachments

  • Boss Revive System 1.w3m
    24.6 KB · Views: 8
Last edited:
Level 11
Joined
Dec 16, 2017
Messages
418
Thanks a lot!
Will test this out in a few hours and come with a full version in here based on what works for me, maybe could be useful for someone else as well for a future search .

Later edit:

Now i've read your whole com, i make them learn the spells because for some reason they don't use it, if i don't do that, well, this was last tested in patch 1.28.5, i have like 4 spells that are used by all bosses, but they do different things depending on which one casts, and the others that are like "spell only for that boss" i add already on hero, but i learn them in triggers too, that happens just for 2 bosses in my map, the rest don't have that, i've seen that only these 2 don't use those spells if they are not learnt aswell in triggers..
 
Last edited:
Level 11
Joined
Dec 16, 2017
Messages
418
It's awesome, i already imported it but not added any changes to them, I tried to make the bosses spells I had set on hero to unit and they seem to work now, back on patch 1.28.5 they didn't worked, so it's nice :D got rid of some useless thing to do.
One thing, how do I add in the system the option to drop only 1 item, instead of all items that I set at drop? Like each item having it's own drop rate instead of the boss having an drop rate and dropping all of them, I tried to make an change into boss dies trigger by adding a second and third item drop each with it's different changed drop rate, but it always drops just the first item in the list and the rest not.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
It's awesome, i already imported it but not added any changes to them, I tried to make the bosses spells I had set on hero to unit and they seem to work now, back on patch 1.28.5 they didn't worked, so it's nice :D got rid of some useless thing to do.
One thing, how do I add in the system the option to drop only 1 item, instead of all items that I set at drop? Like each item having it's own drop rate instead of the boss having an drop rate and dropping all of them, I tried to make an change into boss dies trigger by adding a second and third item drop each with it's different changed drop rate, but it always drops just the first item in the list and the rest not.
You could introduce new variables to the system like an Integer array to determine drop chances:
  • Set VariableSet BRS__Drop_Item_Chance[1] = 0
  • Set VariableSet BRS__Drop_Item_Chance[2] = 80
  • Set VariableSet BRS__Drop_Item_Chance[3] = 95
Then in the BRS Register Boss trigger you would save these values to the Hashtable using some kind of pattern similar to what I've done already for the other saved variables.

Then in the Boss Dies trigger you would load this data and use it as you wish:
  • Actions
    • // Load a bunch of data like BRS__Drop_Item_Chance[] and calculate BRS_Total_Items_Dropped
    • -------- --------
    • -------- We use this integer to loop backwards: --------
    • Set VariableSet BRS_Drop_Index = BRS_Total_Items_Dropped
    • -------- --------
    • -------- Roll a 100 sided die to determine your reward: --------
    • Set VariableSet BRS_Dice_Roll = (Random integer number between 1 and 100)
    • -------- --------
    • -------- Compare your dice roll to the chances for each droppable item and get the reward that matches: --------
    • For each (Integer BRS_Loop) from 1 to BRS_Total_Items_Dropped, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • BRS_Dice_Roll Greater than or equal to BRS__Drop_Item_Chance[BRS_Drop_Index]
          • Then - Actions
            • -------- Create the item at the position of the boss: --------
            • Item - Create BRS__Drop_Item_Type[BRS_Drop_Index] at Item_Point
            • -------- --------
            • -------- Tell the loop to stop here: --------
            • Set VariableSet BRS_Loop = BRS_Total_Items_Dropped
          • Else - Actions
        • Set VariableSet BRS_Drop_Index = (BRS_Drop_Index - 1)
This would be combined with what you have already in the Boss Dies trigger.

There's probably a better way to calculate the chances for drops but math ain't my strong suit. In my example I set it up like so:
Item-type [3] has 5% chance to drop (a roll >= 95)
Item-type [2] has a 15% chance to drop (a roll >= 80)
Item-type [1] has a 80% chance to drop (any roll >= 0)

It's a little confusing but basically my For Loop goes backwards and checks the [3] item first, if that fails then the [2] item, and it that fails then the [1] item. If it doesn't fail then it creates the item and exits the loop early.
 
Last edited:
Level 11
Joined
Dec 16, 2017
Messages
418
I did with wait 3 seconds instead of wait 6 real game time and it's still not more then 8, I added boss classification to every boss, I have 3 bosses that are not in the system because they are once per game and still same situation, hmm

I speak about the trigger of boss dies optional trigger

Later edit:

I've found the issue, I wasn't running one run boss from the configure trigger and it messed more up, now it's fine.
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
I did with wait 3 seconds instead of wait 6 real game time and it's still not more then 8, I added boss classification to every boss, I have 3 bosses that are not in the system because they are once per game and still same situation, hmm

I speak about the trigger of boss dies optional trigger

Later edit:

I've found the issue, I wasn't running one run boss from the configure trigger and it messed more up, now it's fine.
Glad you figured it out. Here's a new version that has Item drop chances like I described before. I actually made it more logical as well, should be easy to follow.
  • BRS Configure
    • Actions
      • -------- Configure Second Boss: --------
      • Set VariableSet BRS__Drop_Item_Type[1] = Wand of Mana Stealing
      • Set VariableSet BRS__Drop_Item_Type[2] = Mana Stone
      • Set VariableSet BRS__Drop_Item_Type[3] = Kelen's Dagger of Escape
      • Set VariableSet BRS__Drop_Item_Chance[1] = 60
      • Set VariableSet BRS__Drop_Item_Chance[2] = 30
      • Set VariableSet BRS__Drop_Item_Chance[3] = 10
      • Set VariableSet BRS__Drop_Item_Count = 3
      • Trigger - Run BRS Register Boss <gen> (ignoring conditions)
^ The Archmage has a 60% chance to drop the Wand, 30% chance for the Mana Stone, and 10% chance for the Dagger. Note how these values sum to 100% and go from most likely to drop to least likely to drop. You must follow this pattern!

HOWEVER, if you wanted to you could have a chance to drop nothing by taking advantage of BRS__Null_Item_Type:
  • Set VariableSet BRS__Drop_Item_Type[1] = Wand of Mana Stealing
  • Set VariableSet BRS__Drop_Item_Type[2] = Mana Stone
  • Set VariableSet BRS__Drop_Item_Type[3] = Kelen's Dagger of Escape
  • Set VariableSet BRS__Drop_Item_Type[4] = BRS__Null_Item_Type
  • Set VariableSet BRS__Drop_Item_Chance[1] = 30
  • Set VariableSet BRS__Drop_Item_Chance[2] = 20
  • Set VariableSet BRS__Drop_Item_Chance[3] = 10
  • Set VariableSet BRS__Drop_Item_Chance[4] = 0
  • Set VariableSet BRS__Drop_Item_Count = 4
  • Trigger - Run BRS Register Boss <gen> (ignoring conditions)
In this case there's a 30% chance for Wand, 20% chance for Mana Stone, and 10% chance for Dagger. That leaves a 40% chance for nothing to drop (null). In this case the last item should be your Null item and you should leave it's Chance at 0. Like I said before, you MUST follow this pattern.

Hopefully that logic is easy enough to follow. I suggest leaving yourself a Comment in the trigger to remind yourself of these rules!
 

Attachments

  • Boss Revive System 2.w3m
    28.2 KB · Views: 5
Last edited:
Status
Not open for further replies.
Top