• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Simple Trigger Problem

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,601
Hey.

I need a little help with quite a simple trigger. The idea of the system is not to kill units that are under this buff(Inner Fire). I have made an own that is not based on basic buffs, but triggers.

So what bugs? When I click another unit while other unit has Inner Fire Buff it won't die. It dies when the buff is gone from all units. Can you fix this?

In the real game this is just an ability that allows bring back dead heroes within the next 12 secs after cast. Can be effected to multiple targets(max 9).

+rep for the one who opens the map and fixes the problem
 

Attachments

  • EEEEEEEE.w3x
    19.9 KB · Views: 43
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Game Over Phodom Copy
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Priest
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Inner Fire) Equal to True
        • Then - Actions
        • Else - Actions
          • Unit - Kill (Triggering unit)
Why not make it like that?

If I understood correctly, the triggers should instantly kill units that are selected if they don't have Inner Fire.

EDIT:Slow
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
I'm so angry about this small case. :D

Ararrarr. This all is for one single ability and that ability is the only that that is bugging anymore before next version of game.

"Kindness and immense power are the things which made Phodom well-known. However, Phodom is not just another strong warrior who brings death to demons and dragons, but he's also a miracle worker. Countless people have been saved by him through this unique ability. This is not just a quickly reloading healing spell that can heal many people in short time. When the spell is cast, for the following 12 seconds, even the hardest blow from the most powerful foe cannot match with this ability, those who die will come back to life to fight once again."

So, I'm doing an ability that allows heroes respawn immediately after dying if they have this ability cast on themselves. Ararara.

I'm so pissed. :D
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
Okay, I have calmed down. Thanks for the help.

Now I explain a little more. There's a new ability which gives a buff that allows characters resurrect immediately, when killed.

1) The campaign already has a Game Over trigger.

  • Game Over Phodom
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to AAAPhodom
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Resource__DIFFICULTY Equal to 0
        • Then - Actions
          • Wait 3.00 seconds
          • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
          • Unit - Set life of (Dying unit) to 100.00%
          • Unit - Set mana of (Dying unit) to 100.00%
          • Skip remaining actions
        • Else - Actions
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Heavens_Bless_Duration[(Integer A)] Greater than 0
            • Then - Actions
              • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
              • Set TempReal = (50.00 + ((Real((Level of Heaven's Bless (Heal Spell) for AAAPhodom))) x 2.50))
              • Unit - Set life of (Dying unit) to TempReal%
              • Set TempReal = ((Real((Level of Heaven's Bless (Heal Spell) for AAAPhodom))) x 5.00)
              • Unit - Set mana of (Dying unit) to TempReal%
              • Skip remaining actions
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has an item of type Angelic Wings) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for Revive_Timer_1) Less than or equal to 0.00
            • Then - Actions
              • Countdown Timer - Start Revive_Timer_1 as a One-shot timer that will expire in 123.00 seconds
              • Wait 3.00 seconds
              • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
              • Unit - Set life of (Dying unit) to 100.00%
              • Unit - Set mana of (Dying unit) to 100.00%
              • Skip remaining actions
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has an item of type Belt Of Sunrise) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for Revive_Timer_2) Less than or equal to 0.00
            • Then - Actions
              • Countdown Timer - Start Revive_Timer_2 as a One-shot timer that will expire in 303.00 seconds
              • Wait 3.00 seconds
              • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
              • Unit - Set life of (Dying unit) to 100.00%
              • Unit - Set mana of (Dying unit) to 100.00%
              • Skip remaining actions
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has an item of type Holy Seal) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for Revive_Timer_3) Less than or equal to 0.00
            • Then - Actions
              • Countdown Timer - Start Revive_Timer_3 as a One-shot timer that will expire in 303.00 seconds
              • Wait 3.00 seconds
              • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
              • Unit - Set life of (Dying unit) to 100.00%
              • Unit - Set mana of (Dying unit) to 100.00%
              • Skip remaining actions
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Current lumber) Greater than or equal to 1
        • Then - Actions
          • Player - Add -1 to Player 1 (Red) Current lumber
          • Wait 3.00 seconds
          • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
          • Unit - Set life of (Dying unit) to 100.00%
          • Unit - Set mana of (Dying unit) to 100.00%
          • Skip remaining actions
        • Else - Actions
      • Unit - Pause all units
      • Animation - Change Game_Over_Unit's animation speed to 20.00% of its original speed
      • Camera - Lock camera target for Player 1 (Red) to Game_Over_Unit, offset by (0.00, 0.00) using Default rotation
      • Camera - Set Player 1 (Red)'s camera Distance to target to ((Distance to target of the current camera view) - 500.00) over 5.00 seconds
      • Cinematic - Fade out over 5.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Sound - Set music volume to 90.00%
      • Wait 0.50 seconds
      • Sound - Set music volume to 80.00%
      • Wait 0.50 seconds
      • Sound - Set music volume to 70.00%
      • Wait 0.50 seconds
      • Sound - Set music volume to 60.00%
      • Wait 0.50 seconds
      • Sound - Set music volume to 50.00%
      • Wait 0.50 seconds
      • Sound - Set music volume to 40.00%
      • Wait 0.50 seconds
      • Sound - Set music volume to 30.00%
      • Wait 0.50 seconds
      • Sound - Set music volume to 20.00%
      • Wait 0.50 seconds
      • Sound - Set music volume to 10.00%
      • Wait 0.50 seconds
      • Sound - Stop music Immediately
      • Sound - Clear the music list
      • Wait 4.00 seconds
      • Cinematic - Apply a filter over 2.00 seconds using No blending on texture war3campImported\Game Over512x512.blp, starting with color (0.00%, 0.00%, 0.00%) and 0.00% transparency and ending with color (100.00%, 100.00%, 100.00%) and 100.00% transparency
      • Wait 2.00 seconds
      • Cinematic - Apply a filter over 9999.00 seconds using No blending on texture war3campImported\Game Over512x512.blp, starting with color (100.00%, 100.00%, 100.00%) and 100.00% transparency and ending with color (100.00%, 100.00%, 100.00%) and 100.00% transparency
      • Wait 5.00 seconds
      • Game - Defeat Player 1 (Red) with the message: <Empty String>
2) There's already done the ability also(which bugs).

  • Heavens Bless HS
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Heaven's Bless (Heal Spell)
    • Actions
      • Set TempLoc = (Position of (Casting unit))
      • Set TempLoc2 = (Position of (Target unit of ability being cast))
      • Set TempUnit = (Target unit of ability being cast)
      • Set Heavens_Bless_Integer = (Heavens_Bless_Integer + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Heavens_Bless_Integer Greater than or equal to 10
        • Then - Actions
          • Set Heavens_Bless_Integer = 1
          • Set Heavens_Bless_Duration[Heavens_Bless_Integer] = 12
          • Set Heavens_Bless_Units[Heavens_Bless_Integer] = TempUnit
        • Else - Actions
          • Set Heavens_Bless_Duration[Heavens_Bless_Integer] = 12
          • Set Heavens_Bless_Units[Heavens_Bless_Integer] = TempUnit
      • Set Heavens_Bless_Duration[Integer] = 12
      • Unit - Create 1 Ability Dummy Unit for Player 1 (Red) at TempLoc facing TempLoc2
      • Unit - Order (Last created unit) to Orc Shaman - Lightning Shield TempUnit
      • Unit - Set life of TempUnit to ((Life of TempUnit) + (Real(YMultiboard__WARMLIGHT)))
      • Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call RemoveLocation(udg_TempLoc2)
      • Set TempUnit = No unit
3) And a periodic event.

  • Heavens Bless Duration
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Heavens_Bless_Duration[(Integer A)] Greater than 0
            • Then - Actions
              • Set Heavens_Bless_Duration[(Integer A)] = (Heavens_Bless_Duration[(Integer A)] - 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Heavens_Bless_Duration[(Integer A)] Less than or equal to 0
                • Then - Actions
                • Else - Actions
I copied all the triggers into that little test map, and tried to test. But I just couldn't understand how to fix this problem. Sometimes units respawn, sometime not. Argh.



Sooo... In one sentence: How to do a buff that resurrects dying heroes?
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
Yes, I checked your system and I'm thankfuly for you for helping me. However, when a hero resurrects, his hit points & mana are specific depending of the ability level(for example @ lvl 1 hero will gain 50% hit points, when @ lvl 10, will gain 75% hit points, when @ lvl 20, will gain 100% hit points, and mana is another story).

So your suggestion is good, but it won't work with the campaign. The only way to do whole resurrecting thing is to make it with triggers. You have an excellent start however, Maker. Can't you just do the system with triggers? I would be so appreciative and relieved.

Ahh well, I made with my "lack of good description" & "testing map" this whole thing so hard.
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
Almost perfect, but this doesn't work:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Picked unit) has buff Inner Fire) Equal to True
    • Then - Actions
    • Else - Actions
      • Unit Group - Remove (Picked unit) from Revive_Group
Actually, that is what is the problem. We must do this system without using buff checking because it doesn't work(in the campaign). So, can you make with triggers that(I mean checking with if the ability is alive with something else than buffs)?
 
Level 9
Joined
Apr 25, 2009
Messages
468
To do a simple answer to a simple Question.

1: Create and buff (I would suggest a aura with a custom buff) and remove all the bonuses it gives.

2: Create a dummy that holds the aura. Make the AOE of the aura as big as you want it.

3:Create a new trigger.
  • Melee Initialization
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Location = (Position of (<your dummy>))
      • Set Location2 = (Position of (Triggering unit))
      • Set UnitGroup = (Units within <aoe of the buff> of (Location) matching (((Triggering unit) has buff <your buff>) Equal to True))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in UnitGroup) Equal to True
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at Location2, Hide revival graphics
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Location)
      • Custom script: call RemoveLocation(udg_Location2)
      • Custom script: call DestroyGroup(udg_UnitGroup)
4: Add the other triggers and conditions.

5: Done.
 
Status
Not open for further replies.
Top